lesson.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  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. .color {
  174. padding: 0.25em;
  175. border-radius: 0.5em;
  176. color: black;
  177. }
  178. .dark-color {
  179. padding: 0.25em;
  180. border-radius: 0.5em;
  181. color: white;
  182. }
  183. .checkerboard {
  184. background-color: #404040;
  185. background-image:
  186. linear-gradient(45deg, #808080 25%, transparent 25%),
  187. linear-gradient(-45deg, #808080 25%, transparent 25%),
  188. linear-gradient(45deg, transparent 75%, #808080 75%),
  189. linear-gradient(-45deg, transparent 75%, #808080 75%);
  190. background-size: 20px 20px;
  191. background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  192. }
  193. .fullscreen {
  194. position: fixed !important;
  195. left: 0;
  196. top: 0;
  197. width: 100vw !important;
  198. height: 100vh !important;
  199. z-index: 100;
  200. }
  201. .lesson-main>blockquote {
  202. background-color: #DEF;
  203. padding: 1em;
  204. }
  205. .lesson-title {
  206. margin-top: 3em;
  207. margin-bottom: 2em;
  208. }
  209. .lesson-sidebar {
  210. font-size: small;
  211. columns: 220px;
  212. padding: 1em;
  213. column-rule: dashed 1px #CCC;
  214. background: #eee;
  215. margin-bottom: 1em;
  216. }
  217. .lesson-sidebar>ul>li {
  218. line-height: 1.3em;
  219. }
  220. .lesson-sidebar ul {
  221. line-height: 1.3em;
  222. margin-bottom: 1em;
  223. }
  224. .lesson-sidebar ul {
  225. list-style-type: none;
  226. padding-left: 1em;
  227. text-indent: -1em;
  228. }
  229. h1, h2, h3, h4 {
  230. font-family: sans-serif;
  231. line-height: 1.2;
  232. }
  233. h3 {
  234. font-size: medium;
  235. }
  236. code {
  237. color: black;
  238. font-family: monospace;
  239. background-color: #ddd;
  240. padding: 0.1em 0.2em 0.1em 0.2em;
  241. border-radius: 0.5em;
  242. white-space: nowrap;
  243. }
  244. .threejs_table_div_center {
  245. text-align: center;
  246. }
  247. .threejs_table_center {
  248. margin-left: auto;
  249. margin-right: auto;
  250. }
  251. .threejs_center {
  252. margin-left: auto;
  253. margin-top: 1em;
  254. margin-bottom: 1em;
  255. margin-right: auto;
  256. display: block;
  257. text-align: center;
  258. max-width: 95%;
  259. }
  260. .threejs_center>img,
  261. .threejs_center>object {
  262. max-width: 100%;
  263. }
  264. .threejs_image>img {
  265. width: 100%;
  266. display: block;
  267. }
  268. .threejs_math {
  269. margin-left: auto;
  270. margin-right: auto;
  271. display: inline-block;
  272. text-align: left;
  273. }
  274. .threejs_math_center {
  275. display: block;
  276. text-align: center;
  277. }
  278. .hcenter {
  279. display: -webkit-box;
  280. -webkit-box-orient: horizontal;
  281. -webkit-box-pack: center;
  282. -webkit-box-align: center;
  283. display: -moz-box;
  284. -moz-box-orient: horizontal;
  285. -moz-box-pack: center;
  286. -moz-box-align: center;
  287. display: box;
  288. box-orient: horizontal;
  289. box-pack: center;
  290. box-align: center;
  291. }
  292. table.vertex_table {
  293. border: 1px solid black;
  294. border-collapse: collapse;
  295. font-family: monospace;
  296. font-size: small;
  297. }
  298. table.vertex_table th {
  299. background-color: #88ccff;
  300. padding-right: 1em;
  301. padding-left: 1em;
  302. }
  303. table.vertex_table td {
  304. border: 1px solid black;
  305. text-align: right;
  306. padding-right: 1em;
  307. padding-left: 1em;
  308. }
  309. iframe {
  310. display: block;
  311. }
  312. iframe.body {
  313. height: 100vh;
  314. }
  315. iframe.threejs_example, iframe.threejs_diagram {
  316. border: none;
  317. margin-left: auto;
  318. margin-right: auto;
  319. display: block;
  320. }
  321. iframe.threejs_example {
  322. background: black;
  323. }
  324. iframe.noborder {
  325. border: none !important;
  326. }
  327. .threejs_example_container>div {
  328. border: 1px solid black;
  329. margin: 0 auto;
  330. }
  331. iframe.external_diagram {
  332. border: none;
  333. margin-left: auto;
  334. margin-right: auto;
  335. display: block;
  336. }
  337. div.threejs_bottombar {
  338. border: 1px solid #000;
  339. background-color: #def;
  340. padding: 1em;
  341. width: calc(100% - 80px);
  342. }
  343. div.threejs_bottombar>h3 {
  344. font-size: x-large;
  345. font-weight: bold;
  346. margin-bottom: 1em;
  347. }
  348. div.threejs_bottombar code {
  349. background-color: #ccc;
  350. }
  351. /* --- Prettify --- */
  352. pre.prettyprint .nocode { background-color: none; color: #FFF }
  353. pre.prettyprint .str { color: #b9ca4a } /* string */
  354. pre.prettyprint .kwd { color: #c397d8 } /* keyword */
  355. pre.prettyprint .com { color: #f3efb2 } /* comment */
  356. pre.prettyprint .typ { color: #7aa6da } /* type */
  357. pre.prettyprint .lit { color: #45e7a6 } /* literal */
  358. pre.prettyprint .pun { color: #7ecce0 } /* punctuation */
  359. pre.prettyprint .pln { color: #eaeaea } /* plaintext */
  360. pre.prettyprint .tag { color: #d54e53 } /* html/xml tag */
  361. pre.prettyprint .atn { color: #e78c45 } /* attribute name */
  362. pre.prettyprint .atv { color: #70c0b1 } /* attribute value */
  363. pre.prettyprint .dec { color: #e78c45 } /* decimal */
  364. pre.prettyprint .var { color: #d54e53 } /* variable name */
  365. pre.prettyprint .fun { color: #7aa6da } /* function name */
  366. foo{ color: #FF8080}
  367. pre.prettyprint ul.modifiedlines {
  368. list-style-type: none;
  369. padding-left: 0;
  370. }
  371. pre.prettyprint ul.modifiedlines li.linemodified {
  372. list-style-type: none;
  373. background-color: #324840;
  374. }
  375. pre.prettyprint ul.modifiedlines li.linedeleted {
  376. list-style-type: none;
  377. background-color: #4c1414;
  378. text-decoration: line-through;
  379. }
  380. pre.prettyprint ul.modifiedlines li.lineadded {
  381. list-style-type: none;
  382. background-color: #3f4463;
  383. }
  384. pre.prettyprint, code.prettyprint, .dos {
  385. color: #FFF;
  386. background: #222;
  387. border: 1px solid #000;
  388. box-shadow: 10px 10px 0px #ccc;
  389. font-size: 9pt;
  390. font-family: "Lucida Console", Monaco, monospace;
  391. margin: auto;
  392. padding: 1em;
  393. text-align: left; /* override justify on body */
  394. /* this was disabled until 2016-08-26 but I don't know why */
  395. overflow: auto; /* allow scroll bar in case of long lines - goes together with white-space: nowrap! */
  396. white-space: pre; /* was nowrap, prevent line wrapping */
  397. line-height: 1.5em;
  398. width: calc(100% - 80px);
  399. }
  400. .dos {
  401. line-height: 1;
  402. }
  403. pre.prettyprint.lighttheme, code.prettyprint.lighttheme {
  404. color: #222;
  405. background: #fff;
  406. border: 1px solid #888;
  407. box-shadow: none;
  408. }
  409. pre.prettyprint.lighttheme .str { color: #183691; } /* string content */
  410. pre.prettyprint.lighttheme .kwd { color: #a71d5d; } /* keyword */
  411. pre.prettyprint.lighttheme .com { color: #969896; } /* comment */
  412. pre.prettyprint.lighttheme .typ { color: #0086b3; } /* type name */
  413. pre.prettyprint.lighttheme .lit { color: #0086b3; } /* literal value */
  414. pre.prettyprint.lighttheme .pun { color: #333; } /* punctuation */
  415. pre.prettyprint.lighttheme .opn { color: #333; } /* lisp open bracket */
  416. pre.prettyprint.lighttheme .clo { color: #333; } /* lisp close bracket */
  417. pre.prettyprint.lighttheme .tag { color: #000080; } /* markup tag name */
  418. pre.prettyprint.lighttheme .atn { color: #795da3; } /* markup attribute name */
  419. pre.prettyprint.lighttheme .atv { color: #183691; } /* markup attribute value */
  420. pre.prettyprint.lighttheme .dec { color: #333; } /* declaration */
  421. pre.prettyprint.lighttheme .var { color: #008080; } /* variable name */
  422. pre.prettyprint.lighttheme .fun { color: #900; } /* function name */
  423. @media print {
  424. pre.prettyprint .str, code.prettyprint .str{color:#060}
  425. pre.prettyprint .kwd, code.prettyprint .kwd{color:#006;font-weight:bold}
  426. pre.prettyprint .com, code.prettyprint .com{color:#600;font-style:italic}
  427. pre.prettyprint .typ, code.prettyprint .typ{color:#404;font-weight:bold}
  428. pre.prettyprint .lit, code.prettyprint .lit{color:#044}
  429. pre.prettyprint .pun, code.prettyprint .pun{color:#440}
  430. pre.prettyprint .pln, code.prettyprint .pln{color:#000}
  431. pre.prettyprint .tag, code.prettyprint .tag{color:#006;font-weight:bold}
  432. pre.prettyprint .atn, code.prettyprint .atn{color:#404}
  433. pre.prettyprint .atv, code.prettyprint .atv{color:#060}
  434. pre.prettyprint, code.prettyprint {
  435. color: #000;
  436. background: #EEE;
  437. font-size: 8pt;
  438. font-family: "Lucida Console", Monaco, monospace;
  439. width: 95%;
  440. margin: auto;
  441. padding: 1em;
  442. text-align: left; /* override justify on body */
  443. overflow: visible;
  444. white-space: pre; /* was nowrap, prevent line wrapping */
  445. line-height: 1.5;
  446. }
  447. pre.prettyprint ul.modifiedlines li.linemodified {
  448. list-style-type: none;
  449. background-color: #DDD;
  450. }
  451. pre.prettyprint ul.modifiedlines li.linedeleted {
  452. list-style-type: none;
  453. background-color: #CCC;
  454. text-decoration: line-through;
  455. }
  456. pre.prettyprint ul.modifiedlines li.lineadded {
  457. list-style-type: none;
  458. background-color: #EEE;
  459. }
  460. body {
  461. margin: 10mm;
  462. }
  463. .doubleSpace p {
  464. line-height: 2.5;
  465. font-size: x-large;
  466. }
  467. .doubleSpace pre.prettyprint {
  468. font-size: 14pt;
  469. }
  470. .threejs_navbar,
  471. .lesson-comment-sep,
  472. .lesson-sidebar,
  473. .lesson-comments {
  474. display: none;
  475. }
  476. }
  477. @media (max-width: 720px) {
  478. body {
  479. font-size: 16px;
  480. }
  481. h1 {
  482. font-size: 24px;
  483. }
  484. .threejs_example {
  485. max-height: 400px;
  486. }
  487. .threejs_example_container>div {
  488. max-width: 95%;
  489. }
  490. .threejs_diagram_container iframe {
  491. max-width: 95%;
  492. }
  493. iframe.background {
  494. max-width: 100%;
  495. }
  496. }
  497. @media (prefers-color-scheme: dark) {
  498. html {
  499. scrollbar-color: hsl(0, 0%, 35%) hsl(0, 0%, 13%);
  500. }
  501. body {
  502. background: #333;
  503. color: #CCC;
  504. }
  505. a {
  506. color: #56d3fd;
  507. }
  508. pre.prettyprint, code.prettyprint, .dos {
  509. box-shadow: 10px 10px 0px #292929;
  510. }
  511. code {
  512. background: #666;
  513. color: #CCC;
  514. }
  515. img {
  516. background: #DDD;
  517. }
  518. img[src$=".svg"] {
  519. filter: invert(1) hue-rotate(180deg);
  520. background: none;
  521. }
  522. .noinvertdark {
  523. filter: none !important;
  524. }
  525. .nobg {
  526. background: none;
  527. }
  528. .lesson-sidebar {
  529. background: #222;
  530. }
  531. .lesson-main>blockquote {
  532. background-color: #1b1b44;
  533. }
  534. div.threejs_bottombar {
  535. background-color: #1b1b44;
  536. }
  537. div.threejs_bottombar code {
  538. background-color: #348;
  539. }
  540. .lesson-comment-notes {
  541. background: #222;
  542. }
  543. input[type=text] {
  544. background: #444;
  545. color: white;
  546. border: none;
  547. padding: 3px;
  548. }
  549. }