style.scss 8.2 KB

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