style.scss 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  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. #home-title {
  244. margin: 0;
  245. }
  246. #home-social {
  247. font-size: 1.4em;
  248. }
  249. #home-nav a{
  250. display: block;
  251. border: none;
  252. text-align: center;
  253. margin-top: .5em;
  254. }
  255. // list.html
  256. //
  257. .posts-group {
  258. display: flex;
  259. .post-year{
  260. font-size: 1.6em;
  261. margin: 0.4em 2em 1em 0;
  262. @include dimmed;
  263. }
  264. .posts-list {
  265. flex-grow: 1;
  266. margin: 16px 0;
  267. padding: 0;
  268. list-style: none;
  269. }
  270. .post-item {
  271. margin-bottom: 10px;
  272. padding: 2px 4px;
  273. border-radius: 3px;
  274. transition-property: background-color;
  275. transition-duration: .5s;
  276. transition-timing-function: ease-out;
  277. a {
  278. display: flex;
  279. justify-content: space-between;
  280. align-items: baseline;
  281. border: none;
  282. }
  283. &:hover {
  284. background-color: $highlight-grey;
  285. }
  286. }
  287. .post-day {
  288. flex-shrink: 0;
  289. margin-left: 1em;
  290. @include dimmed;
  291. }
  292. }
  293. // single.html
  294. //
  295. .bg-img {
  296. width: 100%;
  297. height: 100%;
  298. opacity: .03;
  299. z-index: -1;
  300. position: fixed;
  301. top: 0;
  302. background-attachment: fixed;
  303. background-repeat: no-repeat;
  304. background-size: cover;
  305. background-position: center;
  306. transition: opacity .5s;
  307. }
  308. .show-bg-img {
  309. z-index: 100;
  310. opacity: 1;
  311. }
  312. #show-img-btn {
  313. margin-right: .5em;
  314. }
  315. .post-header {
  316. margin-top: 1.2em;
  317. line-height: normal;
  318. .post-meta {
  319. font-size: .9em;
  320. letter-spacing: normal;
  321. @include dimmed;
  322. }
  323. h1 {
  324. margin-top: .1em;
  325. }
  326. }
  327. hr.post-end {
  328. width: 50%;
  329. margin-top: 1.6em;
  330. margin-bottom: .8em;
  331. margin-left: 0;
  332. border-style: solid;
  333. border-bottom-width: 4px;
  334. }
  335. .content {
  336. text-align: justify;
  337. text-justify: inter-ideograph; //For IE/Edge
  338. @include aTag;
  339. figure {
  340. max-width: 100;
  341. height: auto;
  342. margin: 0;
  343. text-align: center;
  344. p {
  345. margin-top: 0;
  346. }
  347. }
  348. img {
  349. max-width: 100%;
  350. height: auto;
  351. border-radius: 4px;
  352. }
  353. ul, ol {
  354. padding: 0;
  355. margin-left: 1.8em;
  356. }
  357. }
  358. figure.left {
  359. float: left;
  360. margin-right: 1em;
  361. }
  362. figure.right {
  363. float: right;
  364. margin-left: 1em;
  365. }
  366. .footnote-ref a, a.footnote-return {
  367. border: none;
  368. &:hover {
  369. background: transparent;
  370. }
  371. }
  372. .post-info {
  373. font-size: .8rem;
  374. line-height: normal;
  375. @include dimmed;
  376. .tag {
  377. margin-right: .1em;
  378. &::before {
  379. content: "#"
  380. }
  381. a {
  382. border: none;
  383. }
  384. }
  385. }
  386. // Comments
  387. //
  388. #comments-loader {
  389. text-align: center;
  390. font-size: 2.5em;
  391. margin-top: 2.5em;
  392. svg {
  393. animation-duration: 1.2s;
  394. }
  395. }
  396. #comments {
  397. margin-top: 3em;
  398. * {
  399. color: $text;
  400. line-height: 1.5;
  401. }
  402. .vcontrol {
  403. letter-spacing: normal;
  404. }
  405. .vbtn {
  406. background-color: #7d828a;
  407. }
  408. .vwrap {
  409. border: 2px solid $text;
  410. input {
  411. border-bottom-width: 2px;
  412. }
  413. }
  414. .vsys {
  415. background-color: $highlight-grey;
  416. opacity: .5;
  417. }
  418. .vat {
  419. color: $theme;
  420. }
  421. .vh {
  422. border-bottom: 4px solid #5c6372;
  423. .vquote {
  424. border-left: 3px dotted #979ca5;
  425. }
  426. }
  427. .vcontent {
  428. padding: 0;
  429. code {
  430. margin: auto 4px;
  431. color: #eee;
  432. background: $highlight-grey;
  433. }
  434. pre {
  435. color: #eee;
  436. background: $midnightblue;
  437. padding: 1em 1.5em;
  438. border-radius: 5px;
  439. display: block;
  440. code {
  441. background: $midnightblue;
  442. }
  443. }
  444. }
  445. }
  446. @media (min-width: 800px) {
  447. .site-main {
  448. margin-top: 3em;
  449. }
  450. hr.post-end {
  451. width: 40%;
  452. }
  453. }
  454. @media (min-width: 960px) {
  455. .site-main {
  456. margin-top: 6em;
  457. }
  458. }
  459. @media (min-width: 1300px) {
  460. .site-main {
  461. margin-top: 8em;
  462. }
  463. hr.post-end {
  464. width: 30%;
  465. }
  466. }
  467. @media (min-width: 1800px) {
  468. .site-main {
  469. margin-top: 10em;
  470. }
  471. .section-inner {
  472. max-width: 1600px;
  473. }
  474. .thin {
  475. max-width: 960px;
  476. }
  477. hr.post-end {
  478. width: 30%;
  479. }
  480. }
  481. @media (max-width: 760px) {
  482. .hide-in-mobile, .site-nav.hide-in-mobile {
  483. display: none;
  484. }
  485. #menu-btn, #search-btn {
  486. display: inline-block;
  487. }
  488. .posts-group {
  489. display: block;
  490. margin-bottom: 2.5em;
  491. .post-year {
  492. margin-right: 0;
  493. margin-bottom: 8px;
  494. border-bottom: 2px dashed;
  495. }
  496. }
  497. #spotlight.error-404 {
  498. flex-direction: column;
  499. text-align: center;
  500. .banner-404 {
  501. margin: 0;
  502. }
  503. }
  504. }
  505. @media (max-width: 520px) {
  506. figure.left, figure.right {
  507. float: unset;
  508. margin: 0;
  509. }
  510. hr.post-end {
  511. width: 60%;
  512. }
  513. }