lesson.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  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 100%;
  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. .threejs_center>object {
  205. max-width: 100%;
  206. }
  207. .threejs_image>img {
  208. width: 100%;
  209. display: block;
  210. }
  211. .threejs_math {
  212. margin-left: auto;
  213. margin-right: auto;
  214. display: inline-block;
  215. text-align: left;
  216. }
  217. .threejs_math_center {
  218. display: block;
  219. text-align: center;
  220. }
  221. .hcenter {
  222. display: -webkit-box;
  223. -webkit-box-orient: horizontal;
  224. -webkit-box-pack: center;
  225. -webkit-box-align: center;
  226. display: -moz-box;
  227. -moz-box-orient: horizontal;
  228. -moz-box-pack: center;
  229. -moz-box-align: center;
  230. display: box;
  231. box-orient: horizontal;
  232. box-pack: center;
  233. box-align: center;
  234. }
  235. table.vertex_table {
  236. border: 1px solid black;
  237. border-collapse: collapse;
  238. font-family: monospace;
  239. font-size: small;
  240. }
  241. table.vertex_table th {
  242. background-color: #88ccff;
  243. padding-right: 1em;
  244. padding-left: 1em;
  245. }
  246. table.vertex_table td {
  247. border: 1px solid black;
  248. text-align: right;
  249. padding-right: 1em;
  250. padding-left: 1em;
  251. }
  252. iframe {
  253. display: block;
  254. }
  255. iframe.body {
  256. height: 100vh;
  257. }
  258. iframe.threejs_example, iframe.threejs_diagram {
  259. border: none;
  260. margin-left: auto;
  261. margin-right: auto;
  262. display: block;
  263. }
  264. iframe.threejs_example {
  265. border: 1px solid black;
  266. }
  267. iframe.noborder {
  268. border: none !important;
  269. }
  270. iframe.external_diagram {
  271. border: none;
  272. margin-left: auto;
  273. margin-right: auto;
  274. display: block;
  275. }
  276. div.threejs_bottombar {
  277. border: 1px solid #000;
  278. background-color: #def;
  279. padding: 1em;
  280. width: calc(100% - 80px);
  281. }
  282. div.threejs_bottombar>h3 {
  283. font-size: x-large;
  284. font-weight: bold;
  285. margin-bottom: 1em;
  286. }
  287. div.threejs_bottombar code {
  288. background-color: #ccc;
  289. }
  290. /* --- Prettify --- */
  291. pre.prettyprint .nocode { background-color: none; color: #FFF }
  292. pre.prettyprint .str { color: #b9ca4a } /* string */
  293. pre.prettyprint .kwd { color: #c397d8 } /* keyword */
  294. pre.prettyprint .com { color: #f3efb2 } /* comment */
  295. pre.prettyprint .typ { color: #7aa6da } /* type */
  296. pre.prettyprint .lit { color: #45e7a6 } /* literal */
  297. pre.prettyprint .pun { color: #7ecce0 } /* punctuation */
  298. pre.prettyprint .pln { color: #eaeaea } /* plaintext */
  299. pre.prettyprint .tag { color: #d54e53 } /* html/xml tag */
  300. pre.prettyprint .atn { color: #e78c45 } /* attribute name */
  301. pre.prettyprint .atv { color: #70c0b1 } /* attribute value */
  302. pre.prettyprint .dec { color: #e78c45 } /* decimal */
  303. pre.prettyprint .var { color: #d54e53 } /* variable name */
  304. pre.prettyprint .fun { color: #7aa6da } /* function name */
  305. pre.prettyprint ul.modifiedlines {
  306. list-style-type: none;
  307. padding-left: 0;
  308. }
  309. pre.prettyprint ul.modifiedlines li.linemodified {
  310. list-style-type: none;
  311. background-color: #324840;
  312. }
  313. pre.prettyprint ul.modifiedlines li.linedeleted {
  314. list-style-type: none;
  315. background-color: #4c1414;
  316. text-decoration: line-through;
  317. }
  318. pre.prettyprint ul.modifiedlines li.lineadded {
  319. list-style-type: none;
  320. background-color: #3f4463;
  321. }
  322. pre.prettyprint, code.prettyprint {
  323. color: #FFF;
  324. background: #222;
  325. border: 1px solid #000;
  326. box-shadow: 10px 10px 0px #ccc;
  327. font-size: 9pt;
  328. font-family: "Lucida Console", Monaco, monospace;
  329. margin: auto;
  330. padding: 1em;
  331. text-align: left; /* override justify on body */
  332. /* this was disabled until 2016-08-26 but I don't know why */
  333. overflow: auto; /* allow scroll bar in case of long lines - goes together with white-space: nowrap! */
  334. white-space: pre; /* was nowrap, prevent line wrapping */
  335. line-height: 1.5em;
  336. width: calc(100% - 80px);
  337. }
  338. pre.prettyprint.lighttheme, code.prettyprint.lighttheme {
  339. color: #222;
  340. background: #fff;
  341. border: 1px solid #888;
  342. box-shadow: none;
  343. }
  344. pre.prettyprint.lighttheme .str { color: #183691; } /* string content */
  345. pre.prettyprint.lighttheme .kwd { color: #a71d5d; } /* keyword */
  346. pre.prettyprint.lighttheme .com { color: #969896; } /* comment */
  347. pre.prettyprint.lighttheme .typ { color: #0086b3; } /* type name */
  348. pre.prettyprint.lighttheme .lit { color: #0086b3; } /* literal value */
  349. pre.prettyprint.lighttheme .pun { color: #333; } /* punctuation */
  350. pre.prettyprint.lighttheme .opn { color: #333; } /* lisp open bracket */
  351. pre.prettyprint.lighttheme .clo { color: #333; } /* lisp close bracket */
  352. pre.prettyprint.lighttheme .tag { color: #000080; } /* markup tag name */
  353. pre.prettyprint.lighttheme .atn { color: #795da3; } /* markup attribute name */
  354. pre.prettyprint.lighttheme .atv { color: #183691; } /* markup attribute value */
  355. pre.prettyprint.lighttheme .dec { color: #333; } /* declaration */
  356. pre.prettyprint.lighttheme .var { color: #008080; } /* variable name */
  357. pre.prettyprint.lighttheme .fun { color: #900; } /* function name */
  358. @media print {
  359. pre.prettyprint .str, code.prettyprint .str{color:#060}
  360. pre.prettyprint .kwd, code.prettyprint .kwd{color:#006;font-weight:bold}
  361. pre.prettyprint .com, code.prettyprint .com{color:#600;font-style:italic}
  362. pre.prettyprint .typ, code.prettyprint .typ{color:#404;font-weight:bold}
  363. pre.prettyprint .lit, code.prettyprint .lit{color:#044}
  364. pre.prettyprint .pun, code.prettyprint .pun{color:#440}
  365. pre.prettyprint .pln, code.prettyprint .pln{color:#000}
  366. pre.prettyprint .tag, code.prettyprint .tag{color:#006;font-weight:bold}
  367. pre.prettyprint .atn, code.prettyprint .atn{color:#404}
  368. pre.prettyprint .atv, code.prettyprint .atv{color:#060}
  369. pre.prettyprint, code.prettyprint {
  370. color: #000;
  371. background: #EEE;
  372. font-size: 8pt;
  373. font-family: "Lucida Console", Monaco, monospace;
  374. width: 95%;
  375. margin: auto;
  376. padding: 1em;
  377. text-align: left; /* override justify on body */
  378. overflow: visible;
  379. white-space: pre; /* was nowrap, prevent line wrapping */
  380. line-height: 1.5;
  381. }
  382. pre.prettyprint ul.modifiedlines li.linemodified {
  383. list-style-type: none;
  384. background-color: #DDD;
  385. }
  386. pre.prettyprint ul.modifiedlines li.linedeleted {
  387. list-style-type: none;
  388. background-color: #CCC;
  389. text-decoration: line-through;
  390. }
  391. pre.prettyprint ul.modifiedlines li.lineadded {
  392. list-style-type: none;
  393. background-color: #EEE;
  394. }
  395. body {
  396. margin: 10mm;
  397. }
  398. .doubleSpace p {
  399. line-height: 2.5;
  400. font-size: x-large;
  401. }
  402. .doubleSpace pre.prettyprint {
  403. font-size: 14pt;
  404. }
  405. .threejs_navbar,
  406. .lesson-comment-sep,
  407. .lesson-sidebar,
  408. .lesson-comments {
  409. display: none;
  410. }
  411. }
  412. @media (max-width: 720px) {
  413. body {
  414. font-size: 16px;
  415. }
  416. h1 {
  417. font-size: 24px;
  418. }
  419. .threejs_example {
  420. max-height: 400px;
  421. }
  422. iframe {
  423. max-width: 95%;
  424. }
  425. iframe.background {
  426. max-width: 100%;
  427. }
  428. }