style.scss 6.6 KB

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