style.scss 8.3 KB

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