main.scss 6.9 KB

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