style.scss 6.4 KB

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