main.scss 7.2 KB

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