lesson.css 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. body {
  2. margin: 0;
  3. font-family: Georgia, serif;
  4. font-size: 19px;
  5. line-height: 150%;
  6. }
  7. p + p {
  8. margin-top: 1.5em;
  9. }
  10. li > p {
  11. width: calc(100% - 2em);
  12. }
  13. table {
  14. margin-top: 1em;
  15. margin-bottom: 1em;
  16. }
  17. .footnote {
  18. font-size: smaller;
  19. vertical-align: baseline;
  20. position: relative;
  21. top: -0.4em;
  22. }
  23. .footnotes {
  24. font-size: smaller;
  25. }
  26. pre {
  27. background: rgb(143, 140, 140);
  28. padding: 1em;
  29. }
  30. pre>code {
  31. white-space: inherit;
  32. background: none;
  33. }
  34. pre.prettyprint {
  35. margin-top: 2em !important;
  36. margin-bottom: 2em !important;
  37. }
  38. pre.prettyprint li {
  39. white-space: pre;
  40. }
  41. pre.prettyprint code, .dos {
  42. color: #CCC;
  43. font-family: "Lucida Console", Monaco, monospace;
  44. display: block;
  45. }
  46. /* to handle long words in paragraph */
  47. p code {
  48. word-break: break-word;
  49. white-space: normal;
  50. }
  51. div[data-diagram] {
  52. height: 100%;
  53. }
  54. .spread {
  55. display: flex;
  56. text-align: center;
  57. margin: 2em auto 3em;
  58. }
  59. .spread div[data-diagram] {
  60. height: 150px;
  61. }
  62. .spread>div {
  63. flex: 1 1 100%;
  64. }
  65. .spread .code {
  66. font-family: monospace;
  67. }
  68. .spread .code>div {
  69. text-align: left;
  70. }
  71. #c {
  72. position: absolute;
  73. top: 0;
  74. left: 0;
  75. width: 100vw;
  76. height: 100vh;
  77. z-index: -100;
  78. }
  79. .border {
  80. border: 1px solid black;
  81. }
  82. .lesson-comment-notes {
  83. padding: 1em;
  84. margin: 1em;
  85. background: #DDD;
  86. color: red;
  87. }
  88. .threejs_navbar>div,
  89. .lesson-title,
  90. .lesson-comments,
  91. .lesson-comment-sep,
  92. .lesson-main>* {
  93. margin: 0 auto 1em;
  94. max-width: 700px;
  95. width: calc(100% - 40px);
  96. }
  97. .lesson-main>h1:not(:first-child),
  98. .lesson-main>h2:not(:first-child),
  99. .lesson-main>h3:not(:first-child),
  100. .lesson-main>h4:not(:first-child),
  101. .lesson-main>h5:not(:first-child),
  102. .lesson-main>h6:not(:first-child) {
  103. margin-top: 1.66em;
  104. }
  105. .lesson-main>.threejs_example_container {
  106. max-width: 90%;
  107. }
  108. .lesson-main>img {
  109. width: unset;
  110. }
  111. .threejs_example {
  112. width: 100%;
  113. height: 500px;
  114. }
  115. .threejs_header {
  116. background-image: url(/threejs/lessons/resources/banner-00.jpg);
  117. background-size: cover;
  118. background-position: center, center;
  119. padding: 1em;
  120. text-align: center;
  121. position: relative;
  122. }
  123. .threejs_header h1 {
  124. font-size: 5vw;
  125. margin: 0;
  126. background-image: url(/threejs/lessons/resources/logo.png);
  127. background-size: contain;
  128. background-position: center center;
  129. background-repeat: no-repeat;
  130. font-weight: bold;
  131. color: black;
  132. /*
  133. text-shadow: 0px 0px 15px #fff,
  134. 0px 0px 5px #fff,
  135. 0px 0px 10px #fff;
  136. */
  137. }
  138. .threejs_header a {
  139. color: rgba(0, 0, 0, 0);
  140. text-decoration: none;
  141. }
  142. .threejs_navbar {
  143. background: black;
  144. color: white;
  145. }
  146. .threejs_navbar a {
  147. color: white;
  148. }
  149. .threejs_navbar>div {
  150. margin: 0 auto;
  151. display: flex;
  152. justify-content: space-between;
  153. align-items: center;
  154. }
  155. .threejs_navbar>div>* {
  156. display: block;
  157. margin: .25em 0;
  158. }
  159. .threejs_navbar select {
  160. background: #444;
  161. border: none;
  162. font-size: large;
  163. color: white;
  164. }
  165. .home-lang select {
  166. font-size: large;
  167. }
  168. .checkerboard {
  169. background-color: #404040;
  170. background-image:
  171. linear-gradient(45deg, #808080 25%, transparent 25%),
  172. linear-gradient(-45deg, #808080 25%, transparent 25%),
  173. linear-gradient(45deg, transparent 75%, #808080 75%),
  174. linear-gradient(-45deg, transparent 75%, #808080 75%);
  175. background-size: 20px 20px;
  176. background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  177. }
  178. .fullscreen {
  179. position: fixed !important;
  180. left: 0;
  181. top: 0;
  182. width: 100vw !important;
  183. height: 100vh !important;
  184. z-index: 100;
  185. }
  186. .lesson-main>blockquote {
  187. background-color: #DEF;
  188. padding: 1em;
  189. }
  190. .lesson-title {
  191. margin-top: 3em;
  192. margin-bottom: 2em;
  193. }
  194. .lesson-sidebar {
  195. font-size: small;
  196. columns: 220px;
  197. padding: 1em;
  198. column-rule: dashed 1px #CCC;
  199. background: #eee;
  200. margin-bottom: 1em;
  201. }
  202. .lesson-sidebar>ul>li {
  203. line-height: 1.3em;
  204. }
  205. .lesson-sidebar ul {
  206. line-height: 1.3em;
  207. margin-bottom: 1em;
  208. }
  209. .lesson-sidebar ul {
  210. list-style-type: none;
  211. padding-left: 1em;
  212. text-indent: -1em;
  213. }
  214. h1, h2, h3, h4 {
  215. font-family: sans-serif;
  216. line-height: 1.2;
  217. }
  218. h3 {
  219. font-size: medium;
  220. }
  221. code {
  222. color: black;
  223. font-family: monospace;
  224. background-color: #ddd;
  225. padding: 0.1em 0.2em 0.1em 0.2em;
  226. border-radius: 0.5em;
  227. white-space: nowrap;
  228. }
  229. .threejs_table_div_center {
  230. text-align: center;
  231. }
  232. .threejs_table_center {
  233. margin-left: auto;
  234. margin-right: auto;
  235. }
  236. .threejs_center {
  237. margin-left: auto;
  238. margin-top: 1em;
  239. margin-bottom: 1em;
  240. margin-right: auto;
  241. display: block;
  242. text-align: center;
  243. max-width: 95%;
  244. }
  245. .threejs_center>img,
  246. .threejs_center>object {
  247. max-width: 100%;
  248. }
  249. .threejs_image>img {
  250. width: 100%;
  251. display: block;
  252. }
  253. .threejs_math {
  254. margin-left: auto;
  255. margin-right: auto;
  256. display: inline-block;
  257. text-align: left;
  258. }
  259. .threejs_math_center {
  260. display: block;
  261. text-align: center;
  262. }
  263. .hcenter {
  264. display: -webkit-box;
  265. -webkit-box-orient: horizontal;
  266. -webkit-box-pack: center;
  267. -webkit-box-align: center;
  268. display: -moz-box;
  269. -moz-box-orient: horizontal;
  270. -moz-box-pack: center;
  271. -moz-box-align: center;
  272. display: box;
  273. box-orient: horizontal;
  274. box-pack: center;
  275. box-align: center;
  276. }
  277. table.vertex_table {
  278. border: 1px solid black;
  279. border-collapse: collapse;
  280. font-family: monospace;
  281. font-size: small;
  282. }
  283. table.vertex_table th {
  284. background-color: #88ccff;
  285. padding-right: 1em;
  286. padding-left: 1em;
  287. }
  288. table.vertex_table td {
  289. border: 1px solid black;
  290. text-align: right;
  291. padding-right: 1em;
  292. padding-left: 1em;
  293. }
  294. iframe {
  295. display: block;
  296. }
  297. iframe.body {
  298. height: 100vh;
  299. }
  300. iframe.threejs_example, iframe.threejs_diagram {
  301. border: none;
  302. margin-left: auto;
  303. margin-right: auto;
  304. display: block;
  305. }
  306. iframe.threejs_example {
  307. background: black;
  308. }
  309. iframe.noborder {
  310. border: none !important;
  311. }
  312. .threejs_example_container>div {
  313. border: 1px solid black;
  314. margin: 0 auto;
  315. }
  316. iframe.external_diagram {
  317. border: none;
  318. margin-left: auto;
  319. margin-right: auto;
  320. display: block;
  321. }
  322. div.threejs_bottombar {
  323. border: 1px solid #000;
  324. background-color: #def;
  325. padding: 1em;
  326. width: calc(100% - 80px);
  327. }
  328. div.threejs_bottombar>h3 {
  329. font-size: x-large;
  330. font-weight: bold;
  331. margin-bottom: 1em;
  332. }
  333. div.threejs_bottombar code {
  334. background-color: #ccc;
  335. }
  336. /* --- Prettify --- */
  337. pre.prettyprint .nocode { background-color: none; color: #FFF }
  338. pre.prettyprint .str { color: #b9ca4a } /* string */
  339. pre.prettyprint .kwd { color: #c397d8 } /* keyword */
  340. pre.prettyprint .com { color: #f3efb2 } /* comment */
  341. pre.prettyprint .typ { color: #7aa6da } /* type */
  342. pre.prettyprint .lit { color: #45e7a6 } /* literal */
  343. pre.prettyprint .pun { color: #7ecce0 } /* punctuation */
  344. pre.prettyprint .pln { color: #eaeaea } /* plaintext */
  345. pre.prettyprint .tag { color: #d54e53 } /* html/xml tag */
  346. pre.prettyprint .atn { color: #e78c45 } /* attribute name */
  347. pre.prettyprint .atv { color: #70c0b1 } /* attribute value */
  348. pre.prettyprint .dec { color: #e78c45 } /* decimal */
  349. pre.prettyprint .var { color: #d54e53 } /* variable name */
  350. pre.prettyprint .fun { color: #7aa6da } /* function name */
  351. pre.prettyprint ul.modifiedlines {
  352. list-style-type: none;
  353. padding-left: 0;
  354. }
  355. pre.prettyprint ul.modifiedlines li.linemodified {
  356. list-style-type: none;
  357. background-color: #324840;
  358. }
  359. pre.prettyprint ul.modifiedlines li.linedeleted {
  360. list-style-type: none;
  361. background-color: #4c1414;
  362. text-decoration: line-through;
  363. }
  364. pre.prettyprint ul.modifiedlines li.lineadded {
  365. list-style-type: none;
  366. background-color: #3f4463;
  367. }
  368. pre.prettyprint, code.prettyprint, .dos {
  369. color: #FFF;
  370. background: #222;
  371. border: 1px solid #000;
  372. box-shadow: 10px 10px 0px #ccc;
  373. font-size: 9pt;
  374. font-family: "Lucida Console", Monaco, monospace;
  375. margin: auto;
  376. padding: 1em;
  377. text-align: left; /* override justify on body */
  378. /* this was disabled until 2016-08-26 but I don't know why */
  379. overflow: auto; /* allow scroll bar in case of long lines - goes together with white-space: nowrap! */
  380. white-space: pre; /* was nowrap, prevent line wrapping */
  381. line-height: 1.5em;
  382. width: calc(100% - 80px);
  383. }
  384. .dos {
  385. line-height: 1;
  386. }
  387. pre.prettyprint.lighttheme, code.prettyprint.lighttheme {
  388. color: #222;
  389. background: #fff;
  390. border: 1px solid #888;
  391. box-shadow: none;
  392. }
  393. pre.prettyprint.lighttheme .str { color: #183691; } /* string content */
  394. pre.prettyprint.lighttheme .kwd { color: #a71d5d; } /* keyword */
  395. pre.prettyprint.lighttheme .com { color: #969896; } /* comment */
  396. pre.prettyprint.lighttheme .typ { color: #0086b3; } /* type name */
  397. pre.prettyprint.lighttheme .lit { color: #0086b3; } /* literal value */
  398. pre.prettyprint.lighttheme .pun { color: #333; } /* punctuation */
  399. pre.prettyprint.lighttheme .opn { color: #333; } /* lisp open bracket */
  400. pre.prettyprint.lighttheme .clo { color: #333; } /* lisp close bracket */
  401. pre.prettyprint.lighttheme .tag { color: #000080; } /* markup tag name */
  402. pre.prettyprint.lighttheme .atn { color: #795da3; } /* markup attribute name */
  403. pre.prettyprint.lighttheme .atv { color: #183691; } /* markup attribute value */
  404. pre.prettyprint.lighttheme .dec { color: #333; } /* declaration */
  405. pre.prettyprint.lighttheme .var { color: #008080; } /* variable name */
  406. pre.prettyprint.lighttheme .fun { color: #900; } /* function name */
  407. @media print {
  408. pre.prettyprint .str, code.prettyprint .str{color:#060}
  409. pre.prettyprint .kwd, code.prettyprint .kwd{color:#006;font-weight:bold}
  410. pre.prettyprint .com, code.prettyprint .com{color:#600;font-style:italic}
  411. pre.prettyprint .typ, code.prettyprint .typ{color:#404;font-weight:bold}
  412. pre.prettyprint .lit, code.prettyprint .lit{color:#044}
  413. pre.prettyprint .pun, code.prettyprint .pun{color:#440}
  414. pre.prettyprint .pln, code.prettyprint .pln{color:#000}
  415. pre.prettyprint .tag, code.prettyprint .tag{color:#006;font-weight:bold}
  416. pre.prettyprint .atn, code.prettyprint .atn{color:#404}
  417. pre.prettyprint .atv, code.prettyprint .atv{color:#060}
  418. pre.prettyprint, code.prettyprint {
  419. color: #000;
  420. background: #EEE;
  421. font-size: 8pt;
  422. font-family: "Lucida Console", Monaco, monospace;
  423. width: 95%;
  424. margin: auto;
  425. padding: 1em;
  426. text-align: left; /* override justify on body */
  427. overflow: visible;
  428. white-space: pre; /* was nowrap, prevent line wrapping */
  429. line-height: 1.5;
  430. }
  431. pre.prettyprint ul.modifiedlines li.linemodified {
  432. list-style-type: none;
  433. background-color: #DDD;
  434. }
  435. pre.prettyprint ul.modifiedlines li.linedeleted {
  436. list-style-type: none;
  437. background-color: #CCC;
  438. text-decoration: line-through;
  439. }
  440. pre.prettyprint ul.modifiedlines li.lineadded {
  441. list-style-type: none;
  442. background-color: #EEE;
  443. }
  444. body {
  445. margin: 10mm;
  446. }
  447. .doubleSpace p {
  448. line-height: 2.5;
  449. font-size: x-large;
  450. }
  451. .doubleSpace pre.prettyprint {
  452. font-size: 14pt;
  453. }
  454. .threejs_navbar,
  455. .lesson-comment-sep,
  456. .lesson-sidebar,
  457. .lesson-comments {
  458. display: none;
  459. }
  460. }
  461. @media (max-width: 720px) {
  462. body {
  463. font-size: 16px;
  464. }
  465. h1 {
  466. font-size: 24px;
  467. }
  468. .threejs_example {
  469. max-height: 400px;
  470. }
  471. .threejs_example_container>div {
  472. max-width: 95%;
  473. }
  474. .threejs_diagram_container iframe {
  475. max-width: 95%;
  476. }
  477. iframe.background {
  478. max-width: 100%;
  479. }
  480. }
  481. @media (prefers-color-scheme: dark) {
  482. html {
  483. scrollbar-color: hsl(0, 0%, 35%) hsl(0, 0%, 13%);
  484. }
  485. body {
  486. background: #333;
  487. color: #CCC;
  488. }
  489. a {
  490. color: #56d3fd;
  491. }
  492. pre.prettyprint, code.prettyprint, .dos {
  493. box-shadow: 10px 10px 0px #292929;
  494. }
  495. code {
  496. background: #666;
  497. color: #CCC;
  498. }
  499. img {
  500. background: #DDD;
  501. }
  502. img[src$=".svg"] {
  503. filter: invert(1) hue-rotate(180deg);
  504. background: none;
  505. }
  506. .noinvertdark {
  507. filter: none !important;
  508. }
  509. .nobg {
  510. background: none;
  511. }
  512. .lesson-sidebar {
  513. background: #222;
  514. }
  515. .lesson-main>blockquote {
  516. background-color: #1b1b44;
  517. }
  518. div.threejs_bottombar {
  519. background-color: #1b1b44;
  520. }
  521. div.threejs_bottombar code {
  522. background-color: #348;
  523. }
  524. .lesson-comment-notes {
  525. background: #222;
  526. }
  527. }