style.scss 9.6 KB

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