lesson.css 12 KB

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