lesson.css 12 KB

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