style.scss 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  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. --c-txt-em: #000;
  16. }
  17. @media (prefers-color-scheme: dark) {
  18. body {
  19. --c-bg: #27343a;
  20. --c-bg-alt: #364045;
  21. --c-txt: #c8c6c4;
  22. --c-txt-alt: #a19f9d;
  23. --c-txt-em: #fff;
  24. }
  25. #page img {
  26. filter: brightness(.9);
  27. &:hover {
  28. filter: none;
  29. }
  30. }
  31. }
  32. body,
  33. button,
  34. input,
  35. select,
  36. textarea {
  37. color: var(--c-txt);
  38. background-color: var(--c-bg);
  39. line-height: 1.6em;
  40. font-family: $fonts;
  41. letter-spacing: .05rem;
  42. transition: color .5s, background-color .5s, border-color .5s;
  43. }
  44. pre,
  45. code,
  46. pre tt {
  47. font-family: $mono-fonts;
  48. letter-spacing: normal;
  49. }
  50. pre {
  51. padding: .7em 1.1em;
  52. overflow: auto;
  53. font-size: .9em;
  54. line-height: 1.2;
  55. white-space: pre;
  56. code {
  57. padding: 0;
  58. margin: 0;
  59. background: transparent;
  60. }
  61. }
  62. code {
  63. background: var(--c-bg-alt);
  64. padding: 0 3px;
  65. margin: 0 4px;
  66. }
  67. blockquote {
  68. margin: 1.5em 1em;
  69. font-style: italic;
  70. font-family: $serif-fonts;
  71. letter-spacing: normal;
  72. color: var(--c-txt-alt);
  73. &::before {
  74. content: "“";
  75. position: absolute;
  76. opacity: .3;
  77. font-size: 80px;
  78. transform: translate(-20px,5px);
  79. }
  80. p {
  81. margin-left: 1.2em;
  82. }
  83. cite {
  84. font-weight: bold;
  85. font-style: normal;
  86. margin-left: 1em;
  87. &::before {
  88. content: "—— ";
  89. }
  90. }
  91. }
  92. a {
  93. color: var(--c-txt);
  94. text-decoration: none;
  95. border-bottom: solid 1px var(--c-bg-alt);
  96. transition-property: color, border-color;
  97. transition-duration: .2s;
  98. &:hover {
  99. color: $accent;
  100. border-bottom-color: $accent;
  101. }
  102. &:active {
  103. border-bottom-style: dashed;
  104. }
  105. &.icon-link {
  106. border-bottom: none;
  107. }
  108. }
  109. table {
  110. border-collapse: collapse;
  111. border-spacing: 0;
  112. empty-cells: show;
  113. width: 100%;
  114. max-width: 100%;
  115. th,
  116. td {
  117. padding: 1.5%;
  118. border: 1px solid;
  119. }
  120. th {
  121. font-weight: bold;
  122. vertical-align: bottom;
  123. }
  124. }
  125. hr {
  126. color: var(--c-bg-alt);
  127. border-top: none;
  128. border-width: 3px 0 0 0;
  129. border-style: dashed;
  130. }
  131. button, [type=button], [type=reset], [type=submit] {
  132. border: 1px solid var(--c-txt-alt);
  133. &:hover {
  134. border-color: $accent;
  135. }
  136. &:active {
  137. border-style: dashed;
  138. }
  139. }
  140. input[type=text], input[type=email]{
  141. border: 1px solid var(--c-txt-alt);
  142. }
  143. // Global layouts
  144. //
  145. #page {
  146. display: flex;
  147. flex-direction: column;
  148. min-height: 100vh;
  149. img {
  150. transition: filter .3s;
  151. }
  152. }
  153. #bg-img {
  154. position: fixed;
  155. z-index: -1;
  156. top: 0;
  157. width: 100vw;
  158. height: 100vh;
  159. background-image: var(--bg-img);
  160. background-position: center;
  161. background-size: cover;
  162. opacity: .05;
  163. }
  164. main#site-main {
  165. flex-grow: 1;
  166. margin-top: 1em;
  167. }
  168. .wrapper {
  169. width: 100%;
  170. max-width: 100%;
  171. margin: 0 auto;
  172. padding: 0 1em;
  173. }
  174. #home-btn {
  175. border: none;
  176. position: absolute;
  177. &>img{
  178. width: 1.5em;
  179. height: auto;
  180. border-radius: 50%;
  181. }
  182. }
  183. .title-area {
  184. display: flex;
  185. align-items: baseline;
  186. flex-direction: row-reverse;
  187. margin-bottom: 2em;
  188. .title-area-l {
  189. flex: 1;
  190. }
  191. }
  192. h1#page-title {
  193. margin: 0;
  194. font-size: 2em;
  195. line-height: normal;
  196. }
  197. .feather {
  198. display: inline-block;
  199. vertical-align: -.125em;
  200. width: 1em;
  201. height: 1em;
  202. }
  203. @import "partials/home.scss", "partials/404.scss";
  204. @import "partials/single.scss", "partials/list.scss";
  205. @import "partials/header.scss", "partials/footer.scss", "partials/comments.scss";
  206. @media all and (min-width: 550px) {
  207. html {
  208. font-size: 1.1em;
  209. }
  210. #site-footer {
  211. background: transparent;
  212. &>.footer-inner {
  213. display: flex;
  214. padding-top: 1em;
  215. border-top: 2px solid var(--c-bg-alt);
  216. }
  217. }
  218. .posts-group {
  219. display: flex;
  220. }
  221. .footer-l {
  222. flex-grow: 1;
  223. }
  224. .site-nav > span {
  225. color: var(--c-bg-alt);
  226. }
  227. .recent-posts-list a {
  228. display: inline;
  229. }
  230. .img-tile {
  231. height: 150px;
  232. }
  233. }
  234. @media all and (min-width: 810px) {
  235. main#site-main {
  236. margin-top: 3em;
  237. }
  238. #home-center, #home-footer {
  239. padding-left: 15vw;
  240. padding-right: 15vw;
  241. }
  242. .wrapper {
  243. max-width: 780px;
  244. text-align: justify;
  245. }
  246. #home-btn>img {
  247. width: 2em;
  248. }
  249. #page.error-404 {
  250. flex-direction: row;
  251. }
  252. .content a.anchor {
  253. float: left;
  254. margin-left: -1em;
  255. }
  256. .posts-group {
  257. display: flex;
  258. }
  259. .content figure.big {
  260. margin-left: calc(390px - var(--vw) * 50 - 1em);
  261. }
  262. .img-tile {
  263. height: 200px;
  264. }
  265. }
  266. @media all and (min-width: 1250px) {
  267. main#site-main {
  268. margin-top: 4.5em;
  269. }
  270. .wrapper {
  271. max-width: 980px;
  272. }
  273. #home-btn {
  274. top: .2em;
  275. right: .8em;
  276. &>img{
  277. width: 1.5em;
  278. }
  279. }
  280. #site-header {
  281. display: block;
  282. }
  283. .content a.anchor {
  284. float: left;
  285. margin-left: -1em;
  286. }
  287. .posts-group {
  288. display: flex;
  289. }
  290. .content figure.big {
  291. margin-left: calc(490px - var(--vw) * 50 - 1em);
  292. }
  293. }
  294. @media all and (min-width: 1530px) {
  295. :root {
  296. --offset: 280px;
  297. }
  298. main#site-main {
  299. margin-top: 6em;
  300. }
  301. #home-center, #home-footer {
  302. padding-left: 16vw;
  303. padding-right: 16vw;
  304. }
  305. .wrapper {
  306. margin-left: var(--offset);
  307. }
  308. .sidebar {
  309. position: sticky;
  310. float: left;
  311. top: 2em;
  312. width: calc(var(--offset) - 2em);
  313. padding: 0 .5rem;
  314. margin-left: calc(0px - var(--offset));
  315. text-align: right;
  316. }
  317. #toc-btn {
  318. display: none;
  319. }
  320. #toc {
  321. display: block!important;
  322. padding: 0 0 0 1em;
  323. border-right: 2px solid var(--c-bg-alt);
  324. background: transparent;
  325. .toc-title {
  326. display: block;
  327. }
  328. }
  329. #TableOfContents {
  330. direction: rtl;
  331. font-size: .8em;
  332. line-height: 1.4;
  333. a {
  334. display: inline;
  335. }
  336. }
  337. .album {
  338. width: calc(var(--vw) * 100 - var(--offset) - 1em);
  339. margin-top: 3em;
  340. }
  341. .album-title {
  342. margin-top: 0;
  343. margin-bottom: .5em;
  344. }
  345. .album-info {
  346. display: block;
  347. margin: 0;
  348. line-height: 1.5;
  349. > .separator {
  350. display: none;
  351. }
  352. }
  353. .album-row {
  354. gap: 1em;
  355. }
  356. .content > figure {
  357. text-align: left;
  358. &>img {
  359. margin-left: 0;
  360. }
  361. &.big {
  362. width: calc(var(--vw) * 100 - var(--offset) - 1em);
  363. margin-left: 0;
  364. }
  365. &.right {
  366. margin-right: calc(-280px + 1em);
  367. }
  368. }
  369. }
  370. @media all and (min-width: 1800px) {
  371. :root {
  372. --offset: 380px;
  373. }
  374. html {
  375. font-size: 1.2em;
  376. }
  377. }