style.scss 6.7 KB

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