style.scss 5.1 KB

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