about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNgô Ngọc Đức Huy <huyngo@disroot.org>2021-07-04 22:14:17 +0700
committerNgô Ngọc Đức Huy <huyngo@disroot.org>2021-07-04 22:14:17 +0700
commitf708b6d62a9f006ab0b23b5ca85e893c7a7c9cc3 (patch)
treede6db297c53642db536c3755efa7264a8d6e9f1e
parent681a05418ba680f665838695127b945f26de10ae (diff)
downloadblog-f708b6d62a9f006ab0b23b5ca85e893c7a7c9cc3.tar.gz
Separate the comic to its own layout
-rw-r--r--layouts/_default/comic.html37
-rw-r--r--layouts/_default/single.html23
2 files changed, 41 insertions, 19 deletions
diff --git a/layouts/_default/comic.html b/layouts/_default/comic.html
new file mode 100644
index 0000000..1b3e33e
--- /dev/null
+++ b/layouts/_default/comic.html
@@ -0,0 +1,37 @@
+{{ define "main" }}
+{{ if .Menus }}
+<nav class="post-navigation">
+	{{ range .Menus }}
+	<a href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
+	{{ end }}
+</nav>
+{{ end }}
+
+<article class="post h-entry">
+	<header class="post-header">
+		<center>
+			<h1 class="p-name post-title{{ if .Params.draft }} draft{{end}}">{{ trim .Title  " " }}</h1>
+		{{ if in .Params.categories "comics" }}
+		</center>
+		{{ end}}
+	</header>
+	<div class="content e-content">
+		<center>
+		{{ partial "comicNav.html" . }}
+		<img title="{{ .Params.TitleText }}" alt="{{ .Params.Alt}}"
+			src={{ .Params.ComicLink}}>
+		{{ partial "comicNav.html" . }}
+		{{ .Content }}
+		<center>
+	</div>
+	{{ partial "postInfo.html" . }}
+</article>
+
+{{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }}
+	{{ partial "paginationPost.html" . }}
+{{ end }}
+
+
+{{ partial "custom-webring.html" }}
+
+{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 977c203..c2ef2cf 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -9,30 +9,15 @@
 
 <article class="post h-entry">
 	<header class="post-header">
-		{{ if in .Params.categories "comics" }}
-		<center>
-		{{ end}}
 		<h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}">{{ trim .Title  " " }}</h1>
-		{{ if in .Params.categories "comics" }}
-		</center>
-		{{ end}}
 	</header>
 	<div class="content e-content">
-		<!-- Comics-->
-		{{ if in .Params.categories "comics" }}
-		<center>
-		{{ partial "comicNav.html" . }}
-		{{ .Content }}
-		{{ partial "comicNav.html" . }}
-		<center>
-		{{ else }}
 		<!-- normal content -->
 		{{ .Content }}
-			<!-- book reviews -->
-			{{ if in .Params.categories "book review" }}
-			<hr>
-			{{ i18n "BookShare" }}
-			{{ end }}
+		<!-- book reviews -->
+		{{ if in .Params.categories "book review" }}
+		<hr>
+		{{ i18n "BookShare" }}
 		{{ end }}
 	</div>
 	{{ partial "postInfo.html" . }}