main.scss 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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:3em;
  21. $dot_w:500px;
  22. $margin_left:50px;
  23. $bullet_w:40px;
  24. header{
  25. position: fixed;
  26. width:100%; height:$header_height;
  27. top:0; z-index: 5;
  28. background-color: white;
  29. >*{
  30. display: inline-block;
  31. vertical-align: bottom;
  32. // &:first-child{ margin-left: 1em;}
  33. &:last-child{ margin-right: 1em;}
  34. }
  35. >h1{
  36. margin: 0 0 0 $margin_left+($bullet_w/2);
  37. }
  38. }
  39. nav#menus{
  40. float:right;
  41. >ul{
  42. display: inline-block;
  43. }
  44. ul{
  45. margin:0 0.5em;
  46. li{
  47. list-style: none;
  48. line-height: 0.9;
  49. display: inline-block;
  50. vertical-align: middle;
  51. margin: 0 0.2em;
  52. a{
  53. text-decoration: none;
  54. color: inherit;
  55. }
  56. }
  57. }
  58. // ul#languages{
  59. // li{
  60. // list-style: none;
  61. // line-height: 0.9;
  62. // a{
  63. // text-decoration: none;
  64. // color: inherit;
  65. // }
  66. // }
  67. // }
  68. }
  69. // #app{
  70. // position: relative;
  71. // text-align: center;
  72. // margin: 3em auto;
  73. // }
  74. main#content{
  75. margin-top: $header_height;
  76. // margin: 5em;
  77. // width: 450px;
  78. // &>*{
  79. // width: 450px;
  80. // }
  81. }
  82. h1.part{
  83. font-size: 1.6em;
  84. width:450px;
  85. // margin: 1em 0;
  86. }
  87. // ____ __ _
  88. // / _/___ / / (_)___ ___
  89. // / // __ \/ / / / __ \/ _ \
  90. // _/ // / / / /___/ / / / / __/
  91. // /___/_/ /_/_____/_/_/ /_/\___/
  92. section.enonce{
  93. width:450px;
  94. margin: 1em 0 1em $margin_left;
  95. overflow-x: visible;
  96. @include base_font;
  97. // max-height:14px;
  98. // overflow: hidden;
  99. // transition: max-height 0.5s ease-in-out;
  100. // &.active{
  101. // max-height:1000px;
  102. // }
  103. h2{
  104. font-size: 1em;
  105. font-weight: 300;
  106. margin: 0;
  107. cursor:pointer;
  108. }
  109. h3{
  110. font-size: 0.9em;
  111. font-weight: 300;
  112. margin: 0;
  113. cursor:pointer;
  114. }
  115. div.text{
  116. font-size: 1.3em;
  117. div.paragraph{
  118. margin-bottom: 1em;
  119. div.opened-link{
  120. display:inline;
  121. }
  122. a.link, span.link.text{
  123. font-weight: 600;
  124. text-decoration: none;
  125. color: inherit;
  126. }
  127. span.link.text:after{
  128. content:':'
  129. }
  130. section.enonce, section.item{
  131. padding-left:2em;
  132. border-left: 1px solid #999;
  133. }
  134. }
  135. }
  136. }
  137. // ______
  138. // /_ __/_______ ___
  139. // / / / ___/ _ \/ _ \
  140. // / / / / / __/ __/
  141. // /_/ /_/ \___/\___/
  142. h1.part{
  143. margin:1em 0 0 $margin_left+($bullet_w/2);
  144. }
  145. .dot{
  146. position: relative;
  147. // overflow-x: visible;
  148. // overflow-y: auto;
  149. border: 1px solid white;
  150. // transform: translate3d(0,0,0);
  151. // transition: transform 0.2s ease-in-out;
  152. width: $dot_w;
  153. >span.id{
  154. display: inline-block;
  155. // position: absolute;
  156. // left:-3.5em;
  157. width: $margin_left; text-align: right;
  158. opacity:0;
  159. // transform: translate3d(0, 0, 0);
  160. // transition: transform 0.2s ease-in-out,opacity 0.4s ease-in-out;
  161. transition: opacity 0.4s ease-in-out;
  162. }
  163. >span.bullet{
  164. display: inline-block;
  165. width:$bullet_w; text-align: center;
  166. vertical-align: top;
  167. font-size: 15px;
  168. font-kerning: none;
  169. }
  170. >p.summary{
  171. display: inline-block;
  172. vertical-align: top;
  173. margin: 0;
  174. opacity: 0;
  175. transition: opacity 0.4s ease-in-out;
  176. width : $dot_w - $margin_left - $bullet_w -5px;
  177. }
  178. &:not(.disabled) > p.summary{cursor: pointer;}
  179. &.disabled > p.summary{cursor: default;}
  180. >section.text{
  181. display: inline-block;
  182. vertical-align: top;
  183. margin: 0;
  184. width : $dot_w - $margin_left - $bullet_w -5px;
  185. p{
  186. margin:0;
  187. &:not(:last-child){
  188. margin-bottom:1em;
  189. }
  190. }
  191. a{
  192. color: inherit;
  193. text-decoration: none;
  194. font-weight: bold;
  195. }
  196. }
  197. &.to-links > section.text{
  198. border-top: 1px solid #e2e2e2;
  199. }
  200. &.from-links > section.text{
  201. border-bottom: 1px solid #e2e2e2;
  202. }
  203. >nav.links{
  204. position:relative;
  205. left: $margin_left*2;
  206. box-sizing: border-box;
  207. &.to{
  208. bottom:100%;
  209. margin-top: 15px;
  210. padding-bottom:10px;
  211. }
  212. &.from{
  213. top:100%;
  214. padding-top:10px;
  215. margin-bottom: 15px;
  216. }
  217. &:before{
  218. content: "";
  219. border-left: 1px solid #e2e2e2;
  220. position: absolute;
  221. top:0; left:$margin_left + ($bullet_w/2);
  222. height: 100%; width:1px;
  223. z-index: -1;
  224. }
  225. }
  226. &:hover, &.opened, &.highlight{
  227. // transform: translate3d(0.5em, 0, 0);
  228. // transition: transform 0.1s ease-in-out;
  229. >p.summary{
  230. opacity: 1;
  231. transition: opacity 0.4s ease-in-out;
  232. }
  233. >span.id{
  234. opacity: 1;
  235. // transform: translate3d(-0.5em, 0, 0);
  236. // transition: transform 0.1s ease-in-out,opacity 0.4s ease-in-out;
  237. transition: opacity 0.4s ease-in-out;
  238. }
  239. }
  240. &.disabled>*{
  241. color:grey;
  242. }
  243. &:not(.opened){
  244. line-height: 0.7;
  245. }
  246. }
  247. footer{
  248. position: fixed;
  249. bottom: 0;
  250. background-color: white;
  251. >*{margin-left: 1em;}
  252. }