style.scss 9.9 KB

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