lesson.css 11 KB

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