main.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  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. // outline: 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. margin-bottom:2em;
  160. }
  161. // h2.title, h2.filet{
  162. // font-size: 1em;
  163. // width:450px;
  164. // // margin: 1em 0;
  165. // }
  166. }
  167. section.intro{
  168. margin-left: $margin_left;
  169. }
  170. // Commons
  171. h1.part-title{
  172. font-size: 1.8em;
  173. margin:0 0 0 $margin_left;
  174. padding-bottom: 0.5em;
  175. font-weight: normal;
  176. letter-spacing: 0.3em;
  177. em{
  178. font-size: 0.7em;
  179. letter-spacing: normal;
  180. }
  181. }
  182. h2.title{
  183. font-size: 1.2em;
  184. font-weight: 500;
  185. margin:1em 0 0 $margin_left;
  186. line-height: 1;
  187. }
  188. // div.definition,
  189. // div.axiom{
  190. // margin-top: 1em;
  191. // }
  192. h4.filet{
  193. margin:0.5em 0 0 $margin_left;
  194. }
  195. div.proposition,
  196. div.appendice,
  197. div.chapitre{
  198. &:not(.chapitre), &.chapitre:first-of-type, &:not(.dot.nested){margin-top: 1em;}
  199. span.title{
  200. font-size: 1.2em;
  201. font-weight: 500;
  202. }
  203. }
  204. div.explication,
  205. div.demonstration,
  206. div.scolie,
  207. div.corollaire,
  208. div.prop-axiom,
  209. div.lemme{
  210. span.title{
  211. font-size: 0.8em;
  212. text-transform:capitalize;
  213. font-variant: small-caps;
  214. }
  215. }
  216. div.lemme-scolie,
  217. div.lemme-corrollaire,
  218. div.lemme-demonstration,
  219. div.corollaire-demo{
  220. span.title{
  221. font-size: 0.7em;
  222. text-transform:capitalize;
  223. font-variant: small-caps;
  224. }
  225. }
  226. // ____ __ _
  227. // / _/___ / / (_)___ ___
  228. // / // __ \/ / / / __ \/ _ \
  229. // _/ // / / / /___/ / / / / __/
  230. // /___/_/ /_/_____/_/_/ /_/\___/
  231. main#content.mode-text{
  232. // h1.part-title{
  233. // margin: 1em 0 0 $margin_left;
  234. // }
  235. // h2.title, h4.filet{
  236. // margin: 1em 0 0 $margin_left;
  237. // }
  238. // .sticky{
  239. // color: red;
  240. // &.fixed{
  241. // position: fixed;
  242. // }
  243. // }
  244. section.enonce, section.item.nested{
  245. width:600px;
  246. margin: 1em 0 1em $margin_left;
  247. overflow-x: visible;
  248. }
  249. section.enonce{
  250. @include base_font;
  251. // max-height:14px;
  252. // overflow: hidden;
  253. // transition: max-height 0.5s ease-in-out;
  254. // &.active{
  255. // max-height:1000px;
  256. // }
  257. h2{
  258. font-size: 1em;
  259. font-weight: 300;
  260. margin: 0;
  261. cursor:pointer;
  262. }
  263. &.definition, &.axiom, &.def-affect{
  264. &:not(.nested)>h2{
  265. font-size: 1.2em;
  266. float:left;
  267. margin:0 0.5em 0 0;
  268. // line-height: 1.9;
  269. font-weight: 600;
  270. text-transform: uppercase;
  271. }
  272. }
  273. h3{
  274. font-size: 0.9em;
  275. font-weight: 300;
  276. margin: 0;
  277. cursor:pointer;
  278. }
  279. &.proposition>div.text{
  280. font-size: 1.5em;
  281. font-weight: 500;
  282. }
  283. div.text{
  284. font-size: 1.2em;
  285. div.paragraph{
  286. margin-bottom: 1em;
  287. div.opened-link{
  288. display:inline;
  289. }
  290. a.link, span.link.text{
  291. font-weight: 600;
  292. text-decoration: none;
  293. color: inherit;
  294. }
  295. span.link.text:after{
  296. content:':'
  297. }
  298. section.enonce, section.item{
  299. padding-left:2em;
  300. border-left: 1px solid #999;
  301. }
  302. img{
  303. float: left;
  304. }
  305. sup{
  306. font-size: 55%;
  307. font-weight: 400;
  308. a{
  309. pointer-events: none;
  310. cursor: pointer;
  311. }
  312. }
  313. }
  314. }
  315. // footnotes
  316. hr{
  317. display:none;
  318. }
  319. section ol{
  320. font-size: 0.7em;
  321. margin: -1em 0 2em 0;
  322. padding:0 0 0 1em;
  323. a{
  324. display: none;
  325. }
  326. }
  327. }
  328. // reset font-size since nested items are in a div with alternate font-size
  329. .enonce.nested, .item.nested{
  330. font-size: $fs;
  331. }
  332. .opened-link{
  333. // position:relative;
  334. // outline: 1px solid red;
  335. .close-link-btn{
  336. width:20px;
  337. margin:1em 0 -2.1em $margin_left - 9px;
  338. // outline: 1px solid green;
  339. // display:inline-block;
  340. position:relative;
  341. background-color: white;
  342. z-index: 10;
  343. // top:0; left:-1em;
  344. cursor: pointer;
  345. text-align: center;
  346. span{
  347. font-style: normal;
  348. font-size: 0.7em;
  349. font-weight: 300;
  350. }
  351. }
  352. }
  353. }
  354. // ______
  355. // /_ __/_______ ___
  356. // / / / ___/ _ \/ _ \
  357. // / / / / / __/ __/
  358. // /_/ /_/ \___/\___/
  359. main#content.mode-connections{
  360. // h2.title, h4.filet{
  361. // margin:0 0 0 $margin_left;
  362. // }
  363. }
  364. .dot{
  365. margin:0 0 0 $margin_left;
  366. position: relative;
  367. // overflow-x: visible;
  368. // overflow-y: auto;
  369. border: 1px solid white;
  370. // transform: translate3d(0,0,0);
  371. // transition: transform 0.2s ease-in-out;
  372. width: $dot_w;
  373. // >span.id{
  374. // display: inline-block;
  375. // // position: absolute;
  376. // // left:-3.5em;
  377. // width: $margin_left - ($bullet_w/2); text-align: right;
  378. // opacity:0;
  379. // // transform: translate3d(0, 0, 0);
  380. // // transition: transform 0.2s ease-in-out,opacity 0.4s ease-in-out;
  381. // transition: opacity 0.4s ease-in-out;
  382. // }
  383. // >span.bullet{
  384. // display: inline-block;
  385. // width:$bullet_w; text-align: center;
  386. // vertical-align: top;
  387. // font-size: 15px;
  388. // font-kerning: none;
  389. // }
  390. >span.title{
  391. padding: 0 0.6em 0 0;
  392. }
  393. &.opened>span.title{
  394. display:block;
  395. }
  396. >p.summary{
  397. display: inline-block;
  398. vertical-align: top;
  399. margin: 0;
  400. opacity: 0;
  401. transition: opacity 0.4s ease-in-out;
  402. max-width : $dot_w - $margin_left -5px;
  403. }
  404. &.preface{
  405. .title{display: none;}
  406. p.summary{
  407. opacity: 1;
  408. }
  409. }
  410. &:not(.disabled) {
  411. >span.title,>p.summary{cursor: pointer;}
  412. }
  413. &.disabled {
  414. >span.title,>p.summary{cursor: default;}
  415. }
  416. >section.text{
  417. display: inline-block;
  418. vertical-align: top;
  419. margin: 0;
  420. width : $dot_w - $margin_left - $bullet_w -5px;
  421. p{
  422. margin:0;
  423. &:not(:last-child){
  424. margin-bottom:1em;
  425. }
  426. }
  427. a{
  428. color: inherit;
  429. text-decoration: none;
  430. font-weight: bold;
  431. }
  432. }
  433. &.to-links > section.text{
  434. border-top: 1px solid #e2e2e2;
  435. $decal:1.5em;
  436. padding-top:$decal;
  437. margin-top: -$decal;
  438. }
  439. &.from-links > section.text{
  440. border-bottom: 1px solid #e2e2e2;
  441. }
  442. >nav.links{
  443. position:relative;
  444. // left: $margin_left*2;
  445. box-sizing: border-box;
  446. &.to{
  447. bottom:100%;
  448. margin-top: 15px;
  449. padding-bottom:10px;
  450. }
  451. &.from{
  452. top:100%;
  453. padding-top:10px;
  454. // margin-bottom: 15px;
  455. }
  456. &:before{
  457. content: "";
  458. border-left: 1px solid #e2e2e2;
  459. position: absolute;
  460. top:0; left:$margin_left - 5px;
  461. height: 100%; width:1px;
  462. z-index: -1;
  463. }
  464. }
  465. &:hover, &.opened, &.highlight{
  466. // transform: translate3d(0.5em, 0, 0);
  467. // transition: transform 0.1s ease-in-out;
  468. >p.summary{
  469. opacity: 1;
  470. transition: opacity 0.4s ease-in-out;
  471. }
  472. // >span.id{
  473. // opacity: 1;
  474. // // transform: translate3d(-0.5em, 0, 0);
  475. // // transition: transform 0.1s ease-in-out,opacity 0.4s ease-in-out;
  476. // transition: opacity 0.4s ease-in-out;
  477. // }
  478. }
  479. &.disabled>*{
  480. color:grey;
  481. }
  482. // &:not(.opened){
  483. // line-height: 0.8;
  484. // }
  485. &.opened{
  486. // position:relative;
  487. // outline: 1px solid red;
  488. margin-bottom: 15px;
  489. // span.title{
  490. // float:left;
  491. // }
  492. }
  493. .bullet,.close-link-btn{
  494. position:absolute;
  495. width:20px;
  496. // top:0;
  497. left:-24px;
  498. margin:-3px 0 0 0;
  499. // outline: 1px solid green;
  500. // display:inline-block;
  501. // background-color: white;
  502. // z-index: 10;
  503. text-align: center;
  504. }
  505. .bullet{
  506. span{
  507. font-style: normal;
  508. font-size: 0.2em;
  509. font-weight: 300;
  510. }
  511. }
  512. .close-link-btn{
  513. cursor: pointer;
  514. span{
  515. font-style: normal;
  516. font-size: 0.7em;
  517. font-weight: 300;
  518. }
  519. }
  520. &.nested{
  521. font-size: $fs;
  522. }
  523. }
  524. footer{
  525. position: fixed;
  526. bottom: 0;
  527. background-color: white;
  528. >*{margin-left: $margin_left;}
  529. width: 100%;
  530. }