lesson.css 12 KB

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