Browse Source

Minor fixes

- Comments style,
- 404 page design, 
- list.html fix
Track3 6 years ago
parent
commit
5f5b4bdfe0
4 changed files with 34 additions and 20 deletions
  1. 26 12
      assets/scss/style.scss
  2. 4 4
      content/about.md
  3. 3 3
      layouts/404.html
  4. 1 1
      layouts/_default/list.html

+ 26 - 12
assets/scss/style.scss

@@ -199,7 +199,7 @@ table {
 
 #mobile-menu {
   position: fixed;
-  bottom: 4.5em;
+  bottom: 4.8em;
   right: 1.5em;
   padding: .6em 1.8em;
   z-index: 1;
@@ -247,12 +247,17 @@ table {
 
   &.error-404 {
     flex-direction: row;
+    line-height: normal;
   }
 }
 
-.catguard img {
-  max-width: 250px;
-  height: auto;
+p.catguard {
+  margin: 0;
+
+  img {
+    max-width: 250px;
+    height: auto;
+  }
 }
 
 .banner-404 {
@@ -260,22 +265,23 @@ table {
 
   h1 {
     font-size: 3em;
-    margin: 0;
+    margin: .5rem 0 1rem;
   }
 
   p {
     margin-top: 0;
-    margin-bottom: .5em;
+    margin-bottom: .8em;
   }
 
   .btn-404 {
-    font-size: 1em;
+    font-size: .8em;
 
     a {
       display: inline-block;
-      border-bottom: 2px solid $theme;
-      padding: 1px 2px;
-      transition-property: background-color;
+      border: 2px solid $text;
+      border-radius: 5px;
+      padding: 5px;
+      transition-property: color, border-color;
       word-break: break-all;
 
       &:first-child {
@@ -283,7 +289,11 @@ table {
       }
 
       &:hover {
-        background-color: $theme;
+        border-color: #fff;
+      }
+
+      svg {
+        margin-right: .5em;
       }
     }
   }
@@ -514,7 +524,7 @@ figure.right {
 
   .vh {
 
-    border-bottom: 4px solid #5c6372;
+    border-bottom: transparent;
 
     .vquote {
       border-left: 3px dotted #979ca5;
@@ -624,4 +634,8 @@ figure.right {
   hr.post-end {
     width: 60%;
   }
+
+  #mobile-menu {
+    right: 1.2em;
+  }
 }

+ 4 - 4
content/about.md

@@ -1,10 +1,10 @@
 ---
-title: About
-date: 2018-03-20 20:16:07 +0800
+title: "About"
+date: 2018-03-20T20:16:07+08:00
+draft: false
 comments: false
-type: page
-
 ---
+
 博主是一只大学狗,纺织工程专业。喜欢折腾各种事物,热爱数码科技,本想学计算机专业,却在纺织的路上越走越远。
 
 本站始建于2016年,用了两年多的WordPress,终于还是换成了静态博客。不管怎么说,这还是那个分享个人所见所闻所思的自留地。

+ 3 - 3
layouts/404.html

@@ -5,10 +5,10 @@
 		</p>
 		<div class="banner-404 animated bounceIn">
 			<h1 id="404-title">404</h1>
-			<p>This page has gone off the grid!</p>
+			<p>Oops, page not found…</p>
 			<p class="btn-404">
-				<a href="{{.Site.BaseURL}}"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-home"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg> Home</a>
-				<a href="/posts"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-archive"><polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line></svg> Posts list</a>
+				<a href="{{.Site.BaseURL}}"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-home"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>Home</a>
+				<a href="/posts"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-archive"><polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line></svg>Archives</a>
 			</p>
 		</div>
 	</div>

+ 1 - 1
layouts/_default/list.html

@@ -5,7 +5,7 @@
 {{ define "main" }}
 	<main class="site-main section-inner thin  animated fadeIn">
 		<h1>{{ .Title }}</h1>
-		{{- with .Content }}
+		{{- if .Content }}
 		<div class="content">
 			{{ .Content }}
 		</div>