Browse Source

Update config & style

* Rename config.toml to hugo.toml
* Enable render HTML in Markdown
* Update style for video/iframe/blockquote and 404 page
* Change some CSS units
Track3 2 years ago
parent
commit
da4ca86314
4 changed files with 44 additions and 26 deletions
  1. 20 12
      assets/scss/partials/_404.scss
  2. 5 0
      assets/scss/partials/_single.scss
  3. 12 10
      assets/scss/style.scss
  4. 7 4
      hugo.toml

+ 20 - 12
assets/scss/partials/_404.scss

@@ -3,19 +3,27 @@
   align-items: center;
 }
 .banner-404 {
-  font-size: 1.5em;
+  font-size: 1.4rem;
   padding: 1em;
-}
-.btn-404 > a {
-  display: inline-block;
-  font-size: .8em;
-  border: 1px solid var(--c-txt-alt);
-  padding: .2em .4em;
-  margin-bottom: .4em;
-  &:hover {
-    border-color: $accent;
+  line-height: normal;
+  > h1 {
+    font-size: 3em;
+    margin: 0;
   }
-  &:active {
-    border-style: dashed;
+}
+.btn-404 {
+  margin-bottom: 0;
+  > a {
+    display: inline-block;
+    font-size: 1.25rem;
+    border: 1px solid var(--c-txt-alt);
+    padding: .3em .5em;
+    margin-right: .5em;
+    &:hover {
+      border-color: $accent;
+    }
+    &:active {
+      border-style: dashed;
+    }
   }
 }

+ 5 - 0
assets/scss/partials/_single.scss

@@ -95,6 +95,11 @@
     margin: auto;
   }
 
+  video, iframe {
+    max-width: 100%;
+    height: auto;
+  }
+
   ul,
   ol {
     padding: 0;

+ 12 - 10
assets/scss/style.scss

@@ -7,7 +7,7 @@
 
 html {
   scroll-behavior: smooth;
-  font-size: 1rem;
+  font-size: 100%;
 }
 
 body {
@@ -41,7 +41,7 @@ select,
 textarea {
   color: var(--c-txt);
   background-color: var(--c-bg);
-  line-height: 1.6em;
+  line-height: 1.6;
   font-family: $fonts;
   letter-spacing: .05rem;
   transition: color .5s, background-color .5s, border-color .5s;
@@ -57,7 +57,7 @@ pre tt {
 pre {
   padding: .7em 1.1em;
   overflow: auto;
-  font-size: .9em;
+  font-size: .9rem;
   line-height: 1.2;
   white-space: pre;
   color: var(--c-txt);
@@ -84,13 +84,15 @@ blockquote {
   &::before {
     content: "“";
     position: absolute;
-    opacity: .3;
-    font-size: 80px;
-    transform: translate(-20px,5px);
+    z-index: -1;
+    line-height: 1;
+    font-size: 5rem;
+    transform: translate(-1rem,-1rem);
+    color: var(--c-bg-alt);
   }
 
   p {
-    margin-left: 1.2em;
+    margin-left: 1.5em;
   }
   cite {
     font-weight: bold;
@@ -233,7 +235,7 @@ main#site-main {
 }
 h1#page-title {
   margin: 0;
-  font-size: 2em;
+  font-size: 2rem;
   line-height: normal;
 }
 
@@ -251,7 +253,7 @@ h1#page-title {
 
 @media all and (min-width: 550px) {
   html {
-    font-size: 1.1em;
+    font-size: 110%;
   }
   #site-footer {
     background: transparent;
@@ -422,6 +424,6 @@ h1#page-title {
     --offset: 380px;
   }
   html {
-    font-size: 1.2em;
+    font-size: 120%;
   }
 }

+ 7 - 4
config.toml → hugo.toml

@@ -1,8 +1,8 @@
 baseURL = "https://zak.ee"
-languageCode = "zh-hans"
 title = "Zakee's Planet"
 staticDir = ["static", "content-static"]
-
+languageCode = "zh-CN"
+defaultContentLanguage = 'zh'
 hasCJKLanguage = true
 rssLimit = 10
 copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License."
@@ -13,13 +13,16 @@ copyright = "This work is licensed under a Creative Commons Attribution-NonComme
 [markup]
   defaultMarkdownHandler = "goldmark"
 
+  [markup.goldmark.renderer]
+    unsafe = true
+
   [markup.highlight]
     codeFences = true
     guessSyntax = false
     noClasses = false
 
-  [markup.blackFriday]
-    hrefTargetBlank = true
+  # [markup.blackFriday]
+  #   hrefTargetBlank = true
 
 [taxonomies]
   tag = "tags"