1
0

style.scss 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  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. // Header & Footer
  125. //
  126. #site-header {
  127. position: fixed;
  128. z-index: 1;
  129. bottom: 0;
  130. width: 100%;
  131. box-sizing: border-box;
  132. box-shadow: -1px -2px 3px rgba(0,0,0,0.45);
  133. background-color: $dark-grey;
  134. }
  135. .hdr-wrapper {
  136. display: flex;
  137. justify-content: space-between;
  138. padding: .5em 0;
  139. font-size: 1.2rem;
  140. a {
  141. border: none;
  142. }
  143. .site-branding {
  144. display: inline-block;
  145. margin-right: .8em;
  146. font-size: 1.2em;
  147. }
  148. .site-nav {
  149. display: inline-block;
  150. font-size: 1.1em;
  151. opacity: .8;
  152. a {
  153. margin-left: .8em;
  154. }
  155. }
  156. }
  157. .hdr-icons {
  158. display: inline-block;
  159. font-size: 1.2em;
  160. a {
  161. margin-left: .3em;
  162. }
  163. }
  164. .hdr-btn {
  165. border: none;
  166. background: none;
  167. padding: 0;
  168. cursor: pointer;
  169. }
  170. #menu-btn, #search-btn {
  171. display: none;
  172. cursor: pointer;
  173. }
  174. #mobile-menu {
  175. position: fixed;
  176. bottom: 4.8em;
  177. right: 1.5em;
  178. padding: .6em 1.8em;
  179. z-index: 1;
  180. box-sizing: border-box;
  181. box-shadow: -1px -2px 3px 0px rgba(0,0,0,0.45);
  182. background-color: $dark-grey;
  183. a {
  184. border: none;
  185. }
  186. ul {
  187. list-style: none;
  188. margin: 0;
  189. padding: 0;
  190. line-height: 2;
  191. font-size: 1.2em;
  192. }
  193. }
  194. #site-footer {
  195. text-align: center;
  196. font-size: .9em;
  197. margin-bottom: 96px;
  198. margin-top: 64px;
  199. p {
  200. margin: 0;
  201. }
  202. }
  203. #copyright a {
  204. border: none;
  205. }
  206. // Spotlight
  207. //
  208. #spotlight {
  209. display: flex;
  210. height: 100vh;
  211. flex-direction: column;
  212. align-items: center;
  213. justify-content: center;
  214. font-size: 1.5rem;
  215. &.error-404 {
  216. flex-direction: row;
  217. line-height: normal;
  218. }
  219. }
  220. p.catguard {
  221. margin: 0;
  222. img {
  223. max-width: 250px;
  224. height: auto;
  225. }
  226. }
  227. .banner-404 {
  228. margin-left: 2em;
  229. h1 {
  230. font-size: 3em;
  231. margin: .5rem 0 1rem;
  232. }
  233. p {
  234. margin-top: 0;
  235. margin-bottom: .8em;
  236. }
  237. .btn-404 {
  238. font-size: .8em;
  239. a {
  240. display: inline-block;
  241. border: 2px solid $text;
  242. border-radius: 5px;
  243. padding: 5px;
  244. transition-property: color, border-color;
  245. word-break: break-all;
  246. &:first-child {
  247. margin-right: 1em;
  248. }
  249. &:hover {
  250. border-color: #fff;
  251. }
  252. svg {
  253. margin-right: .5em;
  254. }
  255. }
  256. }
  257. }
  258. #home-title {
  259. margin: 0;
  260. }
  261. #home-social {
  262. font-size: 1.4em;
  263. }
  264. #home-nav a{
  265. display: block;
  266. border: none;
  267. text-align: center;
  268. margin-top: .5em;
  269. }
  270. // list.html
  271. //
  272. .posts-group {
  273. display: flex;
  274. .post-year{
  275. font-size: 1.6em;
  276. margin: 0.4em 2em 1em 0;
  277. @include dimmed;
  278. }
  279. .posts-list {
  280. flex-grow: 1;
  281. margin: 16px 0;
  282. padding: 0;
  283. list-style: none;
  284. }
  285. .post-item {
  286. margin-bottom: 10px;
  287. padding: 2px 4px;
  288. border-radius: 3px;
  289. transition-property: background-color;
  290. transition-duration: .5s;
  291. transition-timing-function: ease-out;
  292. a {
  293. display: flex;
  294. justify-content: space-between;
  295. align-items: baseline;
  296. border: none;
  297. }
  298. &:hover {
  299. background-color: $highlight-grey;
  300. }
  301. }
  302. .post-day {
  303. flex-shrink: 0;
  304. margin-left: 1em;
  305. @include dimmed;
  306. }
  307. }
  308. // single.html
  309. //
  310. .bg-img {
  311. width: 100%;
  312. height: 100%;
  313. opacity: .03;
  314. z-index: -1;
  315. position: fixed;
  316. top: 0;
  317. background-attachment: fixed;
  318. background-repeat: no-repeat;
  319. background-size: cover;
  320. background-position: center;
  321. transition: opacity .5s;
  322. }
  323. .show-bg-img {
  324. z-index: 100;
  325. opacity: 1;
  326. }
  327. #show-img-btn {
  328. margin-right: .5em;
  329. }
  330. .post-header {
  331. margin-top: 1.2em;
  332. line-height: normal;
  333. .post-meta {
  334. font-size: .9em;
  335. letter-spacing: normal;
  336. @include dimmed;
  337. }
  338. h1 {
  339. margin-top: .1em;
  340. }
  341. }
  342. hr.post-end {
  343. width: 50%;
  344. margin-top: 1.6em;
  345. margin-bottom: .8em;
  346. margin-left: 0;
  347. border-style: solid;
  348. border-bottom-width: 4px;
  349. }
  350. .content {
  351. text-align: justify;
  352. text-justify: inter-ideograph; //For IE/Edge
  353. @include aTag;
  354. figure {
  355. max-width: 100;
  356. height: auto;
  357. margin: 0;
  358. text-align: center;
  359. p {
  360. margin-top: 0;
  361. }
  362. }
  363. img {
  364. display: block;
  365. max-width: 100%;
  366. height: auto;
  367. margin: auto;
  368. border-radius: 4px;
  369. }
  370. ul, ol {
  371. padding: 0;
  372. margin-left: 1.8em;
  373. }
  374. }
  375. figure.left {
  376. float: left;
  377. margin-right: 1em;
  378. }
  379. figure.right {
  380. float: right;
  381. margin-left: 1em;
  382. }
  383. .footnote-ref a, a.footnote-return {
  384. border: none;
  385. &:hover {
  386. background: transparent;
  387. }
  388. }
  389. .post-info {
  390. font-size: .8rem;
  391. line-height: normal;
  392. @include dimmed;
  393. svg {
  394. margin-right: .8em;
  395. }
  396. a {
  397. border: transparent;
  398. }
  399. .tag {
  400. margin-right: .5em;
  401. &::before {
  402. content: "#"
  403. }
  404. }
  405. }
  406. .post-nav {
  407. display: flex;
  408. justify-content: space-between;
  409. margin-top: 1.5em;
  410. font-size: 1.2em;
  411. a {
  412. flex-basis: 50%;
  413. flex-grow: 1;
  414. border-bottom: transparent;
  415. }
  416. .next-post {text-align: left; padding-right: 5px;}
  417. .prev-post {text-align: right; padding-left: 5px;}
  418. .post-nav-label {
  419. font-size: .8em;
  420. opacity: .8;
  421. text-transform: uppercase;
  422. }
  423. }
  424. // Comments
  425. //
  426. #comments-loader {
  427. text-align: center;
  428. font-size: 2.5em;
  429. margin-top: 2.5em;
  430. svg {
  431. animation-duration: 1.2s;
  432. }
  433. }
  434. #comments {
  435. margin-top: 3em;
  436. * {
  437. color: $text;
  438. line-height: 1.5;
  439. }
  440. .vcontrol {
  441. letter-spacing: normal;
  442. }
  443. .vbtn {
  444. background-color: #7d828a;
  445. }
  446. .vwrap {
  447. border: 2px solid $text;
  448. input {
  449. border-bottom-width: 2px;
  450. }
  451. }
  452. .vsys {
  453. background-color: $highlight-grey;
  454. opacity: .5;
  455. }
  456. .vat {
  457. color: $theme;
  458. }
  459. .vh {
  460. border-bottom: transparent;
  461. .vquote {
  462. border-left: 3px dotted #979ca5;
  463. }
  464. }
  465. .vcontent {
  466. padding: 0;
  467. code {
  468. margin: 0 4px;
  469. color: #eee;
  470. background: $highlight-grey;
  471. }
  472. pre {
  473. color: #eee;
  474. background: $midnightblue;
  475. padding: 1em 1.5em;
  476. border-radius: 5px;
  477. code {
  478. background: $midnightblue;
  479. }
  480. }
  481. }
  482. }
  483. @media (min-width: 800px) {
  484. .site-main {
  485. margin-top: 3em;
  486. }
  487. hr.post-end {
  488. width: 40%;
  489. }
  490. }
  491. @media (min-width: 960px) {
  492. .site-main {
  493. margin-top: 6em;
  494. }
  495. }
  496. @media (min-width: 1300px) {
  497. .site-main {
  498. margin-top: 8em;
  499. }
  500. hr.post-end {
  501. width: 30%;
  502. }
  503. }
  504. @media (min-width: 1800px) {
  505. .site-main {
  506. margin-top: 10em;
  507. }
  508. .section-inner {
  509. max-width: 1600px;
  510. }
  511. .thin {
  512. max-width: 960px;
  513. }
  514. hr.post-end {
  515. width: 30%;
  516. }
  517. }
  518. @media (max-width: 760px) {
  519. .hide-in-mobile, .site-nav.hide-in-mobile {
  520. display: none;
  521. }
  522. #menu-btn, #search-btn {
  523. display: inline-block;
  524. }
  525. .posts-group {
  526. display: block;
  527. margin-bottom: 2.5em;
  528. .post-year {
  529. margin-right: 0;
  530. margin-bottom: 8px;
  531. border-bottom: 2px dashed;
  532. }
  533. }
  534. #spotlight.error-404 {
  535. flex-direction: column;
  536. text-align: center;
  537. .banner-404 {
  538. margin: 0;
  539. }
  540. }
  541. }
  542. @media (max-width: 520px) {
  543. figure.left, figure.right {
  544. float: unset;
  545. margin: 0;
  546. }
  547. hr.post-end {
  548. width: 60%;
  549. }
  550. #mobile-menu {
  551. right: 1.2em;
  552. }
  553. }