|
@@ -11,39 +11,43 @@
|
|
|
</header>
|
|
|
|
|
|
<article class="blog-post content">
|
|
|
- <div class="toc-container">
|
|
|
- <span class="title">內容目錄</span>
|
|
|
- {{ .TableOfContents }}
|
|
|
- </div>
|
|
|
+ {{ $toc := .TableOfContents }}
|
|
|
+ {{ $hasToc := in $toc "<a href=" }}
|
|
|
+ {{ if $hasToc }}
|
|
|
+ <div class=" toc-container">
|
|
|
+ <span class="title">內容目錄</span>
|
|
|
+ {{ $toc }}
|
|
|
+ </div>
|
|
|
+ {{ end }}
|
|
|
|
|
|
- <article class="content pt-2">
|
|
|
- {{ if eq .Params.image "cover.jpg" }}
|
|
|
- {{ else }}
|
|
|
- <img src="{{.Params.Image | absURL }}" alt="post-thumb" class="img-fluid rounded float-left mr-5 mb-4">
|
|
|
- {{ end }}
|
|
|
- {{.Content}}
|
|
|
- </article>
|
|
|
+ <article class="content pt-2">
|
|
|
+ {{ if eq .Params.image "cover.jpg" }}
|
|
|
+ {{ else }}
|
|
|
+ <img src="{{.Params.Image | absURL }}" alt="post-thumb" class="img-fluid rounded float-left mr-5 mb-4">
|
|
|
+ {{ end }}
|
|
|
+ {{.Content}}
|
|
|
+ </article>
|
|
|
|
|
|
- <!-- {{ partial "translations.html" . }} -->
|
|
|
- <!-- {{ partial "related" . }} -->
|
|
|
- <hr>
|
|
|
- <a href="javascript:;" onclick="historyBack()" class="back-link mt-4">
|
|
|
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
|
|
|
- class="bi bi-chevron-left mb-1" viewBox="0 0 16 16">
|
|
|
- <path fill-rule="evenodd"
|
|
|
- d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z" />
|
|
|
- </svg>
|
|
|
- <span>回到上一頁</span>
|
|
|
- </a>
|
|
|
- </article>
|
|
|
+ <!-- {{ partial "translations.html" . }} -->
|
|
|
+ <!-- {{ partial "related" . }} -->
|
|
|
+ <hr>
|
|
|
+ <a href="javascript:;" onclick="historyBack()" class="back-link mt-4">
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left mb-1"
|
|
|
+ viewBox="0 0 16 16">
|
|
|
+ <path fill-rule="evenodd"
|
|
|
+ d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z" />
|
|
|
+ </svg>
|
|
|
+ <span>回到上一頁</span>
|
|
|
+ </a>
|
|
|
+ </article>
|
|
|
|
|
|
- </div>
|
|
|
- <div class="col-12 col-lg-3 position-relative mt-2 mt-lg-0">
|
|
|
- {{ partial "sidebar.html" . }}
|
|
|
- <!-- {{ partial "news-featured.html" . }}
|
|
|
+ </div>
|
|
|
+ <div class="col-12 col-lg-3 position-relative mt-2 mt-lg-0">
|
|
|
+ {{ partial "sidebar.html" . }}
|
|
|
+ <!-- {{ partial "news-featured.html" . }}
|
|
|
{{ partial "taxonomies.html" . }} -->
|
|
|
- </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+</div>
|
|
|
|
|
|
{{ end }}
|