style.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864
  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. &:hover {
  309. text-decoration: underline;
  310. cursor: pointer;
  311. }
  312. }
  313. .posts-list {
  314. flex-grow: 1;
  315. margin: 0;
  316. padding: 0;
  317. list-style: none;
  318. }
  319. .post-item {
  320. border-bottom: 1px $highlight-grey dashed;
  321. a {
  322. display: flex;
  323. justify-content: space-between;
  324. align-items: baseline;
  325. padding: 12px 0;
  326. }
  327. }
  328. .post-day {
  329. flex-shrink: 0;
  330. margin-left: 1em;
  331. @include dimmed;
  332. }
  333. }
  334. // single.html
  335. //
  336. .bg-img {
  337. width: 100vw;
  338. height: 100vh;
  339. opacity: .03;
  340. z-index: -1;
  341. position: fixed;
  342. top: 0;
  343. background-attachment: fixed;
  344. background-repeat: no-repeat;
  345. background-size: cover;
  346. background-position: center;
  347. transition: opacity .5s;
  348. }
  349. .show-bg-img {
  350. z-index: 100;
  351. opacity: 1;
  352. cursor: pointer;
  353. }
  354. .post-header {
  355. margin-top: 1.2em;
  356. line-height: normal;
  357. .post-meta {
  358. font-size: .9em;
  359. letter-spacing: normal;
  360. @include dimmed;
  361. }
  362. h1 {
  363. margin-top: .1em;
  364. }
  365. }
  366. hr.post-end {
  367. width: 50%;
  368. margin-top: 1.6em;
  369. margin-bottom: .8em;
  370. margin-left: 0;
  371. border-style: solid;
  372. border-bottom-width: 4px;
  373. }
  374. .content {
  375. text-align: justify;
  376. text-justify: inter-ideograph; //For IE/Edge
  377. @include aTag;
  378. figure {
  379. max-width: 100%;
  380. height: auto;
  381. margin: 0;
  382. text-align: center;
  383. p {
  384. font-size: .8em;
  385. font-style: italic;
  386. @include dimmed;
  387. }
  388. }
  389. figure.left {
  390. float: left;
  391. margin-right: 1.5em;
  392. max-width: 50%;
  393. }
  394. figure.right {
  395. float: right;
  396. margin-left: 1.5em;
  397. max-width: 50%;
  398. }
  399. figure.big {
  400. max-width: 100vw;
  401. }
  402. img {
  403. display: block;
  404. max-width: 100%;
  405. height: auto;
  406. margin: auto;
  407. border-radius: 4px;
  408. }
  409. ul,
  410. ol {
  411. padding: 0;
  412. margin-left: 1.8em;
  413. }
  414. a.anchor {
  415. float: left;
  416. margin-left: -20px;
  417. padding-right: 6px;
  418. box-shadow: none;
  419. opacity: .8;
  420. &:hover {
  421. background: none;
  422. color: $theme;
  423. opacity: 1;
  424. }
  425. svg {
  426. display: inline-block;
  427. width: 14px;
  428. height: 14px;
  429. vertical-align: baseline;
  430. visibility: hidden;
  431. }
  432. &:focus svg {
  433. visibility: visible;
  434. }
  435. }
  436. h1:hover a.anchor svg,
  437. h2:hover a.anchor svg,
  438. h3:hover a.anchor svg,
  439. h4:hover a.anchor svg,
  440. h5:hover a.anchor svg,
  441. h6:hover a.anchor svg {
  442. visibility: visible;
  443. }
  444. }
  445. .footnotes {
  446. font-size: .85em;
  447. a {
  448. box-shadow: none;
  449. text-decoration: underline;
  450. transition-property: color;
  451. &:hover {
  452. background: transparent;
  453. }
  454. &.footnote-return {
  455. text-decoration: none;
  456. }
  457. }
  458. ol {
  459. line-height: 1.8;
  460. }
  461. }
  462. .footnote-ref a {
  463. box-shadow: none;
  464. text-decoration: none;
  465. padding: 2px;
  466. border-radius: 2px;
  467. background-color: $midnightblue;
  468. }
  469. .post-info {
  470. font-size: .8rem;
  471. line-height: normal;
  472. @include dimmed;
  473. p {
  474. margin: .8em 0;
  475. }
  476. a:hover {
  477. border-bottom: 2px solid $theme;
  478. }
  479. svg {
  480. margin-right: .8em;
  481. }
  482. .tag {
  483. margin-right: .5em;
  484. &::before {
  485. content: "#"
  486. }
  487. }
  488. }
  489. #toc {
  490. position: fixed;
  491. left: 50%;
  492. top: 0;
  493. display: none;
  494. }
  495. .toc-title {
  496. margin-left: 1em;
  497. margin-bottom: .5em;
  498. font-size: .8em;
  499. font-weight: bold;
  500. opacity: .8;
  501. }
  502. #TableOfContents {
  503. font-size: .8em;
  504. @include dimmed;
  505. ul {
  506. padding-left: 1em;
  507. margin: 0;
  508. }
  509. &>ul {
  510. list-style-type: none;
  511. ul ul {
  512. font-size: .9em;
  513. }
  514. }
  515. a:hover {
  516. border-bottom: $theme 2px solid;
  517. }
  518. }
  519. .post-nav {
  520. display: flex;
  521. justify-content: space-between;
  522. margin-top: 1.5em;
  523. margin-bottom: 2.5em;
  524. font-size: 1.2em;
  525. a {
  526. flex-basis: 50%;
  527. flex-grow: 1;
  528. }
  529. .next-post {text-align: left; padding-right: 5px;}
  530. .prev-post {text-align: right; padding-left: 5px;}
  531. .post-nav-label {
  532. font-size: .8em;
  533. opacity: .8;
  534. text-transform: uppercase;
  535. }
  536. }
  537. // Comments
  538. //
  539. #comments-loader {
  540. text-align: center;
  541. font-size: 2.5em;
  542. margin-top: 2.5em;
  543. svg {
  544. animation-duration: 1.2s;
  545. }
  546. }
  547. #comments {
  548. margin-top: 3em;
  549. * {
  550. color: $text;
  551. line-height: 1.5;
  552. }
  553. .vcontrol {
  554. letter-spacing: normal;
  555. }
  556. .vbtn {
  557. background-color: #7d828a;
  558. }
  559. .vwrap {
  560. border: 2px solid $text;
  561. input {
  562. border-bottom-width: 2px;
  563. }
  564. }
  565. .vsys {
  566. background-color: $highlight-grey;
  567. opacity: .5;
  568. }
  569. .vat:hover {
  570. color: $theme;
  571. }
  572. .vh {
  573. border-bottom: none;
  574. .vquote {
  575. border-left: 3px dotted #979ca5;
  576. }
  577. }
  578. .vcontent {
  579. padding: 0;
  580. code {
  581. margin: 0 4px;
  582. color: #eee;
  583. background: $highlight-grey;
  584. }
  585. pre {
  586. color: #eee;
  587. background: $midnightblue;
  588. padding: 1em 1.5em;
  589. border-radius: 5px;
  590. code {
  591. background: $midnightblue;
  592. }
  593. }
  594. }
  595. }
  596. // Media Queries
  597. //
  598. @media (min-width: 800px) {
  599. .site-main {
  600. margin-top: 3em;
  601. }
  602. hr.post-end {
  603. width: 40%;
  604. }
  605. }
  606. @media (min-width: 960px) {
  607. .site-main {
  608. margin-top: 6em;
  609. }
  610. }
  611. @media (min-width: 1300px) {
  612. .site-main {
  613. margin-top: 8em;
  614. }
  615. .desktop-only,
  616. #toc.show-toc {
  617. display: block;
  618. }
  619. .desktop-only-ib {
  620. display: inline-block;
  621. }
  622. figure.left {
  623. margin-left: -240px;
  624. p {
  625. text-align: left;
  626. }
  627. }
  628. figure.right {
  629. margin-right: -240px;
  630. p {
  631. text-align: right;
  632. }
  633. }
  634. figure.big {
  635. width: 1200px;
  636. margin-left: -240px;
  637. }
  638. hr.post-end {
  639. width: 30%;
  640. }
  641. #toc {
  642. top: 13em;
  643. margin-left: 370px;
  644. max-width: 220px;
  645. }
  646. }
  647. @media (min-width: 1800px) {
  648. .site-main {
  649. margin-top: 10em;
  650. }
  651. .section-inner {
  652. max-width: 1600px;
  653. }
  654. .thin {
  655. max-width: 960px;
  656. }
  657. figure.left {
  658. max-width: 75%;
  659. margin-left: -320px;
  660. }
  661. figure.right {
  662. max-width: 75%;
  663. margin-right: -320px;
  664. }
  665. figure.big {
  666. width: 1600px;
  667. margin-left: -320px;
  668. }
  669. hr.post-end {
  670. width: 30%;
  671. }
  672. #toc {
  673. top: 15em;
  674. margin-left: 490px;
  675. max-width: 300px;
  676. }
  677. }
  678. @media (max-width: 760px) {
  679. .hide-in-mobile,
  680. .site-nav.hide-in-mobile {
  681. display: none;
  682. }
  683. #menu-btn {
  684. display: inline-block;
  685. }
  686. .posts-group {
  687. display: block;
  688. .post-year {
  689. margin: -6px 0 4px;
  690. }
  691. }
  692. #spotlight.error-404 {
  693. flex-direction: column;
  694. text-align: center;
  695. .banner-404 {
  696. margin: 0;
  697. }
  698. }
  699. }
  700. @media (max-width: 520px) {
  701. .content figure.left,
  702. .content figure.right {
  703. float: unset;
  704. max-width: 100%;
  705. margin: 0;
  706. }
  707. hr.post-end {
  708. width: 60%;
  709. }
  710. #mobile-menu {
  711. right: 1.2em;
  712. }
  713. }