style.scss 11 KB

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