style.scss 9.8 KB

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