lesson.css 11 KB

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