main.scss 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  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. padding-bottom: 1em;
  122. position: fixed;
  123. top:0; left: 0;
  124. z-index: 4;
  125. width:100%;
  126. background-color: white;
  127. h1.part-title{
  128. font-size: 1.6em;
  129. body.mode-connections &{
  130. margin: 0 0 0 $margin_left;
  131. }
  132. body.mode-text &{
  133. margin:0 0 0 $margin_left;
  134. }
  135. }
  136. h2.title{
  137. font-size: 1em;
  138. body.mode-connections &{
  139. margin: 0 0 0 $margin_left;
  140. }
  141. body.mode-text &{
  142. margin:0 0 0 $margin_left;
  143. }
  144. }
  145. }
  146. main#content{
  147. margin-top: $header_height;
  148. // margin: 5em;
  149. // width: 450px;
  150. // &>*{
  151. // width: 450px;
  152. // }
  153. h1.part-title{
  154. font-size: 1.6em;
  155. width:450px;
  156. }
  157. section.part{
  158. position: relative;
  159. }
  160. h2.title, h2.filet{
  161. font-size: 1em;
  162. width:450px;
  163. // margin: 1em 0;
  164. }
  165. }
  166. section.intro{
  167. margin-left: $margin_left;
  168. }
  169. // ____ __ _
  170. // / _/___ / / (_)___ ___
  171. // / // __ \/ / / / __ \/ _ \
  172. // _/ // / / / /___/ / / / / __/
  173. // /___/_/ /_/_____/_/_/ /_/\___/
  174. main#content.mode-text{
  175. h1.part-title{
  176. margin: 1em 0 0 $margin_left;
  177. }
  178. h2.title, h4.filet{
  179. margin: 1em 0 0 $margin_left;
  180. }
  181. // .sticky{
  182. // color: red;
  183. // &.fixed{
  184. // position: fixed;
  185. // }
  186. // }
  187. section.enonce{
  188. width:450px;
  189. margin: 1em 0 1em $margin_left;
  190. overflow-x: visible;
  191. @include base_font;
  192. // max-height:14px;
  193. // overflow: hidden;
  194. // transition: max-height 0.5s ease-in-out;
  195. // &.active{
  196. // max-height:1000px;
  197. // }
  198. h2{
  199. font-size: 1em;
  200. font-weight: 300;
  201. margin: 0;
  202. cursor:pointer;
  203. }
  204. h3{
  205. font-size: 0.9em;
  206. font-weight: 300;
  207. margin: 0;
  208. cursor:pointer;
  209. }
  210. div.text{
  211. font-size: 1.3em;
  212. div.paragraph{
  213. margin-bottom: 1em;
  214. div.opened-link{
  215. display:inline;
  216. }
  217. a.link, span.link.text{
  218. font-weight: 600;
  219. text-decoration: none;
  220. color: inherit;
  221. }
  222. span.link.text:after{
  223. content:':'
  224. }
  225. section.enonce, section.item{
  226. padding-left:2em;
  227. border-left: 1px solid #999;
  228. }
  229. img{
  230. float: left;
  231. }
  232. }
  233. }
  234. }
  235. }
  236. // ______
  237. // /_ __/_______ ___
  238. // / / / ___/ _ \/ _ \
  239. // / / / / / __/ __/
  240. // /_/ /_/ \___/\___/
  241. main#content.mode-connections{
  242. h1.part-title{
  243. margin:0 0 0 $margin_left;
  244. }
  245. h2.title, h4.filet{
  246. margin:0 0 0 $margin_left;
  247. }
  248. }
  249. .dot{
  250. margin:0 0 0 $margin_left;
  251. position: relative;
  252. // overflow-x: visible;
  253. // overflow-y: auto;
  254. border: 1px solid white;
  255. // transform: translate3d(0,0,0);
  256. // transition: transform 0.2s ease-in-out;
  257. width: $dot_w;
  258. // >span.id{
  259. // display: inline-block;
  260. // // position: absolute;
  261. // // left:-3.5em;
  262. // width: $margin_left - ($bullet_w/2); text-align: right;
  263. // opacity:0;
  264. // // transform: translate3d(0, 0, 0);
  265. // // transition: transform 0.2s ease-in-out,opacity 0.4s ease-in-out;
  266. // transition: opacity 0.4s ease-in-out;
  267. // }
  268. // >span.bullet{
  269. // display: inline-block;
  270. // width:$bullet_w; text-align: center;
  271. // vertical-align: top;
  272. // font-size: 15px;
  273. // font-kerning: none;
  274. // }
  275. >p.summary{
  276. display: inline-block;
  277. vertical-align: top;
  278. margin: 0;
  279. opacity: 0;
  280. transition: opacity 0.4s ease-in-out;
  281. width : $dot_w - $margin_left - $bullet_w -5px;
  282. }
  283. &:not(.disabled) > p.summary{cursor: pointer;}
  284. &.disabled > p.summary{cursor: default;}
  285. >section.text{
  286. display: inline-block;
  287. vertical-align: top;
  288. margin: 0;
  289. width : $dot_w - $margin_left - $bullet_w -5px;
  290. p{
  291. margin:0;
  292. &:not(:last-child){
  293. margin-bottom:1em;
  294. }
  295. }
  296. a{
  297. color: inherit;
  298. text-decoration: none;
  299. font-weight: bold;
  300. }
  301. }
  302. &.to-links > section.text{
  303. border-top: 1px solid #e2e2e2;
  304. }
  305. &.from-links > section.text{
  306. border-bottom: 1px solid #e2e2e2;
  307. }
  308. >nav.links{
  309. position:relative;
  310. left: $margin_left*2;
  311. box-sizing: border-box;
  312. &.to{
  313. bottom:100%;
  314. margin-top: 15px;
  315. padding-bottom:10px;
  316. }
  317. &.from{
  318. top:100%;
  319. padding-top:10px;
  320. margin-bottom: 15px;
  321. }
  322. &:before{
  323. content: "";
  324. border-left: 1px solid #e2e2e2;
  325. position: absolute;
  326. top:0; left:$margin_left + ($bullet_w/2);
  327. height: 100%; width:1px;
  328. z-index: -1;
  329. }
  330. }
  331. &:hover, &.opened, &.highlight{
  332. // transform: translate3d(0.5em, 0, 0);
  333. // transition: transform 0.1s ease-in-out;
  334. >p.summary{
  335. opacity: 1;
  336. transition: opacity 0.4s ease-in-out;
  337. }
  338. >span.id{
  339. opacity: 1;
  340. // transform: translate3d(-0.5em, 0, 0);
  341. // transition: transform 0.1s ease-in-out,opacity 0.4s ease-in-out;
  342. transition: opacity 0.4s ease-in-out;
  343. }
  344. }
  345. &.disabled>*{
  346. color:grey;
  347. }
  348. &:not(.opened){
  349. line-height: 0.7;
  350. }
  351. }
  352. footer{
  353. position: fixed;
  354. bottom: 0;
  355. background-color: white;
  356. >*{margin-left: 1em;}
  357. width: 100%;
  358. }