style.scss 8.4 KB

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