style.scss 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  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. img {
  171. transition: filter .3s;
  172. }
  173. }
  174. #bg-img {
  175. position: fixed;
  176. z-index: -1;
  177. top: 0;
  178. width: 100vw;
  179. height: 100vh;
  180. background-image: var(--bg-img);
  181. background-position: center;
  182. background-size: cover;
  183. opacity: .05;
  184. }
  185. main#site-main {
  186. flex-grow: 1;
  187. margin-top: 1em;
  188. }
  189. .wrapper {
  190. width: 100%;
  191. max-width: 100%;
  192. margin: 0 auto;
  193. padding: 0 1em;
  194. }
  195. #home-btn {
  196. border: none;
  197. position: absolute;
  198. &>img{
  199. width: 1.5em;
  200. height: auto;
  201. border-radius: 50%;
  202. }
  203. }
  204. .title-area {
  205. display: flex;
  206. align-items: baseline;
  207. flex-direction: row-reverse;
  208. margin-bottom: 2em;
  209. .title-area-l {
  210. flex: 1;
  211. }
  212. }
  213. h1#page-title {
  214. margin: 0;
  215. font-size: 2rem;
  216. line-height: normal;
  217. }
  218. .feather {
  219. display: inline-block;
  220. vertical-align: -.125em;
  221. width: 1em;
  222. height: 1em;
  223. }
  224. @import "partials/home.scss", "partials/404.scss";
  225. @import "partials/single.scss", "partials/list.scss";
  226. @import "partials/header.scss", "partials/footer.scss", "partials/comments.scss";
  227. @media all and (min-width: 550px) {
  228. html {
  229. font-size: 110%;
  230. }
  231. #site-footer {
  232. background: transparent;
  233. &>.footer-inner {
  234. display: flex;
  235. padding-top: 1em;
  236. border-top: 2px solid var(--c-bg-alt);
  237. }
  238. }
  239. .posts-group {
  240. display: flex;
  241. }
  242. .footer-l {
  243. flex-grow: 1;
  244. }
  245. .site-nav > span {
  246. color: var(--c-bg-alt);
  247. }
  248. .recent-posts-list a {
  249. display: inline;
  250. }
  251. .img-tile {
  252. height: 150px;
  253. }
  254. }
  255. @media all and (min-width: 810px) {
  256. main#site-main {
  257. margin-top: 3em;
  258. }
  259. #home-center {
  260. padding: 0 15vw;
  261. }
  262. .wrapper {
  263. max-width: 780px;
  264. text-align: justify;
  265. }
  266. #home-btn>img {
  267. width: 2em;
  268. }
  269. #page.error-404 {
  270. flex-direction: row;
  271. }
  272. .content a.anchor {
  273. float: left;
  274. margin-left: -1em;
  275. }
  276. .posts-group {
  277. display: flex;
  278. }
  279. .content figure.big {
  280. margin-left: calc(390px - var(--vw) * 50 - 1em);
  281. }
  282. .img-tile {
  283. height: 200px;
  284. }
  285. }
  286. @media all and (min-width: 1250px) {
  287. main#site-main {
  288. margin-top: 4.5em;
  289. }
  290. .wrapper {
  291. max-width: 980px;
  292. }
  293. #home-btn {
  294. top: .2em;
  295. right: .8em;
  296. &>img{
  297. width: 1.5em;
  298. }
  299. }
  300. #site-header {
  301. display: block;
  302. }
  303. .content a.anchor {
  304. float: left;
  305. margin-left: -1em;
  306. }
  307. .posts-group {
  308. display: flex;
  309. }
  310. .content figure.big {
  311. margin-left: calc(490px - var(--vw) * 50 - 1em);
  312. }
  313. }
  314. @media all and (min-width: 1530px) {
  315. :root {
  316. --offset: 280px;
  317. }
  318. main#site-main {
  319. margin-top: 6em;
  320. }
  321. #home-center {
  322. padding: 0 16vw;
  323. }
  324. .wrapper {
  325. margin-left: var(--offset);
  326. }
  327. .sidebar {
  328. position: sticky;
  329. float: left;
  330. top: 2em;
  331. width: calc(var(--offset) - 2em);
  332. padding: 0 .5rem;
  333. margin-left: calc(0px - var(--offset));
  334. text-align: right;
  335. }
  336. #toc-btn {
  337. display: none;
  338. }
  339. #toc {
  340. display: block!important;
  341. padding: 0 0 0 1em;
  342. border-right: 2px solid var(--c-bg-alt);
  343. background: transparent;
  344. .toc-title {
  345. display: block;
  346. }
  347. }
  348. #TableOfContents {
  349. direction: rtl;
  350. font-size: .8em;
  351. line-height: 1.4;
  352. a {
  353. display: inline;
  354. }
  355. }
  356. .album {
  357. width: calc(var(--vw) * 100 - var(--offset) - 1em);
  358. margin-top: 3em;
  359. }
  360. .album-title {
  361. margin-top: 0;
  362. margin-bottom: .5em;
  363. }
  364. .album-info {
  365. display: block;
  366. margin: 0;
  367. line-height: 1.5;
  368. > .separator {
  369. display: none;
  370. }
  371. }
  372. .album-row {
  373. gap: 1em;
  374. }
  375. .content > figure {
  376. text-align: left;
  377. &>img {
  378. margin-left: 0;
  379. }
  380. &.big {
  381. width: calc(var(--vw) * 100 - var(--offset) - 1em);
  382. margin-left: 0;
  383. }
  384. &.right {
  385. margin-right: calc(-280px + 1em);
  386. }
  387. }
  388. }
  389. @media all and (min-width: 1800px) {
  390. :root {
  391. --offset: 380px;
  392. }
  393. html {
  394. font-size: 120%;
  395. }
  396. }