my blog lives here now
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

527 lines
9.0 KiB

2 years ago
  1. @import "vars.scss";
  2. @mixin center-that-bitch {
  3. display: flex;
  4. flex-direction: column;
  5. align-items: center;
  6. }
  7. html {
  8. min-height: 100%;
  9. height: 100%;
  10. max-width: 100%;
  11. margin: 0;
  12. overflow-x: clip;
  13. }
  14. body {
  15. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  16. width: 100%;
  17. @include center-that-bitch;
  18. margin: 0;
  19. color: $bluegray-900;
  20. font-size: $font-size;
  21. overflow-x: clip;
  22. }
  23. body > header {
  24. background-color: $purple-600;
  25. display: flex;
  26. height: $nav-height;
  27. width: 100%;
  28. z-index: 999;
  29. position: fixed;
  30. justify-content: space-between;
  31. align-items: center;
  32. padding-left: 1em;
  33. padding-right: 1em;
  34. border-bottom: 3px solid $purple-700;
  35. box-sizing: border-box;
  36. div, nav > a {
  37. height: $nav-height;
  38. padding-left: 0.3em;
  39. padding-right: 0.3em;
  40. display: flex;
  41. align-items: center;
  42. }
  43. div:hover, nav > a:hover {
  44. background-color: $purple-500;
  45. transition: background-color 0.3s ease-in-out;
  46. }
  47. a {
  48. color: white;
  49. font-size: $font-size * 1.2;
  50. text-decoration: none;
  51. }
  52. nav {
  53. display: flex;
  54. align-items: center;
  55. gap: 0.5em;
  56. }
  57. }
  58. @mixin left-bordered-block($color) {
  59. padding-left: 1em;
  60. padding-top: 0.2em;
  61. padding-bottom: 0.2em;
  62. border-left: 5px dashed $color;
  63. }
  64. @mixin material {
  65. padding: 1em;
  66. margin-top: 1em;
  67. margin-bottom: 1em;
  68. box-shadow: 2px 2px 6px black;
  69. border-radius: 10px;
  70. }
  71. main {
  72. max-width: 100ch;
  73. width: 100%;
  74. margin: 0px auto 0px auto;
  75. flex: 1 0 auto;
  76. padding: 2ch;
  77. padding-top: $nav-height;
  78. box-sizing: border-box;
  79. div#title h2 {
  80. display: none;
  81. }
  82. div#post-toc-container {
  83. aside#toc {
  84. display: none;
  85. }
  86. article {
  87. grid-column: 2;
  88. width: 100%;
  89. line-height: 1.5;
  90. }
  91. }
  92. div#post-info {
  93. font-style: italic;
  94. line-height: 1.2;
  95. @include left-bordered-block($bluegray-500);
  96. }
  97. }
  98. div.warning {
  99. @include material;
  100. background-color: $red-200;
  101. }
  102. figure.wraparound {
  103. float: right;
  104. width: auto;
  105. margin-left: 2em;
  106. }
  107. figure {
  108. overflow-x: auto;
  109. overflow-y: clip;
  110. width: 100%;
  111. margin: auto;
  112. @include center-that-bitch;
  113. figcaption {
  114. margin-top: 0.3em;
  115. display: inline-block;
  116. text-align: center;
  117. }
  118. p {
  119. margin: 0;
  120. }
  121. }
  122. ol, ul {
  123. padding-left: 1.2em;
  124. li {
  125. margin-top: 5px;
  126. margin-bottom: 5px;
  127. p {
  128. margin-top: 5px;
  129. margin-bottom: 5px;
  130. }
  131. }
  132. }
  133. .katex-display {
  134. > span.katex {
  135. white-space: normal;
  136. }
  137. }
  138. div.mathpar {
  139. display: flex;
  140. flex-flow: row wrap;
  141. justify-content: center;
  142. align-items: center;
  143. gap: 1em;
  144. > figure {
  145. width: auto;
  146. max-width: 33%;
  147. }
  148. }
  149. div.columns {
  150. blockquote, details.blockquote {
  151. padding-right: 1em;
  152. padding-left: 1em;
  153. padding-top: 0.2em;
  154. padding-bottom: 0.2em;
  155. border: 0;
  156. }
  157. }
  158. code, pre, .sourceCode {
  159. font-size: $font-size;
  160. font-family: 'Iosevka', 'Fantasque Sans Mono', Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;
  161. font-weight: 500;
  162. }
  163. div.sourceCode, pre {
  164. background-color: $code-bg;
  165. color: $code-fg;
  166. flex-grow: 0;
  167. @include material;
  168. overflow-x: auto;
  169. line-height: 1.2;
  170. code {
  171. display: block;
  172. }
  173. > pre {
  174. padding: unset;
  175. margin-top: unset;
  176. margin-bottom: unset;
  177. box-shadow: unset;
  178. margin: 0;
  179. overflow-y: clip;
  180. }
  181. }
  182. p > code {
  183. white-space: nowrap;
  184. }
  185. blockquote, details.blockquote {
  186. @include material;
  187. background-color: $purple-100;
  188. margin-left: 0;
  189. margin-right: 0;
  190. h2 {
  191. margin-top: 0;
  192. }
  193. }
  194. table {
  195. width: 70%;
  196. margin: auto;
  197. border-collapse: collapse;
  198. td, th {
  199. text-align: center;
  200. padding: 0px 1em 0px 1em;
  201. border: 2px solid $purple-400;
  202. }
  203. }
  204. ul#post-list {
  205. list-style-type: none;
  206. display: flex;
  207. flex-direction: column;
  208. .post-list-item {
  209. @include left-bordered-block($yellow-500);
  210. @include material;
  211. margin: 0;
  212. background-color: $yellow-50;
  213. .post-list-header {
  214. margin-top: 0.2em;
  215. display: flex;
  216. justify-content: space-between;
  217. line-height: 14pt;
  218. font-style: italic;
  219. font-size: 10pt;
  220. a {
  221. font-size: 14pt;
  222. font-style: normal;
  223. color: $bluegray-800;
  224. }
  225. }
  226. }
  227. }
  228. div.contact-list {
  229. display: flex;
  230. justify-content: space-evenly;
  231. align-items: stretch;
  232. gap: 3em;
  233. div.contact-card {
  234. background-color: $purple-200;
  235. @include material;
  236. width: 33%;
  237. max-width: 33%;
  238. flex-grow: 1;
  239. p {
  240. margin: 0;
  241. }
  242. div.contact-header {
  243. // I really hate Pandoc sometimes
  244. display: flex;
  245. align-items: center;
  246. gap: 1em;
  247. margin-bottom: 10px;
  248. img {
  249. height: 48px;
  250. clip-path: url(#squircle);
  251. }
  252. span.username {
  253. font-size: 16pt;
  254. }
  255. }
  256. }
  257. }
  258. @media only screen and (max-width: 450px) {
  259. body > header {
  260. div#logo {
  261. width: 100%;
  262. display: flex;
  263. flex-direction: row;
  264. justify-content: center;
  265. }
  266. nav {
  267. display: none;
  268. }
  269. }
  270. }
  271. @media only screen and (min-width: 1500px) {
  272. .narrow-only {
  273. display: none !important;
  274. }
  275. main {
  276. max-width: 100%;
  277. > div#title {
  278. font-size: 15pt;
  279. h1, h2 {
  280. margin: 0;
  281. }
  282. h2 {
  283. font-style: italic;
  284. font-weight: normal;
  285. display: block;
  286. z-index: 1;
  287. }
  288. margin-top: 0.5em;
  289. margin-bottom: 1em;
  290. @include center-that-bitch;
  291. }
  292. div#post-toc-container {
  293. display: grid;
  294. grid-template-columns: 0.5fr 2fr 0.5fr;
  295. gap: 1em;
  296. aside#toc {
  297. display: block !important;
  298. h3 { @include center-that-bitch; }
  299. div#toc-container {
  300. overflow-x: hidden;
  301. width: 100%;
  302. position: sticky;
  303. top: 2em;
  304. overflow-y: auto;
  305. max-height: 90vh;
  306. bottom: 2em;
  307. ul {
  308. border-left: 2px solid $bluegray-400;
  309. list-style-type: none;
  310. padding-left: 1em;
  311. a {
  312. text-decoration: none;
  313. }
  314. a:hover {
  315. text-decoration: underline;
  316. }
  317. }
  318. }
  319. }
  320. article {
  321. max-width: 100ch;
  322. margin-top: -100px;
  323. margin: auto;
  324. }
  325. }
  326. div.columns {
  327. display: grid;
  328. grid-template-columns: 1fr 1fr;
  329. gap: 1em;
  330. }
  331. }
  332. }
  333. #index {
  334. padding-top: 4em;
  335. a.ico-left {
  336. img {
  337. clip-path: url(#squircle);
  338. width: 96px;
  339. height: 96px;
  340. }
  341. float: left;
  342. margin-right: 1em;
  343. width: 96px;
  344. height: 96px;
  345. }
  346. a.ico-right {
  347. img {
  348. clip-path: url(#squircle);
  349. width: 96px;
  350. height: 96px;
  351. }
  352. float: right;
  353. margin-left: 1em;
  354. width: 96px;
  355. height: 96px;
  356. }
  357. div#social {
  358. display: flex;
  359. flex-direction: row;
  360. justify-content: center;
  361. flex-wrap: wrap;
  362. width: 100%;
  363. gap: 8px;
  364. img {
  365. width: 48px;
  366. height: 48px;
  367. clip-path: url(#squircle);
  368. transition: width 0.25s, height 0.25s;
  369. &:hover {
  370. width: 54px;
  371. height: 54px;
  372. }
  373. }
  374. a {
  375. filter: drop-shadow(2px 2px 3px rgba(50, 50, 0, 0.5));
  376. height: 54px;
  377. }
  378. }
  379. display: flex;
  380. flex-direction: column;
  381. }
  382. @media only screen and (min-width: 1500px) {
  383. #index {
  384. display: grid;
  385. grid-template-columns: 0.20fr 0.75fr 0.20fr 1fr 0.20fr;
  386. }
  387. }
  388. details {
  389. margin-top: 1em;
  390. margin-bottom: 1em;
  391. }
  392. // Styles for code
  393. code.kw, span.kw { color: $code-pink; } /* Keyword */
  394. code.dt, span.dt { color: $code-blue; } /* DataType */
  395. code.dv, span.dv { color: $code-orange; } /* DecVal */
  396. code.bn, span.bn { color: $code-orange; } /* BaseN */
  397. code.fl, span.fl { color: $code-orange; } /* Float */
  398. code.ch, span.ch { color: $code-green; } /* Char */
  399. code.st, span.st { color: $code-green; } /* String */
  400. code.co, span.co { color: $code-grey; } /* Comment */
  401. code.ot, span.ot { color: $code-green; } /* Other */
  402. code.al, span.al { color: #ff0000; } /* Alert */
  403. code.fu, span.fu { color: $code-fg; } /* Function */
  404. code.er, span.er { color: #ff0000; } /* Error */
  405. code.wa, span.wa { color: #60a0b0; } /* Warning */
  406. code.cn, span.cn { color: $code-orange; } /* Constant */
  407. code.sc, span.sc { color: $code-yellow; } /* SpecialChar */
  408. code.vs, span.vs { color: $code-blue; } /* VerbatimString */
  409. code.ss, span.ss { color: $code-green; } /* SpecialString */
  410. code.va, span.va { color: $code-fg; } /* Variable */
  411. code.cf, span.cf { color: $code-pink; } /* ControlFlow */
  412. code.op, span.op { color: $code-green; } /* Operator */
  413. code.pp, span.pp { color: $code-orange; } /* Preprocessor */
  414. code.at, span.at { color: $code-green; } /* Attribute */
  415. code.do, span.do { color: $code-red; } /* Documentation */
  416. code.an, span.an { color: $code-red; } /* Annotation */
  417. code.cv, span.cv { color: $code-red; } /* CommentVar */