lesson.css 12 KB

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