main.scss 11 KB

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