lesson.css 10 KB

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