style.scss 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  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: .05rem;
  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. font-family: $serif-fonts;
  68. letter-spacing: normal;
  69. color: var(--c-txt-alt);
  70. &::before {
  71. content: "“";
  72. position: absolute;
  73. opacity: 0.3;
  74. font-size: 80px;
  75. transform: translate(-20px,5px);
  76. }
  77. p {
  78. margin-left: 1.2em;
  79. }
  80. cite {
  81. font-weight: bold;
  82. font-style: normal;
  83. margin-left: 1em;
  84. &::before {
  85. content: "—— ";
  86. }
  87. }
  88. }
  89. a {
  90. color: var(--c-txt);
  91. text-decoration: none;
  92. border-bottom: solid 1px var(--c-bg-alt);
  93. transition-property: color, border-color;
  94. transition-duration: .2s;
  95. &:hover {
  96. color: $accent;
  97. border-bottom-color: $accent;
  98. }
  99. &.icon-link {
  100. border-bottom: none;
  101. }
  102. }
  103. table {
  104. border-collapse: collapse;
  105. border-spacing: 0;
  106. empty-cells: show;
  107. width: 100%;
  108. max-width: 100%;
  109. th,
  110. td {
  111. padding: 1.5%;
  112. border: 1px solid;
  113. }
  114. th {
  115. font-weight: bold;
  116. vertical-align: bottom;
  117. }
  118. }
  119. hr {
  120. color: var(--c-bg-alt);
  121. border-top: none;
  122. border-width: 3px 0 0 0;
  123. border-style: dashed;
  124. }
  125. // Global layouts
  126. //
  127. #page {
  128. display: flex;
  129. flex-direction: column;
  130. min-height: 100vh;
  131. }
  132. #bg-img {
  133. position: fixed;
  134. z-index: -1;
  135. top: 0;
  136. width: 100vw;
  137. height: 100vh;
  138. background-image: var(--bg-img);
  139. background-position: center;
  140. background-size: cover;
  141. opacity: .05;
  142. }
  143. main#site-main {
  144. flex-grow: 1;
  145. margin-top: 1em;
  146. }
  147. .wrapper {
  148. width: 100%;
  149. max-width: 100%;
  150. margin: 0 auto;
  151. padding: 0 1em;
  152. }
  153. #home-btn {
  154. border: none;
  155. position: absolute;
  156. &>img{
  157. width: 1.5em;
  158. height: auto;
  159. border-radius: 50%;
  160. }
  161. }
  162. .title-area {
  163. display: flex;
  164. align-items: baseline;
  165. flex-direction: row-reverse;
  166. margin-bottom: 2em;
  167. .title-area-l {
  168. flex: 1;
  169. }
  170. }
  171. h1#page-title {
  172. margin: 0;
  173. font-size: 2em;
  174. line-height: normal;
  175. }
  176. .feather {
  177. display: inline-block;
  178. vertical-align: -.125em;
  179. width: 1em;
  180. height: 1em;
  181. }
  182. @import "partials/home.scss", "partials/404.scss";
  183. @import "partials/single.scss", "partials/list.scss";
  184. @import "partials/header.scss", "partials/footer.scss", "partials/comments.scss";
  185. @media all and (min-width: 550px) {
  186. html {
  187. font-size: 1.1em;
  188. }
  189. #site-footer {
  190. background: transparent;
  191. &>.footer-inner {
  192. display: flex;
  193. padding-top: 1em;
  194. border-top: 2px solid var(--c-bg-alt);
  195. }
  196. }
  197. .posts-group {
  198. display: flex;
  199. }
  200. .footer-l {
  201. flex-grow: 1;
  202. }
  203. .site-nav > span {
  204. color: var(--c-bg-alt);
  205. }
  206. .recent-posts-list a {
  207. display: inline;
  208. }
  209. .img-tile {
  210. height: 150px;
  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. .img-tile {
  238. height: 200px;
  239. }
  240. }
  241. @media all and (min-width: 1250px) {
  242. main#site-main {
  243. margin-top: 4.5em;
  244. }
  245. .wrapper {
  246. max-width: 980px;
  247. }
  248. .content a.anchor {
  249. float: left;
  250. margin-left: -1em;
  251. }
  252. .posts-group {
  253. display: flex;
  254. }
  255. .content figure.big {
  256. margin-left: calc(490px - var(--vw) * 50 - 1em);
  257. }
  258. }
  259. @media all and (min-width: 1590px) {
  260. :root {
  261. --offset: 280px;
  262. }
  263. html {
  264. font-size: 1.2em;
  265. }
  266. main#site-main {
  267. margin-top: 6em;
  268. }
  269. #home-center, #home-footer {
  270. padding-left: 15vw;
  271. padding-right: 15vw;
  272. }
  273. .wrapper {
  274. margin-left: var(--offset);
  275. }
  276. #home-btn {
  277. top: .2em;
  278. right: .8em;
  279. &>img{
  280. width: 1.5em;
  281. }
  282. }
  283. #site-header {
  284. display: block;
  285. }
  286. #toc-btn {
  287. display: none;
  288. }
  289. #toc {
  290. display: block!important;
  291. position: sticky;
  292. float: left;
  293. top: 2em;
  294. width: calc(var(--offset) - 2em);
  295. padding: 0 0 0 1em;
  296. margin-left: calc(0px - var(--offset));
  297. border-right: 2px solid var(--c-bg-alt);
  298. border-radius: 0;
  299. background: transparent;
  300. text-align: right;
  301. .toc-title {
  302. display: block;
  303. padding-right: 1em;
  304. margin-top: 0;
  305. font-weight: bold;
  306. }
  307. }
  308. #TableOfContents {
  309. direction: rtl;
  310. font-size: .8em;
  311. a {
  312. display: inline;
  313. }
  314. }
  315. .content > figure {
  316. text-align: left;
  317. &>img {
  318. margin-left: 0;
  319. }
  320. &.big {
  321. width: calc(var(--vw) * 100 - var(--offset) - 1em);
  322. margin-left: 0;
  323. }
  324. &.right {
  325. margin-right: -280px;
  326. }
  327. }
  328. }
  329. @media all and (min-width: 1800px) {
  330. :root {
  331. --offset: 380px;
  332. }
  333. }