浏览代码

Update header

Track3 6 年之前
父节点
当前提交
baaa5ae3bf
共有 4 个文件被更改,包括 23 次插入25 次删除
  1. 11 9
      assets/scss/style.scss
  2. 1 1
      layouts/_default/list.html
  3. 10 14
      layouts/partials/header.html
  4. 1 1
      layouts/partials/social-icons.html

+ 11 - 9
assets/scss/style.scss

@@ -196,6 +196,7 @@ table {
 .hdr-wrapper {
   display: flex;
   justify-content: space-between;
+  align-items: center;
   padding: .5em 0;
   font-size: 1.2rem;
 
@@ -217,10 +218,14 @@ table {
 }
 
 .hdr-icons {
-  display: inline-block;
   font-size: 1.2em;
+}
 
-  a {
+.hdr-social {
+  display: inline-block;
+  margin-left: .6em;
+
+  &>a {
     margin-left: .4em;
   }
 }
@@ -232,9 +237,9 @@ table {
   cursor: pointer;
 }
 
-#menu-btn,
-#search-btn {
+#menu-btn {
   display: none;
+  margin-left: .4em;
   cursor: pointer;
 }
 
@@ -438,10 +443,6 @@ p.img-404 {
   opacity: 1;
 }
 
-#show-img-btn {
-  margin-right: .3em;
-}
-
 .post-header {
   margin-top: 1.2em;
   line-height: normal;
@@ -548,6 +549,7 @@ a.footnote-return {
   display: flex;
   justify-content: space-between;
   margin-top: 1.5em;
+  margin-bottom: 2.5em;
   font-size: 1.2em;
 
   a {
@@ -611,7 +613,7 @@ a.footnote-return {
   }
 
   .vh {
-    border-bottom: transparent;
+    border-bottom: none;
 
     .vquote {
       border-left: 3px dotted #979ca5;

+ 1 - 1
layouts/_default/list.html

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

+ 10 - 14
layouts/partials/header.html

@@ -10,20 +10,16 @@
 					{{- end }}
 				</nav>
 			</div>
-			<div class="hdr-right">
-				<div class="hdr-icons">
-					{{- with .Params.featuredImg }}
-					<button id="show-img-btn" class="hdr-btn" onclick="showFeaturedImg()"><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-image"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg></button>
-					{{- end }}
-					{{- with .Site.Params.social }}
-					<span class="hide-in-mobile">
-						{{- partialCached "social-icons.html" . -}}
-					</span>
-					{{- end }}
-					<!-- <button id="search-btn" class="hdr-btn"><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-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg></button> -->
-					<!-- <button id="toc-btn" class="hdr-btn"><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-list"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3" y2="6"></line><line x1="3" y1="12" x2="3" y2="12"></line><line x1="3" y1="18" x2="3" y2="18"></line></svg></button> -->
-					<button id="menu-btn" class="hdr-btn"><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-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg></button>
-				</div>
+			<div class="hdr-right hdr-icons">
+				{{ with .Params.featuredImg -}}
+				<button class="hdr-btn" onclick="showFeaturedImg()"><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-image"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg></button>
+				{{- end }}
+				{{- with .Site.Params.social -}}
+				<span class="hdr-social hide-in-mobile">{{ partialCached "social-icons.html" . }}</span>
+				{{- end -}}
+				<!-- <button id="search-btn" class="hdr-btn"><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-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg></button> -->
+				<!-- <button id="toc-btn" class="hdr-btn"><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-list"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3" y2="6"></line><line x1="3" y1="12" x2="3" y2="12"></line><line x1="3" y1="18" x2="3" y2="18"></line></svg></button> -->
+				<button id="menu-btn" class="hdr-btn"><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-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg></button>
 			</div>
 		</div>
 	</header>

+ 1 - 1
layouts/partials/social-icons.html

@@ -1,3 +1,3 @@
 {{ range . -}}
-<a href="{{ .url }}" target="_blank" rel="noopener"><span class="screen-reader-text">{{ .name }}</span>{{ partial "social-svg.html" . }}</a>
+<a href="{{ .url }}" target="_blank" rel="noopener">{{ partial "social-svg.html" . }}</a>
 {{- end }}