style.scss 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. @import "predefined.scss", "modern-normalize.scss", "syntax.scss";
  2. :root {
  3. --offset: 0;
  4. --vw: 1vw;
  5. }
  6. html {
  7. scroll-behavior: smooth;
  8. font-size: 1rem;
  9. }
  10. body {
  11. --c-bg: #f3f6f6;
  12. --c-bg-alt: #dee8e5;
  13. --c-txt: #545250;
  14. --c-txt-alt: #6d6b69;
  15. }
  16. @media (prefers-color-scheme: dark) {
  17. body {
  18. --c-bg: #27343a;
  19. --c-bg-alt: #364045;
  20. --c-txt: #c8c6c4;
  21. --c-txt-alt: #a19f9d;
  22. }
  23. #page img {
  24. filter: brightness(.9);
  25. }
  26. }
  27. body,
  28. button,
  29. input,
  30. select,
  31. textarea {
  32. color: var(--c-txt);
  33. background-color: var(--c-bg);
  34. line-height: 1.6em;
  35. font-family: $fonts;
  36. letter-spacing: 1px;
  37. transition: background-color .5s, color .5s;
  38. }
  39. pre,
  40. code,
  41. pre tt {
  42. font-family: $mono-fonts;
  43. letter-spacing: normal;
  44. }
  45. pre {
  46. padding: .7em 1.1em;
  47. overflow: auto;
  48. font-size: .9em;
  49. line-height: 1.2;
  50. white-space: pre;
  51. border-radius: 4px;
  52. code {
  53. padding: 0;
  54. margin: 0;
  55. background: transparent;
  56. }
  57. }
  58. code {
  59. background: var(--c-bg-alt);
  60. border-radius: 3px;
  61. padding: 0 3px;
  62. margin: 0 4px;
  63. }
  64. blockquote {
  65. margin: 1.5em 1em;
  66. font-style: italic;
  67. color: var(--c-txt-alt);
  68. &::before {
  69. content: "“ ";
  70. position: absolute;
  71. opacity: 0.3;
  72. font-size: 80px;
  73. transform: translate(-64px,5px);
  74. }
  75. p {
  76. margin-left: 1.2em;
  77. }
  78. cite {
  79. font-weight: bold;
  80. font-style: normal;
  81. margin-left: 1em;
  82. &::before {
  83. content: "—— ";
  84. }
  85. }
  86. }
  87. a {
  88. color: var(--c-txt);
  89. text-decoration: none;
  90. border-bottom: solid 1px var(--c-bg-alt);
  91. transition-property: color, border-color;
  92. transition-duration: .2s;
  93. &:hover {
  94. color: $accent;
  95. border-bottom-color: $accent;
  96. }
  97. &.icon-link {
  98. border-bottom: none;
  99. }
  100. }
  101. table {
  102. border-collapse: collapse;
  103. border-spacing: 0;
  104. empty-cells: show;
  105. width: 100%;
  106. max-width: 100%;
  107. th,
  108. td {
  109. padding: 1.5%;
  110. border: 1px solid;
  111. }
  112. th {
  113. font-weight: bold;
  114. vertical-align: bottom;
  115. }
  116. }
  117. hr {
  118. color: var(--c-bg-alt);
  119. border-top: none;
  120. border-width: 3px 0 0 0;
  121. border-style: dashed;
  122. }
  123. // Global layouts
  124. //
  125. #page {
  126. display: flex;
  127. flex-direction: column;
  128. min-height: 100vh;
  129. }
  130. #bg-img {
  131. position: fixed;
  132. z-index: -1;
  133. top: 0;
  134. width: 100vw;
  135. height: 100vh;
  136. background-image: var(--bg-img);
  137. background-position: center;
  138. background-size: cover;
  139. opacity: .05;
  140. }
  141. main#site-main {
  142. flex-grow: 1;
  143. margin-top: 1em;
  144. }
  145. .wrapper {
  146. width: 100%;
  147. max-width: 100%;
  148. margin: 0 auto;
  149. padding: 0 1em;
  150. }
  151. #home-btn {
  152. border: none;
  153. position: absolute;
  154. &>img{
  155. width: 1.5em;
  156. height: auto;
  157. border-radius: 50%;
  158. }
  159. }
  160. .title-area {
  161. display: flex;
  162. align-items: baseline;
  163. flex-direction: row-reverse;
  164. margin-bottom: 2em;
  165. .title-area-l {
  166. flex: 1;
  167. }
  168. }
  169. h1#page-title {
  170. margin: 0;
  171. font-size: 2em;
  172. line-height: normal;
  173. }
  174. .feather {
  175. display: inline-block;
  176. vertical-align: -.125em;
  177. width: 1em;
  178. height: 1em;
  179. }
  180. @import "partials/home.scss", "partials/404.scss";
  181. @import "partials/single.scss", "partials/list.scss";
  182. @import "partials/header.scss", "partials/footer.scss", "partials/comments.scss";
  183. @media all and (min-width: 550px) {
  184. html {
  185. font-size: 1.1em;
  186. }
  187. #site-footer {
  188. background: transparent;
  189. &>.footer-inner {
  190. display: flex;
  191. flex-direction: row-reverse;
  192. padding-top: 1em;
  193. border-top: 2px solid var(--c-bg-alt);
  194. }
  195. }
  196. .posts-group {
  197. display: flex;
  198. }
  199. .footer-l {
  200. flex: 1;
  201. }
  202. .site-nav > span {
  203. color: var(--c-bg-alt);
  204. }
  205. .social-icon > .icon-link {
  206. margin-left: .4em;
  207. margin-right: 0;
  208. }
  209. .recent-posts-list a {
  210. display: inline;
  211. }
  212. }
  213. @media all and (min-width: 810px) {
  214. main#site-main {
  215. margin-top: 3em;
  216. }
  217. .wrapper {
  218. max-width: 780px;
  219. text-align: justify;
  220. }
  221. #home-btn>img {
  222. width: 2em;
  223. }
  224. #page.error-404 {
  225. flex-direction: row;
  226. }
  227. .content a.anchor {
  228. float: left;
  229. margin-left: -1em;
  230. }
  231. .posts-group {
  232. display: flex;
  233. }
  234. .content figure.big {
  235. margin-left: calc(390px - var(--vw) * 50 - 1em);
  236. }
  237. }
  238. @media all and (min-width: 1250px) {
  239. main#site-main {
  240. margin-top: 4.5em;
  241. }
  242. .wrapper {
  243. max-width: 980px;
  244. }
  245. .content a.anchor {
  246. float: left;
  247. margin-left: -1em;
  248. }
  249. .posts-group {
  250. display: flex;
  251. }
  252. .content figure.big {
  253. margin-left: calc(490px - var(--vw) * 50 - 1em);
  254. }
  255. }
  256. @media all and (min-width: 1590px) {
  257. :root {
  258. --offset: 280px;
  259. }
  260. html {
  261. font-size: 1.2em;
  262. }
  263. main#site-main {
  264. margin-top: 6em;
  265. }
  266. #home-center, #home-footer {
  267. padding-left: 15vw;
  268. padding-right: 15vw;
  269. }
  270. .wrapper {
  271. margin-left: var(--offset);
  272. }
  273. #home-btn {
  274. top: .2em;
  275. right: .8em;
  276. &>img{
  277. width: 1.5em;
  278. }
  279. }
  280. #site-header {
  281. display: block;
  282. }
  283. #toc-btn {
  284. display: none;
  285. }
  286. #toc {
  287. display: block!important;
  288. position: sticky;
  289. float: left;
  290. top: 2em;
  291. width: calc(var(--offset) - 2em);
  292. padding: 0 0 0 1em;
  293. margin-left: calc(0px - var(--offset));
  294. border-right: 2px solid var(--c-bg-alt);
  295. border-radius: 0;
  296. background: transparent;
  297. text-align: right;
  298. .toc-title {
  299. display: block;
  300. padding-right: 1em;
  301. margin-top: 0;
  302. font-weight: bold;
  303. }
  304. }
  305. #TableOfContents {
  306. direction: rtl;
  307. font-size: .8em;
  308. a {
  309. display: inline;
  310. }
  311. }
  312. .content > figure {
  313. text-align: left;
  314. &.big {
  315. width: calc(var(--vw) * 100 - var(--offset) - 1em);
  316. margin-left: 0;
  317. &>img {
  318. margin-left: 0;
  319. }
  320. }
  321. &.right {
  322. margin-right: -280px;
  323. }
  324. }
  325. }
  326. @media all and (min-width: 1800px) {
  327. :root {
  328. --offset: 380px;
  329. }
  330. }