style.scss 11 KB

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