style.scss 8.9 KB

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