main.scss 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. // @Author: Bachir Soussi Chiadmi <bach>
  2. // @Date: 16-04-2017
  3. // @Email: bachir@figureslibres.io
  4. // @Last modified by: bach
  5. // @Last modified time: 18-04-2017
  6. // @License: GPL-V3
  7. $fs:16px;
  8. @mixin base_font{
  9. font-family: 'amiri', sans-serif;
  10. font-size: $fs;
  11. font-kerning: auto;
  12. line-height: 1.4;
  13. }
  14. html, body{
  15. @include base_font;
  16. position: relative;
  17. margin:0;
  18. padding:0;
  19. }
  20. $header_height:4em;
  21. $dot_w:500px;
  22. $bullet_w:40px;
  23. $margin_left:50px + ($bullet_w/2);
  24. header{
  25. position: fixed;
  26. width:100%; height:$header_height;
  27. top:0; z-index: 5;
  28. background-color: white;
  29. // padding: 0 0 0 $margin_left;
  30. // border-bottom: 1px solid green;
  31. >*{
  32. display: inline-block;
  33. vertical-align: text-bottom;
  34. // &:first-child{ margin-left: 1em;}
  35. &:last-child{ margin-right: 1em;}
  36. }
  37. >h1{
  38. font-size: 3em;
  39. margin: 0 0 0 $margin_left;
  40. }
  41. #menus{
  42. // float:right;
  43. >*{
  44. display: inline-block;
  45. vertical-align: top;
  46. }
  47. nav {
  48. padding:1em 1em;
  49. position: relative;
  50. h3{
  51. margin:0; padding:0;
  52. cursor: pointer;
  53. transition: color 0.3s ease-in-out;
  54. }
  55. ul{
  56. position: absolute;
  57. margin:0;
  58. left:0; padding:0 1em 1em;
  59. background-color: rgba(255,255,255, 1);
  60. // top:2em;
  61. white-space: nowrap;
  62. height:1px; opacity:0;
  63. overflow: hidden;
  64. transition: opacity 0.3s ease-in-out;
  65. li{
  66. margin:0;
  67. padding:0;
  68. list-style: none;
  69. transition: color 0.3s ease-in-out;
  70. font-weight:500;
  71. font-size: 1.2em;
  72. line-height: 1.2;
  73. a{
  74. color: inherit;
  75. text-decoration: none;
  76. }
  77. }
  78. }
  79. }
  80. // nav#parts-nav{
  81. // ul{
  82. // right:0; left: auto;
  83. // }
  84. // }
  85. &:hover{
  86. h3{
  87. color: rgb(100,100,100);
  88. }
  89. nav:hover{
  90. z-index: 10;
  91. h3{
  92. color:#000;
  93. }
  94. ul{
  95. height:auto; opacity: 1;
  96. transition: height opacity 0.3s ease-in-out;
  97. }
  98. li{
  99. color: rgb(100,100,100);
  100. &:hover{
  101. color: #000;
  102. }
  103. }
  104. }
  105. }
  106. }
  107. }
  108. // #app{
  109. // position: relative;
  110. // text-align: center;
  111. // margin: 3em auto;
  112. // }
  113. .sticky-clone-wrapper{
  114. padding-top: $header_height;
  115. position: fixed;
  116. top:0; left: 0;
  117. z-index: 4;
  118. background-color: white;
  119. h1.part-title{
  120. font-size: 1.6em;
  121. body.inline &{
  122. margin: 0 0 0 $margin_left;
  123. }
  124. body.tree &{
  125. margin:0 0 0 $margin_left;
  126. }
  127. }
  128. }
  129. main#content{
  130. margin-top: $header_height;
  131. // margin: 5em;
  132. // width: 450px;
  133. // &>*{
  134. // width: 450px;
  135. // }
  136. h1.part-title{
  137. font-size: 1.6em;
  138. width:450px;
  139. }
  140. section.part{
  141. position: relative;
  142. }
  143. h2.title, h2.filet{
  144. font-size: 1em;
  145. width:450px;
  146. // margin: 1em 0;
  147. }
  148. }
  149. // ____ __ _
  150. // / _/___ / / (_)___ ___
  151. // / // __ \/ / / / __ \/ _ \
  152. // _/ // / / / /___/ / / / / __/
  153. // /___/_/ /_/_____/_/_/ /_/\___/
  154. main#content.inline{
  155. h1.part-title{
  156. margin: 1em 0 0 $margin_left;
  157. }
  158. h2.title, h4.filet{
  159. margin: 1em 0 0 $margin_left;
  160. }
  161. // .sticky{
  162. // color: red;
  163. // &.fixed{
  164. // position: fixed;
  165. // }
  166. // }
  167. section.enonce{
  168. width:450px;
  169. margin: 1em 0 1em $margin_left;
  170. overflow-x: visible;
  171. @include base_font;
  172. // max-height:14px;
  173. // overflow: hidden;
  174. // transition: max-height 0.5s ease-in-out;
  175. // &.active{
  176. // max-height:1000px;
  177. // }
  178. h2{
  179. font-size: 1em;
  180. font-weight: 300;
  181. margin: 0;
  182. cursor:pointer;
  183. }
  184. h3{
  185. font-size: 0.9em;
  186. font-weight: 300;
  187. margin: 0;
  188. cursor:pointer;
  189. }
  190. div.text{
  191. font-size: 1.3em;
  192. div.paragraph{
  193. margin-bottom: 1em;
  194. div.opened-link{
  195. display:inline;
  196. }
  197. a.link, span.link.text{
  198. font-weight: 600;
  199. text-decoration: none;
  200. color: inherit;
  201. }
  202. span.link.text:after{
  203. content:':'
  204. }
  205. section.enonce, section.item{
  206. padding-left:2em;
  207. border-left: 1px solid #999;
  208. }
  209. }
  210. }
  211. }
  212. }
  213. // ______
  214. // /_ __/_______ ___
  215. // / / / ___/ _ \/ _ \
  216. // / / / / / __/ __/
  217. // /_/ /_/ \___/\___/
  218. main#content.tree{
  219. h1.part-title{
  220. margin:0 0 0 $margin_left;
  221. }
  222. h2.title, h4.filet{
  223. margin:0 0 0 $margin_left;
  224. }
  225. }
  226. .dot{
  227. position: relative;
  228. // overflow-x: visible;
  229. // overflow-y: auto;
  230. border: 1px solid white;
  231. // transform: translate3d(0,0,0);
  232. // transition: transform 0.2s ease-in-out;
  233. width: $dot_w;
  234. >span.id{
  235. display: inline-block;
  236. // position: absolute;
  237. // left:-3.5em;
  238. width: $margin_left - ($bullet_w/2); text-align: right;
  239. opacity:0;
  240. // transform: translate3d(0, 0, 0);
  241. // transition: transform 0.2s ease-in-out,opacity 0.4s ease-in-out;
  242. transition: opacity 0.4s ease-in-out;
  243. }
  244. >span.bullet{
  245. display: inline-block;
  246. width:$bullet_w; text-align: center;
  247. vertical-align: top;
  248. font-size: 15px;
  249. font-kerning: none;
  250. }
  251. >p.summary{
  252. display: inline-block;
  253. vertical-align: top;
  254. margin: 0;
  255. opacity: 0;
  256. transition: opacity 0.4s ease-in-out;
  257. width : $dot_w - $margin_left - $bullet_w -5px;
  258. }
  259. &:not(.disabled) > p.summary{cursor: pointer;}
  260. &.disabled > p.summary{cursor: default;}
  261. >section.text{
  262. display: inline-block;
  263. vertical-align: top;
  264. margin: 0;
  265. width : $dot_w - $margin_left - $bullet_w -5px;
  266. p{
  267. margin:0;
  268. &:not(:last-child){
  269. margin-bottom:1em;
  270. }
  271. }
  272. a{
  273. color: inherit;
  274. text-decoration: none;
  275. font-weight: bold;
  276. }
  277. }
  278. &.to-links > section.text{
  279. border-top: 1px solid #e2e2e2;
  280. }
  281. &.from-links > section.text{
  282. border-bottom: 1px solid #e2e2e2;
  283. }
  284. >nav.links{
  285. position:relative;
  286. left: $margin_left*2;
  287. box-sizing: border-box;
  288. &.to{
  289. bottom:100%;
  290. margin-top: 15px;
  291. padding-bottom:10px;
  292. }
  293. &.from{
  294. top:100%;
  295. padding-top:10px;
  296. margin-bottom: 15px;
  297. }
  298. &:before{
  299. content: "";
  300. border-left: 1px solid #e2e2e2;
  301. position: absolute;
  302. top:0; left:$margin_left + ($bullet_w/2);
  303. height: 100%; width:1px;
  304. z-index: -1;
  305. }
  306. }
  307. &:hover, &.opened, &.highlight{
  308. // transform: translate3d(0.5em, 0, 0);
  309. // transition: transform 0.1s ease-in-out;
  310. >p.summary{
  311. opacity: 1;
  312. transition: opacity 0.4s ease-in-out;
  313. }
  314. >span.id{
  315. opacity: 1;
  316. // transform: translate3d(-0.5em, 0, 0);
  317. // transition: transform 0.1s ease-in-out,opacity 0.4s ease-in-out;
  318. transition: opacity 0.4s ease-in-out;
  319. }
  320. }
  321. &.disabled>*{
  322. color:grey;
  323. }
  324. &:not(.opened){
  325. line-height: 0.7;
  326. }
  327. }
  328. footer{
  329. position: fixed;
  330. bottom: 0;
  331. background-color: white;
  332. >*{margin-left: 1em;}
  333. }