1
0

style.scss 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  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. .img-tile {
  213. height: 150px;
  214. }
  215. }
  216. @media all and (min-width: 810px) {
  217. main#site-main {
  218. margin-top: 3em;
  219. }
  220. .wrapper {
  221. max-width: 780px;
  222. text-align: justify;
  223. }
  224. #home-btn>img {
  225. width: 2em;
  226. }
  227. #page.error-404 {
  228. flex-direction: row;
  229. }
  230. .content a.anchor {
  231. float: left;
  232. margin-left: -1em;
  233. }
  234. .posts-group {
  235. display: flex;
  236. }
  237. .content figure.big {
  238. margin-left: calc(390px - var(--vw) * 50 - 1em);
  239. }
  240. .img-tile {
  241. height: 200px;
  242. }
  243. }
  244. @media all and (min-width: 1250px) {
  245. main#site-main {
  246. margin-top: 4.5em;
  247. }
  248. .wrapper {
  249. max-width: 980px;
  250. }
  251. .content a.anchor {
  252. float: left;
  253. margin-left: -1em;
  254. }
  255. .posts-group {
  256. display: flex;
  257. }
  258. .content figure.big {
  259. margin-left: calc(490px - var(--vw) * 50 - 1em);
  260. }
  261. }
  262. @media all and (min-width: 1590px) {
  263. :root {
  264. --offset: 280px;
  265. }
  266. html {
  267. font-size: 1.2em;
  268. }
  269. main#site-main {
  270. margin-top: 6em;
  271. }
  272. #home-center, #home-footer {
  273. padding-left: 15vw;
  274. padding-right: 15vw;
  275. }
  276. .wrapper {
  277. margin-left: var(--offset);
  278. }
  279. #home-btn {
  280. top: .2em;
  281. right: .8em;
  282. &>img{
  283. width: 1.5em;
  284. }
  285. }
  286. #site-header {
  287. display: block;
  288. }
  289. #toc-btn {
  290. display: none;
  291. }
  292. #toc {
  293. display: block!important;
  294. position: sticky;
  295. float: left;
  296. top: 2em;
  297. width: calc(var(--offset) - 2em);
  298. padding: 0 0 0 1em;
  299. margin-left: calc(0px - var(--offset));
  300. border-right: 2px solid var(--c-bg-alt);
  301. border-radius: 0;
  302. background: transparent;
  303. text-align: right;
  304. .toc-title {
  305. display: block;
  306. padding-right: 1em;
  307. margin-top: 0;
  308. font-weight: bold;
  309. }
  310. }
  311. #TableOfContents {
  312. direction: rtl;
  313. font-size: .8em;
  314. a {
  315. display: inline;
  316. }
  317. }
  318. .content > figure {
  319. text-align: left;
  320. &.big {
  321. width: calc(var(--vw) * 100 - var(--offset) - 1em);
  322. margin-left: 0;
  323. &>img {
  324. margin-left: 0;
  325. }
  326. }
  327. &.right {
  328. margin-right: -280px;
  329. }
  330. }
  331. }
  332. @media all and (min-width: 1800px) {
  333. :root {
  334. --offset: 380px;
  335. }
  336. }