style.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861
  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. scroll-behavior: smooth;
  22. }
  23. body,
  24. button,
  25. input,
  26. select,
  27. textarea {
  28. color: $text;
  29. font-family: $fonts;
  30. }
  31. pre,
  32. code,
  33. pre tt {
  34. font-family: $code-fonts;
  35. }
  36. pre {
  37. max-height: 40em;
  38. padding: .7em 1.1em;
  39. overflow: auto;
  40. font-size: .9em;
  41. line-height: 1.5;
  42. letter-spacing: normal;
  43. white-space: pre-wrap;
  44. word-wrap: break-word;
  45. color: #eee;
  46. background: $midnightblue;
  47. border-radius: 4px;
  48. // -webkit-overflow-scrolling: touch;
  49. code {
  50. padding: 0;
  51. margin: 0;
  52. background: $midnightblue;
  53. }
  54. }
  55. code {
  56. color: #eee;
  57. background: $highlight-grey;
  58. border-radius: 3px;
  59. padding: 0 3px;
  60. margin: 0 4px;
  61. word-break: break-all;
  62. letter-spacing: normal;
  63. }
  64. blockquote {
  65. border-left: .25em solid;
  66. margin: 1em;
  67. padding: 0 1em;
  68. font-style: italic;
  69. cite {
  70. font-weight: bold;
  71. font-style: normal;
  72. &::before {
  73. content: "—— ";
  74. }
  75. }
  76. }
  77. a {
  78. color: $text;
  79. text-decoration: none;
  80. border: none;
  81. transition-property: color;
  82. transition-duration: .4s;
  83. transition-timing-function: ease-out;
  84. &:hover {
  85. color: #fff;
  86. }
  87. }
  88. hr {
  89. opacity: .2;
  90. border-width: 0 0 5px 0;
  91. border-style: dashed;
  92. background: transparent;
  93. width: 50%;
  94. margin: 1.8em 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. .feather {
  122. display: inline-block;
  123. vertical-align: -.125em;
  124. width: 1em;
  125. height: 1em;
  126. }
  127. .desktop-only, .desktop-only-ib {
  128. display: none;
  129. }
  130. // Header & Footer
  131. //
  132. #site-header {
  133. position: fixed;
  134. z-index: 1;
  135. bottom: 0;
  136. width: 100%;
  137. box-sizing: border-box;
  138. box-shadow: -1px -2px 3px rgba(0, 0, 0, 0.45);
  139. background-color: $dark-grey;
  140. }
  141. .hdr-wrapper {
  142. display: flex;
  143. justify-content: space-between;
  144. align-items: center;
  145. padding: .5em 0;
  146. font-size: 1.2rem;
  147. .site-branding {
  148. display: inline-block;
  149. margin-right: .8em;
  150. font-size: 1.2em;
  151. }
  152. .site-nav {
  153. display: inline-block;
  154. font-size: 1.1em;
  155. opacity: .8;
  156. a {
  157. margin-left: .8em;
  158. }
  159. }
  160. }
  161. .hdr-icons {
  162. font-size: 1.2em;
  163. }
  164. .hdr-social {
  165. display: inline-block;
  166. margin-left: .6em;
  167. &>a {
  168. margin-left: .4em;
  169. }
  170. }
  171. .hdr-btn {
  172. border: none;
  173. background: none;
  174. padding: 0;
  175. margin-left: .4em;
  176. cursor: pointer;
  177. }
  178. #menu-btn {
  179. display: none;
  180. margin-left: .6em;
  181. cursor: pointer;
  182. }
  183. #mobile-menu {
  184. position: fixed;
  185. bottom: 4.8em;
  186. right: 1.5em;
  187. display: none;
  188. padding: .6em 1.8em;
  189. z-index: 1;
  190. box-sizing: border-box;
  191. box-shadow: -1px -2px 3px 0px rgba(0, 0, 0, 0.45);
  192. background-color: $dark-grey;
  193. ul {
  194. list-style: none;
  195. margin: 0;
  196. padding: 0;
  197. line-height: 2;
  198. font-size: 1.2em;
  199. }
  200. }
  201. #site-footer {
  202. text-align: center;
  203. font-size: .9em;
  204. margin-bottom: 96px;
  205. margin-top: 64px;
  206. p {
  207. margin: 0;
  208. }
  209. }
  210. // Spotlight
  211. //
  212. #spotlight {
  213. display: flex;
  214. height: 100vh;
  215. flex-direction: column;
  216. align-items: center;
  217. justify-content: center;
  218. max-width: 93%;
  219. margin: auto;
  220. font-size: 1.5rem;
  221. &.error-404 {
  222. flex-direction: row;
  223. line-height: normal;
  224. }
  225. }
  226. p.img-404 {
  227. margin: 0;
  228. img {
  229. max-width: 250px;
  230. height: auto;
  231. }
  232. }
  233. .banner-404 {
  234. margin-left: 2em;
  235. h1 {
  236. font-size: 3em;
  237. margin: .5rem 0 1rem;
  238. }
  239. p {
  240. margin-top: 0;
  241. margin-bottom: .8em;
  242. }
  243. .btn-404 {
  244. font-size: .8em;
  245. a {
  246. display: inline-block;
  247. border: 2px solid $text;
  248. border-radius: 5px;
  249. padding: 5px;
  250. transition-property: color, border-color;
  251. word-break: break-all;
  252. &:first-child {
  253. margin-right: 1em;
  254. }
  255. &:hover {
  256. border-color: #fff;
  257. }
  258. svg {
  259. margin-right: .5em;
  260. }
  261. }
  262. }
  263. }
  264. #home-center {
  265. display: flex;
  266. flex-grow: 1;
  267. flex-direction: column;
  268. justify-content: center;
  269. }
  270. #home-title {
  271. margin: 0;
  272. text-align: center;
  273. }
  274. #home-social {
  275. font-size: 1.4em;
  276. text-align: center;
  277. opacity: .8;
  278. a {
  279. margin: 0 .2em;
  280. }
  281. }
  282. #home-nav {
  283. opacity: .8;
  284. a {
  285. display: block;
  286. text-align: center;
  287. margin-top: .5em;
  288. }
  289. }
  290. #home-footer {
  291. text-align: center;
  292. font-size: .6em;
  293. line-height: normal;
  294. @include dimmed;
  295. p {
  296. margin-top: 0;
  297. }
  298. }
  299. // list.html
  300. //
  301. .posts-group {
  302. display: flex;
  303. margin-bottom: 1.9em;
  304. line-height: normal;
  305. .post-year {
  306. padding-top: 6px;
  307. margin-right: 1.8em;
  308. font-size: 1.6em;
  309. @include dimmed;
  310. }
  311. .posts-list {
  312. flex-grow: 1;
  313. margin: 0;
  314. padding: 0;
  315. list-style: none;
  316. }
  317. .post-item {
  318. border-bottom: 1px $highlight-grey dashed;
  319. a {
  320. display: flex;
  321. justify-content: space-between;
  322. align-items: baseline;
  323. padding: 12px 0;
  324. }
  325. }
  326. .post-day {
  327. flex-shrink: 0;
  328. margin-left: 1em;
  329. @include dimmed;
  330. }
  331. }
  332. // single.html
  333. //
  334. .bg-img {
  335. width: 100vw;
  336. height: 100vh;
  337. opacity: .03;
  338. z-index: -1;
  339. position: fixed;
  340. top: 0;
  341. background-attachment: fixed;
  342. background-repeat: no-repeat;
  343. background-size: cover;
  344. background-position: center;
  345. transition: opacity .5s;
  346. }
  347. .show-bg-img {
  348. z-index: 100;
  349. opacity: 1;
  350. cursor: pointer;
  351. }
  352. .post-header {
  353. margin-top: 1.2em;
  354. line-height: normal;
  355. .post-meta {
  356. font-size: .9em;
  357. letter-spacing: normal;
  358. @include dimmed;
  359. }
  360. h1 {
  361. margin-top: .1em;
  362. }
  363. }
  364. hr.post-end {
  365. width: 50%;
  366. margin-top: 1.6em;
  367. margin-bottom: .8em;
  368. margin-left: 0;
  369. border-style: solid;
  370. border-bottom-width: 4px;
  371. }
  372. .content {
  373. text-align: justify;
  374. text-justify: inter-ideograph; //For IE/Edge
  375. @include aTag;
  376. figure {
  377. max-width: 100%;
  378. height: auto;
  379. margin: 0;
  380. text-align: center;
  381. p {
  382. font-size: .8em;
  383. font-style: italic;
  384. @include dimmed;
  385. }
  386. }
  387. figure.left {
  388. float: left;
  389. margin-right: 1.5em;
  390. max-width: 50%;
  391. }
  392. figure.right {
  393. float: right;
  394. margin-left: 1.5em;
  395. max-width: 50%;
  396. }
  397. figure.big {
  398. max-width: 100vw;
  399. }
  400. img {
  401. display: block;
  402. max-width: 100%;
  403. height: auto;
  404. margin: auto;
  405. border-radius: 4px;
  406. }
  407. ul,
  408. ol {
  409. padding: 0;
  410. margin-left: 1.8em;
  411. }
  412. a.anchor {
  413. float: left;
  414. margin-left: -20px;
  415. padding-right: 6px;
  416. box-shadow: none;
  417. opacity: .8;
  418. &:hover {
  419. background: none;
  420. color: $theme;
  421. opacity: 1;
  422. }
  423. svg {
  424. display: inline-block;
  425. width: 14px;
  426. height: 14px;
  427. vertical-align: baseline;
  428. visibility: hidden;
  429. }
  430. &:focus svg {
  431. visibility: visible;
  432. }
  433. }
  434. h1:hover a.anchor svg,
  435. h2:hover a.anchor svg,
  436. h3:hover a.anchor svg,
  437. h4:hover a.anchor svg,
  438. h5:hover a.anchor svg,
  439. h6:hover a.anchor svg {
  440. visibility: visible;
  441. }
  442. }
  443. .footnotes {
  444. font-size: .85em;
  445. a {
  446. box-shadow: none;
  447. text-decoration: underline;
  448. transition-property: color;
  449. &:hover {
  450. background: transparent;
  451. }
  452. &.footnote-return {
  453. text-decoration: none;
  454. }
  455. }
  456. ol {
  457. line-height: 1.8;
  458. }
  459. }
  460. .footnote-ref a {
  461. box-shadow: none;
  462. text-decoration: none;
  463. padding: 2px;
  464. border-radius: 2px;
  465. background-color: $midnightblue;
  466. }
  467. .post-info {
  468. font-size: .8rem;
  469. line-height: normal;
  470. @include dimmed;
  471. p {
  472. margin: .8em 0;
  473. }
  474. a:hover {
  475. border-bottom: 2px solid $theme;
  476. }
  477. svg {
  478. margin-right: .8em;
  479. }
  480. .tag {
  481. margin-right: .5em;
  482. &::before {
  483. content: "#"
  484. }
  485. }
  486. }
  487. #toc {
  488. position: fixed;
  489. left: 50%;
  490. top: 0;
  491. display: none;
  492. }
  493. .toc-title {
  494. margin-left: 1em;
  495. margin-bottom: .5em;
  496. font-size: .8em;
  497. font-weight: bold;
  498. opacity: .8;
  499. }
  500. #TableOfContents {
  501. font-size: .8em;
  502. @include dimmed;
  503. ul {
  504. padding-left: 1em;
  505. margin: 0;
  506. }
  507. &>ul {
  508. list-style-type: none;
  509. ul ul {
  510. font-size: .9em;
  511. }
  512. }
  513. a:hover {
  514. border-bottom: $theme 2px solid;
  515. }
  516. }
  517. .post-nav {
  518. display: flex;
  519. justify-content: space-between;
  520. margin-top: 1.5em;
  521. margin-bottom: 2.5em;
  522. font-size: 1.2em;
  523. a {
  524. flex-basis: 50%;
  525. flex-grow: 1;
  526. }
  527. .next-post {text-align: left; padding-right: 5px;}
  528. .prev-post {text-align: right; padding-left: 5px;}
  529. .post-nav-label {
  530. font-size: .8em;
  531. opacity: .8;
  532. text-transform: uppercase;
  533. }
  534. }
  535. // Comments
  536. //
  537. #comments-loader {
  538. text-align: center;
  539. font-size: 2.5em;
  540. margin-top: 2.5em;
  541. svg {
  542. animation-duration: 1.2s;
  543. }
  544. }
  545. #comments {
  546. margin-top: 3em;
  547. * {
  548. color: $text;
  549. line-height: 1.5;
  550. }
  551. .vcontrol {
  552. letter-spacing: normal;
  553. }
  554. .vbtn {
  555. background-color: #7d828a;
  556. }
  557. .vwrap {
  558. border: 2px solid $text;
  559. input {
  560. border-bottom-width: 2px;
  561. }
  562. }
  563. .vsys {
  564. background-color: $highlight-grey;
  565. opacity: .5;
  566. }
  567. .vat:hover {
  568. color: $theme;
  569. }
  570. .vh {
  571. border-bottom: none;
  572. .vquote {
  573. border-left: 3px dotted #979ca5;
  574. }
  575. }
  576. .vcontent {
  577. padding: 0;
  578. code {
  579. margin: 0 4px;
  580. color: #eee;
  581. background: $highlight-grey;
  582. }
  583. pre {
  584. color: #eee;
  585. background: $midnightblue;
  586. padding: 1em 1.5em;
  587. border-radius: 5px;
  588. code {
  589. background: $midnightblue;
  590. }
  591. }
  592. }
  593. }
  594. // Media Queries
  595. //
  596. @media (min-width: 800px) {
  597. .site-main {
  598. margin-top: 3em;
  599. }
  600. hr.post-end {
  601. width: 40%;
  602. }
  603. }
  604. @media (min-width: 960px) {
  605. .site-main {
  606. margin-top: 6em;
  607. }
  608. }
  609. @media (min-width: 1300px) {
  610. .site-main {
  611. margin-top: 8em;
  612. }
  613. .desktop-only,
  614. #toc.show-toc {
  615. display: block;
  616. }
  617. .desktop-only-ib {
  618. display: inline-block;
  619. }
  620. figure.left {
  621. margin-left: -240px;
  622. p {
  623. text-align: left;
  624. }
  625. }
  626. figure.right {
  627. margin-right: -240px;
  628. p {
  629. text-align: right;
  630. }
  631. }
  632. figure.big {
  633. width: 1200px;
  634. margin-left: -240px;
  635. }
  636. hr.post-end {
  637. width: 30%;
  638. }
  639. #toc {
  640. top: 13em;
  641. margin-left: 370px;
  642. max-width: 220px;
  643. }
  644. }
  645. @media (min-width: 1800px) {
  646. .site-main {
  647. margin-top: 10em;
  648. }
  649. .section-inner {
  650. max-width: 1600px;
  651. }
  652. .thin {
  653. max-width: 960px;
  654. }
  655. figure.left {
  656. max-width: 75%;
  657. margin-left: -320px;
  658. }
  659. figure.right {
  660. max-width: 75%;
  661. margin-right: -320px;
  662. }
  663. figure.big {
  664. width: 1600px;
  665. margin-left: -320px;
  666. }
  667. hr.post-end {
  668. width: 30%;
  669. }
  670. #toc {
  671. top: 15em;
  672. margin-left: 490px;
  673. max-width: 300px;
  674. }
  675. }
  676. @media (max-width: 760px) {
  677. .hide-in-mobile,
  678. .site-nav.hide-in-mobile {
  679. display: none;
  680. }
  681. #menu-btn {
  682. display: inline-block;
  683. }
  684. .posts-group {
  685. display: block;
  686. .post-year {
  687. margin: -6px 0 4px;
  688. }
  689. }
  690. #spotlight.error-404 {
  691. flex-direction: column;
  692. text-align: center;
  693. .banner-404 {
  694. margin: 0;
  695. }
  696. }
  697. }
  698. @media (max-width: 520px) {
  699. .content figure.left,
  700. .content figure.right {
  701. float: unset;
  702. max-width: 100%;
  703. margin: 0;
  704. }
  705. hr.post-end {
  706. width: 60%;
  707. }
  708. #mobile-menu {
  709. right: 1.2em;
  710. }
  711. }