style.scss 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734
  1. @import "predefined.scss";
  2. @import "normalize.scss";
  3. @import "syntax.scss";
  4. @import "animate.scss";
  5. /* Webkit Scrollbar Customize */
  6. ::-webkit-scrollbar {
  7. width: 8px;
  8. height: 8px;
  9. background: $midnightblue;
  10. }
  11. ::-webkit-scrollbar-thumb {
  12. background: #888;
  13. &:hover {
  14. background: $text;
  15. }
  16. }
  17. html {
  18. background: $light-grey;
  19. line-height: 1.6;
  20. letter-spacing: .06em;
  21. }
  22. body,
  23. button,
  24. input,
  25. select,
  26. textarea {
  27. color: $text;
  28. font-family: $fonts;
  29. }
  30. pre,
  31. code,
  32. pre tt {
  33. font-family: $code-fonts;
  34. }
  35. pre {
  36. max-height: 40em;
  37. padding: .7em 1.1em;
  38. overflow: auto;
  39. font-size: .9em;
  40. line-height: 1.5;
  41. letter-spacing: normal;
  42. white-space: pre-wrap;
  43. word-wrap: break-word;
  44. color: #eee;
  45. background: $midnightblue;
  46. border-radius: 4px;
  47. // -webkit-overflow-scrolling: touch;
  48. code {
  49. padding: 0;
  50. margin: 0;
  51. background: $midnightblue;
  52. }
  53. }
  54. code {
  55. color: #eee;
  56. background: $highlight-grey;
  57. border-radius: 3px;
  58. padding: 0 3px;
  59. margin: 0 4px;
  60. word-break: break-all;
  61. letter-spacing: normal;
  62. }
  63. blockquote {
  64. border-left: .25em solid;
  65. margin: 1em;
  66. padding: 0 1em;
  67. font-style: italic;
  68. cite {
  69. font-weight: bold;
  70. font-style: normal;
  71. &::before {
  72. content: "—— ";
  73. }
  74. }
  75. }
  76. a {
  77. color: $text;
  78. text-decoration: none;
  79. border: none;
  80. transition-property: color;
  81. transition-duration: .4s;
  82. transition-timing-function: ease-out;
  83. &:hover {
  84. color: #fff;
  85. }
  86. }
  87. hr {
  88. opacity: .2;
  89. border-width: 0 0 5px 0;
  90. border-style: dashed;
  91. background: transparent;
  92. width: 80%;
  93. margin: auto;
  94. }
  95. table {
  96. border-collapse: collapse;
  97. border-spacing: 0;
  98. empty-cells: show;
  99. width: 100%;
  100. max-width: 100%;
  101. th,
  102. td {
  103. padding: 1.5%;
  104. border: 1px solid;
  105. }
  106. th {
  107. font-weight: 700;
  108. vertical-align: bottom;
  109. }
  110. }
  111. .section-inner {
  112. margin: 0 auto;
  113. max-width: 1200px;
  114. width: 93%;
  115. }
  116. .thin {
  117. max-width: 720px;
  118. margin: auto;
  119. }
  120. .feather {
  121. display: inline-block;
  122. vertical-align: -.125em;
  123. width: 1em;
  124. height: 1em;
  125. }
  126. // Accessibility
  127. //
  128. .screen-reader-text {
  129. border: 0;
  130. clip: rect(1px, 1px, 1px, 1px);
  131. clip-path: inset(50%);
  132. height: 1px;
  133. margin: -1px;
  134. overflow: hidden;
  135. padding: 0;
  136. position: absolute !important;
  137. width: 1px;
  138. word-wrap: normal !important;
  139. }
  140. .screen-reader-text:focus {
  141. background-color: #f1f1f1;
  142. border-radius: 3px;
  143. box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  144. clip: auto !important;
  145. clip-path: none;
  146. color: #21759b;
  147. display: block;
  148. font-size: 14px;
  149. font-size: 0.875rem;
  150. font-weight: bold;
  151. height: auto;
  152. left: 5px;
  153. line-height: normal;
  154. padding: 15px 23px 14px;
  155. text-decoration: none;
  156. top: 5px;
  157. width: auto;
  158. z-index: 100000;
  159. }
  160. // Header & Footer
  161. //
  162. #site-header {
  163. position: fixed;
  164. z-index: 1;
  165. bottom: 0;
  166. width: 100%;
  167. box-sizing: border-box;
  168. box-shadow: -1px -2px 3px rgba(0, 0, 0, 0.45);
  169. background-color: $dark-grey;
  170. }
  171. .hdr-wrapper {
  172. display: flex;
  173. justify-content: space-between;
  174. padding: .5em 0;
  175. font-size: 1.2rem;
  176. .site-branding {
  177. display: inline-block;
  178. margin-right: .8em;
  179. font-size: 1.2em;
  180. }
  181. .site-nav {
  182. display: inline-block;
  183. font-size: 1.1em;
  184. opacity: .8;
  185. a {
  186. margin-left: .8em;
  187. }
  188. }
  189. }
  190. .hdr-icons {
  191. display: inline-block;
  192. font-size: 1.2em;
  193. a {
  194. margin-left: .4em;
  195. }
  196. }
  197. .hdr-btn {
  198. border: none;
  199. background: none;
  200. padding: 0;
  201. cursor: pointer;
  202. }
  203. #menu-btn,
  204. #search-btn {
  205. display: none;
  206. cursor: pointer;
  207. }
  208. #mobile-menu {
  209. position: fixed;
  210. bottom: 4.8em;
  211. right: 1.5em;
  212. padding: .6em 1.8em;
  213. z-index: 1;
  214. box-sizing: border-box;
  215. box-shadow: -1px -2px 3px 0px rgba(0, 0, 0, 0.45);
  216. background-color: $dark-grey;
  217. ul {
  218. list-style: none;
  219. margin: 0;
  220. padding: 0;
  221. line-height: 2;
  222. font-size: 1.2em;
  223. }
  224. }
  225. #site-footer {
  226. text-align: center;
  227. font-size: .9em;
  228. margin-bottom: 96px;
  229. margin-top: 64px;
  230. p {
  231. margin: 0;
  232. }
  233. }
  234. // Spotlight
  235. //
  236. #spotlight {
  237. display: flex;
  238. height: 100vh;
  239. flex-direction: column;
  240. align-items: center;
  241. justify-content: center;
  242. font-size: 1.5rem;
  243. &.error-404 {
  244. flex-direction: row;
  245. line-height: normal;
  246. }
  247. }
  248. p.catguard {
  249. margin: 0;
  250. img {
  251. max-width: 250px;
  252. height: auto;
  253. }
  254. }
  255. .banner-404 {
  256. margin-left: 2em;
  257. h1 {
  258. font-size: 3em;
  259. margin: .5rem 0 1rem;
  260. }
  261. p {
  262. margin-top: 0;
  263. margin-bottom: .8em;
  264. }
  265. .btn-404 {
  266. font-size: .8em;
  267. a {
  268. display: inline-block;
  269. border: 2px solid $text;
  270. border-radius: 5px;
  271. padding: 5px;
  272. transition-property: color, border-color;
  273. word-break: break-all;
  274. &:first-child {
  275. margin-right: 1em;
  276. }
  277. &:hover {
  278. border-color: #fff;
  279. }
  280. svg {
  281. margin-right: .5em;
  282. }
  283. }
  284. }
  285. }
  286. #home-center {
  287. display: flex;
  288. flex-grow: 1;
  289. flex-direction: column;
  290. justify-content: center;
  291. }
  292. #home-title {
  293. margin: 0;
  294. text-align: center;
  295. }
  296. #home-social {
  297. font-size: 1.4em;
  298. text-align: center;
  299. a {
  300. margin: 0 .2em;
  301. }
  302. }
  303. #home-nav a {
  304. display: block;
  305. text-align: center;
  306. margin-top: .5em;
  307. }
  308. #home-footer {
  309. text-align: center;
  310. font-size: .6em;
  311. line-height: normal;
  312. p {
  313. margin-top: 0;
  314. }
  315. }
  316. // list.html
  317. //
  318. .posts-group {
  319. display: flex;
  320. .post-year {
  321. font-size: 1.6em;
  322. margin: 0.4em 2em 1em 0;
  323. @include dimmed;
  324. }
  325. .posts-list {
  326. flex-grow: 1;
  327. margin: 16px 0;
  328. padding: 0;
  329. list-style: none;
  330. }
  331. .post-item {
  332. margin-bottom: 10px;
  333. padding: 2px 4px;
  334. border-radius: 3px;
  335. border-bottom: 1px $highlight-grey dashed;
  336. transition-property: background-color;
  337. transition-duration: .5s;
  338. transition-timing-function: ease-out;
  339. a {
  340. display: flex;
  341. justify-content: space-between;
  342. align-items: baseline;
  343. }
  344. &:hover {
  345. background-color: $highlight-grey;
  346. }
  347. }
  348. .post-day {
  349. flex-shrink: 0;
  350. margin-left: 1em;
  351. @include dimmed;
  352. }
  353. }
  354. // single.html
  355. //
  356. .bg-img {
  357. width: 100%;
  358. height: 100%;
  359. opacity: .03;
  360. z-index: -1;
  361. position: fixed;
  362. top: 0;
  363. background-attachment: fixed;
  364. background-repeat: no-repeat;
  365. background-size: cover;
  366. background-position: center;
  367. transition: opacity .5s;
  368. }
  369. .show-bg-img {
  370. z-index: 100;
  371. opacity: 1;
  372. }
  373. #show-img-btn {
  374. margin-right: .3em;
  375. }
  376. .post-header {
  377. margin-top: 1.2em;
  378. line-height: normal;
  379. .post-meta {
  380. font-size: .9em;
  381. letter-spacing: normal;
  382. @include dimmed;
  383. }
  384. h1 {
  385. margin-top: .1em;
  386. }
  387. }
  388. hr.post-end {
  389. width: 50%;
  390. margin-top: 1.6em;
  391. margin-bottom: .8em;
  392. margin-left: 0;
  393. border-style: solid;
  394. border-bottom-width: 4px;
  395. }
  396. .content {
  397. text-align: justify;
  398. text-justify: inter-ideograph; //For IE/Edge
  399. @include aTag;
  400. figure {
  401. max-width: 100;
  402. height: auto;
  403. margin: 0;
  404. text-align: center;
  405. p {
  406. margin-top: 0;
  407. }
  408. }
  409. img {
  410. display: block;
  411. max-width: 100%;
  412. height: auto;
  413. margin: auto;
  414. border-radius: 4px;
  415. }
  416. ul,
  417. ol {
  418. padding: 0;
  419. margin-left: 1.8em;
  420. }
  421. }
  422. figure.left {
  423. float: left;
  424. margin-right: 1em;
  425. }
  426. figure.right {
  427. float: right;
  428. margin-left: 1em;
  429. }
  430. .footnote-ref a,
  431. a.footnote-return {
  432. box-shadow: none;
  433. text-decoration: underline;
  434. &:hover {
  435. background: transparent;
  436. }
  437. }
  438. .post-info {
  439. font-size: .8rem;
  440. line-height: normal;
  441. @include dimmed;
  442. p {
  443. margin: .8em 0;
  444. }
  445. a {
  446. text-decoration: underline;
  447. }
  448. svg {
  449. margin-right: .8em;
  450. }
  451. .tag {
  452. margin-right: .5em;
  453. &::before {
  454. content: "#"
  455. }
  456. }
  457. }
  458. .post-nav {
  459. display: flex;
  460. justify-content: space-between;
  461. margin-top: 1.5em;
  462. font-size: 1.2em;
  463. a {
  464. flex-basis: 50%;
  465. flex-grow: 1;
  466. }
  467. .next-post {text-align: left; padding-right: 5px;}
  468. .prev-post {text-align: right; padding-left: 5px;}
  469. .post-nav-label {
  470. font-size: .8em;
  471. opacity: .8;
  472. text-transform: uppercase;
  473. }
  474. }
  475. // Comments
  476. //
  477. #comments-loader {
  478. text-align: center;
  479. font-size: 2.5em;
  480. margin-top: 2.5em;
  481. svg {
  482. animation-duration: 1.2s;
  483. }
  484. }
  485. #comments {
  486. margin-top: 3em;
  487. * {
  488. color: $text;
  489. line-height: 1.5;
  490. }
  491. .vcontrol {
  492. letter-spacing: normal;
  493. }
  494. .vbtn {
  495. background-color: #7d828a;
  496. }
  497. .vwrap {
  498. border: 2px solid $text;
  499. input {
  500. border-bottom-width: 2px;
  501. }
  502. }
  503. .vsys {
  504. background-color: $highlight-grey;
  505. opacity: .5;
  506. }
  507. .vat:hover {
  508. color: $theme;
  509. }
  510. .vh {
  511. border-bottom: transparent;
  512. .vquote {
  513. border-left: 3px dotted #979ca5;
  514. }
  515. }
  516. .vcontent {
  517. padding: 0;
  518. code {
  519. margin: 0 4px;
  520. color: #eee;
  521. background: $highlight-grey;
  522. }
  523. pre {
  524. color: #eee;
  525. background: $midnightblue;
  526. padding: 1em 1.5em;
  527. border-radius: 5px;
  528. code {
  529. background: $midnightblue;
  530. }
  531. }
  532. }
  533. }
  534. @media (min-width: 800px) {
  535. .site-main {
  536. margin-top: 3em;
  537. }
  538. hr.post-end {
  539. width: 40%;
  540. }
  541. }
  542. @media (min-width: 960px) {
  543. .site-main {
  544. margin-top: 6em;
  545. }
  546. }
  547. @media (min-width: 1300px) {
  548. .site-main {
  549. margin-top: 8em;
  550. }
  551. hr.post-end {
  552. width: 30%;
  553. }
  554. }
  555. @media (min-width: 1800px) {
  556. .site-main {
  557. margin-top: 10em;
  558. }
  559. .section-inner {
  560. max-width: 1600px;
  561. }
  562. .thin {
  563. max-width: 960px;
  564. }
  565. hr.post-end {
  566. width: 30%;
  567. }
  568. }
  569. @media (max-width: 760px) {
  570. .hide-in-mobile,
  571. .site-nav.hide-in-mobile {
  572. display: none;
  573. }
  574. #menu-btn,
  575. #search-btn {
  576. display: inline-block;
  577. }
  578. .posts-group {
  579. display: block;
  580. margin-bottom: 2.5em;
  581. .post-year {
  582. margin-right: 0;
  583. margin-bottom: 8px;
  584. border-bottom: 2px dashed;
  585. }
  586. }
  587. #spotlight.error-404 {
  588. flex-direction: column;
  589. text-align: center;
  590. .banner-404 {
  591. margin: 0;
  592. }
  593. }
  594. }
  595. @media (max-width: 520px) {
  596. figure.left,
  597. figure.right {
  598. float: unset;
  599. margin: 0;
  600. }
  601. hr.post-end {
  602. width: 60%;
  603. }
  604. #mobile-menu {
  605. right: 1.2em;
  606. }
  607. }