style.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827
  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. }
  22. body,
  23. button,
  24. input,
  25. select,
  26. textarea {
  27. color: $text;
  28. font-family: $fonts;
  29. }
  30. pre,
  31. code,
  32. pre tt {
  33. font-family: $code-fonts;
  34. }
  35. pre {
  36. max-height: 40em;
  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-wrap;
  43. word-wrap: break-word;
  44. color: #eee;
  45. background: $midnightblue;
  46. border-radius: 4px;
  47. // -webkit-overflow-scrolling: touch;
  48. code {
  49. padding: 0;
  50. margin: 0;
  51. background: $midnightblue;
  52. }
  53. }
  54. code {
  55. color: #eee;
  56. background: $highlight-grey;
  57. border-radius: 3px;
  58. padding: 0 3px;
  59. margin: 0 4px;
  60. word-break: break-all;
  61. letter-spacing: normal;
  62. }
  63. blockquote {
  64. border-left: .25em solid;
  65. margin: 1em;
  66. padding: 0 1em;
  67. font-style: italic;
  68. cite {
  69. font-weight: bold;
  70. font-style: normal;
  71. &::before {
  72. content: "—— ";
  73. }
  74. }
  75. }
  76. a {
  77. color: $text;
  78. text-decoration: none;
  79. border: none;
  80. transition-property: color;
  81. transition-duration: .4s;
  82. transition-timing-function: ease-out;
  83. &:hover {
  84. color: #fff;
  85. }
  86. }
  87. hr {
  88. opacity: .2;
  89. border-width: 0 0 5px 0;
  90. border-style: dashed;
  91. background: transparent;
  92. width: 50%;
  93. margin: 1.8em auto;
  94. }
  95. table {
  96. border-collapse: collapse;
  97. border-spacing: 0;
  98. empty-cells: show;
  99. width: 100%;
  100. max-width: 100%;
  101. th,
  102. td {
  103. padding: 1.5%;
  104. border: 1px solid;
  105. }
  106. th {
  107. font-weight: 700;
  108. vertical-align: bottom;
  109. }
  110. }
  111. .section-inner {
  112. margin: 0 auto;
  113. max-width: 1200px;
  114. width: 93%;
  115. }
  116. .thin {
  117. max-width: 720px;
  118. margin: auto;
  119. }
  120. .feather {
  121. display: inline-block;
  122. vertical-align: -.125em;
  123. width: 1em;
  124. height: 1em;
  125. }
  126. .desktop-only, .desktop-only-ib {
  127. display: none;
  128. }
  129. // Header & Footer
  130. //
  131. #site-header {
  132. position: fixed;
  133. z-index: 1;
  134. bottom: 0;
  135. width: 100%;
  136. box-sizing: border-box;
  137. box-shadow: -1px -2px 3px rgba(0, 0, 0, 0.45);
  138. background-color: $dark-grey;
  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. }
  310. .posts-list {
  311. flex-grow: 1;
  312. margin: 0;
  313. padding: 0;
  314. list-style: none;
  315. }
  316. .post-item {
  317. border-bottom: 1px $highlight-grey dashed;
  318. a {
  319. display: flex;
  320. justify-content: space-between;
  321. align-items: baseline;
  322. padding: 12px 0;
  323. }
  324. }
  325. .post-day {
  326. flex-shrink: 0;
  327. margin-left: 1em;
  328. @include dimmed;
  329. }
  330. }
  331. // single.html
  332. //
  333. .bg-img {
  334. width: 100vw;
  335. height: 100vh;
  336. opacity: .03;
  337. z-index: -1;
  338. position: fixed;
  339. top: 0;
  340. background-attachment: fixed;
  341. background-repeat: no-repeat;
  342. background-size: cover;
  343. background-position: center;
  344. transition: opacity .5s;
  345. }
  346. .show-bg-img {
  347. z-index: 100;
  348. opacity: 1;
  349. cursor: pointer;
  350. }
  351. .post-header {
  352. margin-top: 1.2em;
  353. line-height: normal;
  354. .post-meta {
  355. font-size: .9em;
  356. letter-spacing: normal;
  357. @include dimmed;
  358. }
  359. h1 {
  360. margin-top: .1em;
  361. }
  362. }
  363. hr.post-end {
  364. width: 50%;
  365. margin-top: 1.6em;
  366. margin-bottom: .8em;
  367. margin-left: 0;
  368. border-style: solid;
  369. border-bottom-width: 4px;
  370. }
  371. .content {
  372. text-align: justify;
  373. text-justify: inter-ideograph; //For IE/Edge
  374. @include aTag;
  375. figure {
  376. max-width: 100%;
  377. height: auto;
  378. margin: 0;
  379. text-align: center;
  380. p {
  381. font-size: .8em;
  382. font-style: italic;
  383. @include dimmed;
  384. }
  385. }
  386. figure.left {
  387. float: left;
  388. margin-right: 1.5em;
  389. max-width: 50%;
  390. }
  391. figure.right {
  392. float: right;
  393. margin-left: 1.5em;
  394. max-width: 50%;
  395. }
  396. figure.big {
  397. max-width: 100vw;
  398. }
  399. img {
  400. display: block;
  401. max-width: 100%;
  402. height: auto;
  403. margin: auto;
  404. border-radius: 4px;
  405. }
  406. ul,
  407. ol {
  408. padding: 0;
  409. margin-left: 1.8em;
  410. }
  411. }
  412. .footnotes {
  413. font-size: .85em;
  414. a {
  415. box-shadow: none;
  416. text-decoration: underline;
  417. transition-property: color;
  418. &:hover {
  419. background: transparent;
  420. }
  421. &.footnote-return {
  422. text-decoration: none;
  423. }
  424. }
  425. ol {
  426. line-height: 1.8;
  427. }
  428. }
  429. .footnote-ref a {
  430. box-shadow: none;
  431. text-decoration: none;
  432. padding: 2px;
  433. border-radius: 2px;
  434. background-color: $midnightblue;
  435. }
  436. .post-info {
  437. font-size: .8rem;
  438. line-height: normal;
  439. @include dimmed;
  440. p {
  441. margin: .8em 0;
  442. }
  443. a:hover {
  444. border-bottom: 2px solid $theme;
  445. }
  446. svg {
  447. margin-right: .8em;
  448. }
  449. .tag {
  450. margin-right: .5em;
  451. &::before {
  452. content: "#"
  453. }
  454. }
  455. }
  456. #toc {
  457. position: fixed;
  458. left: 50%;
  459. top: 0;
  460. display: none;
  461. }
  462. .toc-title {
  463. margin-left: 1em;
  464. margin-bottom: .5em;
  465. font-size: .8em;
  466. font-weight: bold;
  467. opacity: .8;
  468. }
  469. #TableOfContents {
  470. font-size: .8em;
  471. @include dimmed;
  472. ul {
  473. padding-left: 1em;
  474. margin: 0;
  475. }
  476. &>ul {
  477. list-style-type: none;
  478. ul ul {
  479. font-size: .9em;
  480. }
  481. }
  482. a:hover {
  483. border-bottom: $theme 2px solid;
  484. }
  485. }
  486. .post-nav {
  487. display: flex;
  488. justify-content: space-between;
  489. margin-top: 1.5em;
  490. margin-bottom: 2.5em;
  491. font-size: 1.2em;
  492. a {
  493. flex-basis: 50%;
  494. flex-grow: 1;
  495. }
  496. .next-post {text-align: left; padding-right: 5px;}
  497. .prev-post {text-align: right; padding-left: 5px;}
  498. .post-nav-label {
  499. font-size: .8em;
  500. opacity: .8;
  501. text-transform: uppercase;
  502. }
  503. }
  504. // Comments
  505. //
  506. #comments-loader {
  507. text-align: center;
  508. font-size: 2.5em;
  509. margin-top: 2.5em;
  510. svg {
  511. animation-duration: 1.2s;
  512. }
  513. }
  514. #comments {
  515. margin-top: 3em;
  516. * {
  517. color: $text;
  518. line-height: 1.5;
  519. }
  520. .vcontrol {
  521. letter-spacing: normal;
  522. }
  523. .vbtn {
  524. background-color: #7d828a;
  525. }
  526. .vwrap {
  527. border: 2px solid $text;
  528. input {
  529. border-bottom-width: 2px;
  530. }
  531. }
  532. .vsys {
  533. background-color: $highlight-grey;
  534. opacity: .5;
  535. }
  536. .vat:hover {
  537. color: $theme;
  538. }
  539. .vh {
  540. border-bottom: none;
  541. .vquote {
  542. border-left: 3px dotted #979ca5;
  543. }
  544. }
  545. .vcontent {
  546. padding: 0;
  547. code {
  548. margin: 0 4px;
  549. color: #eee;
  550. background: $highlight-grey;
  551. }
  552. pre {
  553. color: #eee;
  554. background: $midnightblue;
  555. padding: 1em 1.5em;
  556. border-radius: 5px;
  557. code {
  558. background: $midnightblue;
  559. }
  560. }
  561. }
  562. }
  563. // Media Queries
  564. //
  565. @media (min-width: 800px) {
  566. .site-main {
  567. margin-top: 3em;
  568. }
  569. hr.post-end {
  570. width: 40%;
  571. }
  572. }
  573. @media (min-width: 960px) {
  574. .site-main {
  575. margin-top: 6em;
  576. }
  577. }
  578. @media (min-width: 1300px) {
  579. .site-main {
  580. margin-top: 8em;
  581. }
  582. .desktop-only,
  583. #toc.show-toc {
  584. display: block;
  585. }
  586. .desktop-only-ib {
  587. display: inline-block;
  588. }
  589. figure.left {
  590. margin-left: -240px;
  591. p {
  592. text-align: left;
  593. }
  594. }
  595. figure.right {
  596. margin-right: -240px;
  597. p {
  598. text-align: right;
  599. }
  600. }
  601. figure.big {
  602. width: 1200px;
  603. margin-left: -240px;
  604. }
  605. hr.post-end {
  606. width: 30%;
  607. }
  608. #toc {
  609. top: 13em;
  610. margin-left: 370px;
  611. max-width: 220px;
  612. }
  613. }
  614. @media (min-width: 1800px) {
  615. .site-main {
  616. margin-top: 10em;
  617. }
  618. .section-inner {
  619. max-width: 1600px;
  620. }
  621. .thin {
  622. max-width: 960px;
  623. }
  624. figure.left {
  625. max-width: 75%;
  626. margin-left: -320px;
  627. }
  628. figure.right {
  629. max-width: 75%;
  630. margin-right: -320px;
  631. }
  632. figure.big {
  633. width: 1600px;
  634. margin-left: -320px;
  635. }
  636. hr.post-end {
  637. width: 30%;
  638. }
  639. #toc {
  640. top: 15em;
  641. margin-left: 490px;
  642. max-width: 300px;
  643. }
  644. }
  645. @media (max-width: 760px) {
  646. .hide-in-mobile,
  647. .site-nav.hide-in-mobile {
  648. display: none;
  649. }
  650. #menu-btn {
  651. display: inline-block;
  652. }
  653. .posts-group {
  654. display: block;
  655. .post-year {
  656. margin: -6px 0 4px;
  657. }
  658. }
  659. #spotlight.error-404 {
  660. flex-direction: column;
  661. text-align: center;
  662. .banner-404 {
  663. margin: 0;
  664. }
  665. }
  666. }
  667. @media (max-width: 520px) {
  668. .content figure.left,
  669. .content figure.right {
  670. float: unset;
  671. max-width: 100%;
  672. margin: 0;
  673. }
  674. hr.post-end {
  675. width: 60%;
  676. }
  677. #mobile-menu {
  678. right: 1.2em;
  679. }
  680. }