style.scss 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  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. code {
  52. padding: 0;
  53. margin: 0;
  54. background: transparent;
  55. }
  56. }
  57. code {
  58. background: var(--c-bg-alt);
  59. padding: 0 3px;
  60. margin: 0 4px;
  61. }
  62. blockquote {
  63. margin: 1.5em 1em;
  64. font-style: italic;
  65. font-family: $serif-fonts;
  66. letter-spacing: normal;
  67. color: var(--c-txt-alt);
  68. &::before {
  69. content: "“";
  70. position: absolute;
  71. opacity: 0.3;
  72. font-size: 80px;
  73. transform: translate(-20px,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. &:active {
  98. border-bottom-style: dashed;
  99. }
  100. &.icon-link {
  101. border-bottom: none;
  102. }
  103. }
  104. table {
  105. border-collapse: collapse;
  106. border-spacing: 0;
  107. empty-cells: show;
  108. width: 100%;
  109. max-width: 100%;
  110. th,
  111. td {
  112. padding: 1.5%;
  113. border: 1px solid;
  114. }
  115. th {
  116. font-weight: bold;
  117. vertical-align: bottom;
  118. }
  119. }
  120. hr {
  121. color: var(--c-bg-alt);
  122. border-top: none;
  123. border-width: 3px 0 0 0;
  124. border-style: dashed;
  125. }
  126. // Global layouts
  127. //
  128. #page {
  129. display: flex;
  130. flex-direction: column;
  131. min-height: 100vh;
  132. }
  133. #bg-img {
  134. position: fixed;
  135. z-index: -1;
  136. top: 0;
  137. width: 100vw;
  138. height: 100vh;
  139. background-image: var(--bg-img);
  140. background-position: center;
  141. background-size: cover;
  142. opacity: .05;
  143. }
  144. main#site-main {
  145. flex-grow: 1;
  146. margin-top: 1em;
  147. }
  148. .wrapper {
  149. width: 100%;
  150. max-width: 100%;
  151. margin: 0 auto;
  152. padding: 0 1em;
  153. }
  154. #home-btn {
  155. border: none;
  156. position: absolute;
  157. &>img{
  158. width: 1.5em;
  159. height: auto;
  160. border-radius: 50%;
  161. }
  162. }
  163. .title-area {
  164. display: flex;
  165. align-items: baseline;
  166. flex-direction: row-reverse;
  167. margin-bottom: 2em;
  168. .title-area-l {
  169. flex: 1;
  170. }
  171. }
  172. h1#page-title {
  173. margin: 0;
  174. font-size: 2em;
  175. line-height: normal;
  176. }
  177. .feather {
  178. display: inline-block;
  179. vertical-align: -.125em;
  180. width: 1em;
  181. height: 1em;
  182. }
  183. @import "partials/home.scss", "partials/404.scss";
  184. @import "partials/single.scss", "partials/list.scss";
  185. @import "partials/header.scss", "partials/footer.scss", "partials/comments.scss";
  186. @media all and (min-width: 550px) {
  187. html {
  188. font-size: 1.1em;
  189. }
  190. #site-footer {
  191. background: transparent;
  192. &>.footer-inner {
  193. display: flex;
  194. padding-top: 1em;
  195. border-top: 2px solid var(--c-bg-alt);
  196. }
  197. }
  198. .posts-group {
  199. display: flex;
  200. }
  201. .footer-l {
  202. flex-grow: 1;
  203. }
  204. .site-nav > span {
  205. color: var(--c-bg-alt);
  206. }
  207. .recent-posts-list a {
  208. display: inline;
  209. }
  210. .img-tile {
  211. height: 150px;
  212. }
  213. }
  214. @media all and (min-width: 810px) {
  215. main#site-main {
  216. margin-top: 3em;
  217. }
  218. .wrapper {
  219. max-width: 780px;
  220. text-align: justify;
  221. }
  222. #home-btn>img {
  223. width: 2em;
  224. }
  225. #page.error-404 {
  226. flex-direction: row;
  227. }
  228. .content a.anchor {
  229. float: left;
  230. margin-left: -1em;
  231. }
  232. .posts-group {
  233. display: flex;
  234. }
  235. .content figure.big {
  236. margin-left: calc(390px - var(--vw) * 50 - 1em);
  237. }
  238. .img-tile {
  239. height: 200px;
  240. }
  241. }
  242. @media all and (min-width: 1250px) {
  243. main#site-main {
  244. margin-top: 4.5em;
  245. }
  246. .wrapper {
  247. max-width: 980px;
  248. }
  249. .content a.anchor {
  250. float: left;
  251. margin-left: -1em;
  252. }
  253. .posts-group {
  254. display: flex;
  255. }
  256. .content figure.big {
  257. margin-left: calc(490px - var(--vw) * 50 - 1em);
  258. }
  259. }
  260. @media all and (min-width: 1590px) {
  261. :root {
  262. --offset: 280px;
  263. }
  264. html {
  265. font-size: 1.2em;
  266. }
  267. main#site-main {
  268. margin-top: 6em;
  269. }
  270. #home-center, #home-footer {
  271. padding-left: 15vw;
  272. padding-right: 15vw;
  273. }
  274. .wrapper {
  275. margin-left: var(--offset);
  276. }
  277. #home-btn {
  278. top: .2em;
  279. right: .8em;
  280. &>img{
  281. width: 1.5em;
  282. }
  283. }
  284. #site-header {
  285. display: block;
  286. }
  287. #toc-btn {
  288. display: none;
  289. }
  290. #toc {
  291. display: block!important;
  292. position: sticky;
  293. float: left;
  294. top: 2em;
  295. width: calc(var(--offset) - 2em);
  296. padding: 0 0 0 1em;
  297. margin-left: calc(0px - var(--offset));
  298. border-right: 2px solid var(--c-bg-alt);
  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. }