style.scss 5.1 KB

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