style.scss 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  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: #faf9f8;
  12. --c-bg-alt: #edebe9;
  13. --c-txt: #3b3a39;
  14. --c-txt-alt: #605e5c;
  15. }
  16. @media (prefers-color-scheme: dark) {
  17. body {
  18. --c-bg: #201f1e;
  19. --c-bg-alt: #3b3a39;
  20. --c-txt: #d2d0ce;
  21. --c-txt-alt: #a19f9d;
  22. img {
  23. filter: brightness(.9);
  24. }
  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: .06em;
  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. letter-spacing: normal;
  64. }
  65. blockquote {
  66. margin: 1.5em 1em;
  67. font-style: italic;
  68. color: var(--c-txt-alt);
  69. &::before {
  70. content: "“ ";
  71. position: absolute;
  72. opacity: 0.3;
  73. font-size: 80px;
  74. transform: translate(-16px,5px);
  75. }
  76. p {
  77. margin-left: 1.2em;
  78. }
  79. cite {
  80. font-weight: bold;
  81. font-style: normal;
  82. margin-left: 1em;
  83. &::before {
  84. content: "—— ";
  85. }
  86. }
  87. }
  88. a {
  89. color: var(--c-txt);
  90. text-decoration: none;
  91. border-bottom: solid 1px var(--c-bg-alt);
  92. transition: color .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/footer.scss", "partials/comments.scss";
  183. @media all and (min-width: 550px) {
  184. html {
  185. font-size: 1.1em;
  186. }
  187. .wrapper#site-footer {
  188. display: flex;
  189. flex-direction: row-reverse;
  190. background: transparent;
  191. }
  192. .posts-group {
  193. display: flex;
  194. }
  195. .footer-l {
  196. flex: 1;
  197. }
  198. .site-nav > span {
  199. color: var(--c-bg-alt);
  200. }
  201. .social-icon > .icon-link {
  202. margin-left: .4em;
  203. margin-right: 0;
  204. }
  205. .recent-posts-list a {
  206. display: inline;
  207. }
  208. }
  209. @media all and (min-width: 810px) {
  210. main#site-main {
  211. margin-top: 3em;
  212. }
  213. .wrapper {
  214. max-width: 780px;
  215. text-align: justify;
  216. }
  217. #home-btn>img {
  218. width: 2em;
  219. }
  220. #page.error-404 {
  221. flex-direction: row;
  222. }
  223. .content a.anchor {
  224. float: left;
  225. margin-left: -1em;
  226. }
  227. .posts-group {
  228. display: flex;
  229. }
  230. .content figure.big {
  231. margin-left: calc(390px - var(--vw) * 50 - 1em);
  232. }
  233. }
  234. @media all and (min-width: 1250px) {
  235. main#site-main {
  236. margin-top: 4.5em;
  237. }
  238. .wrapper {
  239. max-width: 980px;
  240. }
  241. .content a.anchor {
  242. float: left;
  243. margin-left: -1em;
  244. }
  245. .posts-group {
  246. display: flex;
  247. }
  248. .content figure.big {
  249. margin-left: calc(490px - var(--vw) * 50 - 1em);
  250. }
  251. }
  252. @media all and (min-width: 1590px) {
  253. :root {
  254. --offset: 280px;
  255. }
  256. html {
  257. font-size: 1.2em;
  258. }
  259. main#site-main {
  260. margin-top: 6em;
  261. }
  262. #home-center, #home-footer {
  263. padding-left: 15vw;
  264. padding-right: 15vw;
  265. }
  266. .wrapper {
  267. width: 1028px;
  268. margin-left: var(--offset);
  269. }
  270. #toc-btn {
  271. display: none;
  272. }
  273. #toc {
  274. display: block!important;
  275. position: sticky;
  276. float: left;
  277. top: 2em;
  278. width: calc(var(--offset) - 2em);
  279. padding: 0 0 0 1em;
  280. margin-left: calc(0px - var(--offset));
  281. border-right: 1px dashed;
  282. border-radius: 0;
  283. background: transparent;
  284. text-align: right;
  285. .toc-title {
  286. display: block;
  287. padding-right: 1em;
  288. margin-top: 0;
  289. font-weight: bold;
  290. }
  291. }
  292. #TableOfContents {
  293. direction: rtl;
  294. font-size: .8em;
  295. a {
  296. display: inline;
  297. }
  298. }
  299. .content figure.big {
  300. width: calc(var(--vw) * 100 - var(--offset) - 1em);
  301. margin-left: 0;
  302. text-align: left;
  303. &>img {
  304. margin-left: 0;
  305. }
  306. }
  307. }
  308. @media all and (min-width: 1800px) {
  309. :root {
  310. --offset: 380px;
  311. }
  312. }