main.scss 7.8 KB

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