main.scss 7.1 KB

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