style.scss 9.7 KB

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