style.scss 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  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. }
  245. #copyright a {
  246. border: none;
  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-title {
  301. margin: 0;
  302. }
  303. #home-social {
  304. font-size: 1.4em;
  305. }
  306. #home-nav a {
  307. display: block;
  308. border: none;
  309. text-align: center;
  310. margin-top: .5em;
  311. }
  312. // list.html
  313. //
  314. .posts-group {
  315. display: flex;
  316. .post-year {
  317. font-size: 1.6em;
  318. margin: 0.4em 2em 1em 0;
  319. @include dimmed;
  320. }
  321. .posts-list {
  322. flex-grow: 1;
  323. margin: 16px 0;
  324. padding: 0;
  325. list-style: none;
  326. }
  327. .post-item {
  328. margin-bottom: 10px;
  329. padding: 2px 4px;
  330. border-radius: 3px;
  331. transition-property: background-color;
  332. transition-duration: .5s;
  333. transition-timing-function: ease-out;
  334. a {
  335. display: flex;
  336. justify-content: space-between;
  337. align-items: baseline;
  338. border: none;
  339. }
  340. &:hover {
  341. background-color: $highlight-grey;
  342. }
  343. }
  344. .post-day {
  345. flex-shrink: 0;
  346. margin-left: 1em;
  347. @include dimmed;
  348. }
  349. }
  350. // single.html
  351. //
  352. .bg-img {
  353. width: 100%;
  354. height: 100%;
  355. opacity: .03;
  356. z-index: -1;
  357. position: fixed;
  358. top: 0;
  359. background-attachment: fixed;
  360. background-repeat: no-repeat;
  361. background-size: cover;
  362. background-position: center;
  363. transition: opacity .5s;
  364. }
  365. .show-bg-img {
  366. z-index: 100;
  367. opacity: 1;
  368. }
  369. #show-img-btn {
  370. margin-right: .5em;
  371. }
  372. .post-header {
  373. margin-top: 1.2em;
  374. line-height: normal;
  375. .post-meta {
  376. font-size: .9em;
  377. letter-spacing: normal;
  378. @include dimmed;
  379. }
  380. h1 {
  381. margin-top: .1em;
  382. }
  383. }
  384. hr.post-end {
  385. width: 50%;
  386. margin-top: 1.6em;
  387. margin-bottom: .8em;
  388. margin-left: 0;
  389. border-style: solid;
  390. border-bottom-width: 4px;
  391. }
  392. .content {
  393. text-align: justify;
  394. text-justify: inter-ideograph; //For IE/Edge
  395. @include aTag;
  396. figure {
  397. max-width: 100;
  398. height: auto;
  399. margin: 0;
  400. text-align: center;
  401. p {
  402. margin-top: 0;
  403. }
  404. }
  405. img {
  406. display: block;
  407. max-width: 100%;
  408. height: auto;
  409. margin: auto;
  410. border-radius: 4px;
  411. }
  412. ul,
  413. ol {
  414. padding: 0;
  415. margin-left: 1.8em;
  416. }
  417. }
  418. figure.left {
  419. float: left;
  420. margin-right: 1em;
  421. }
  422. figure.right {
  423. float: right;
  424. margin-left: 1em;
  425. }
  426. .footnote-ref a,
  427. a.footnote-return {
  428. border: none;
  429. &:hover {
  430. background: transparent;
  431. }
  432. }
  433. .post-info {
  434. font-size: .8rem;
  435. line-height: normal;
  436. @include dimmed;
  437. svg {
  438. margin-right: .8em;
  439. }
  440. a {
  441. border: transparent;
  442. }
  443. .tag {
  444. margin-right: .5em;
  445. &::before {
  446. content: "#"
  447. }
  448. }
  449. }
  450. .post-nav {
  451. display: flex;
  452. justify-content: space-between;
  453. margin-top: 1.5em;
  454. font-size: 1.2em;
  455. a {
  456. flex-basis: 50%;
  457. flex-grow: 1;
  458. border-bottom: transparent;
  459. }
  460. .next-post {text-align: left; padding-right: 5px;}
  461. .prev-post {text-align: right; padding-left: 5px;}
  462. .post-nav-label {
  463. font-size: .8em;
  464. opacity: .8;
  465. text-transform: uppercase;
  466. }
  467. }
  468. // Comments
  469. //
  470. #comments-loader {
  471. text-align: center;
  472. font-size: 2.5em;
  473. margin-top: 2.5em;
  474. svg {
  475. animation-duration: 1.2s;
  476. }
  477. }
  478. #comments {
  479. margin-top: 3em;
  480. * {
  481. color: $text;
  482. line-height: 1.5;
  483. }
  484. .vcontrol {
  485. letter-spacing: normal;
  486. }
  487. .vbtn {
  488. background-color: #7d828a;
  489. }
  490. .vwrap {
  491. border: 2px solid $text;
  492. input {
  493. border-bottom-width: 2px;
  494. }
  495. }
  496. .vsys {
  497. background-color: $highlight-grey;
  498. opacity: .5;
  499. }
  500. .vat {
  501. color: $theme;
  502. }
  503. .vh {
  504. border-bottom: transparent;
  505. .vquote {
  506. border-left: 3px dotted #979ca5;
  507. }
  508. }
  509. .vcontent {
  510. padding: 0;
  511. code {
  512. margin: 0 4px;
  513. color: #eee;
  514. background: $highlight-grey;
  515. }
  516. pre {
  517. color: #eee;
  518. background: $midnightblue;
  519. padding: 1em 1.5em;
  520. border-radius: 5px;
  521. code {
  522. background: $midnightblue;
  523. }
  524. }
  525. }
  526. }
  527. @media (min-width: 800px) {
  528. .site-main {
  529. margin-top: 3em;
  530. }
  531. hr.post-end {
  532. width: 40%;
  533. }
  534. }
  535. @media (min-width: 960px) {
  536. .site-main {
  537. margin-top: 6em;
  538. }
  539. }
  540. @media (min-width: 1300px) {
  541. .site-main {
  542. margin-top: 8em;
  543. }
  544. hr.post-end {
  545. width: 30%;
  546. }
  547. }
  548. @media (min-width: 1800px) {
  549. .site-main {
  550. margin-top: 10em;
  551. }
  552. .section-inner {
  553. max-width: 1600px;
  554. }
  555. .thin {
  556. max-width: 960px;
  557. }
  558. hr.post-end {
  559. width: 30%;
  560. }
  561. }
  562. @media (max-width: 760px) {
  563. .hide-in-mobile,
  564. .site-nav.hide-in-mobile {
  565. display: none;
  566. }
  567. #menu-btn,
  568. #search-btn {
  569. display: inline-block;
  570. }
  571. .posts-group {
  572. display: block;
  573. margin-bottom: 2.5em;
  574. .post-year {
  575. margin-right: 0;
  576. margin-bottom: 8px;
  577. border-bottom: 2px dashed;
  578. }
  579. }
  580. #spotlight.error-404 {
  581. flex-direction: column;
  582. text-align: center;
  583. .banner-404 {
  584. margin: 0;
  585. }
  586. }
  587. }
  588. @media (max-width: 520px) {
  589. figure.left,
  590. figure.right {
  591. float: unset;
  592. margin: 0;
  593. }
  594. hr.post-end {
  595. width: 60%;
  596. }
  597. #mobile-menu {
  598. right: 1.2em;
  599. }
  600. }