style.scss 12 KB

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