-
-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: extract and unify wrapper to baseof
- Loading branch information
1 parent
13383f6
commit eac53f6
Showing
8 changed files
with
270 additions
and
280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,112 +1,110 @@ | ||
{{ define "main" }} | ||
<div class="post-wrapper"> | ||
<div | ||
class="post {{ with .Site.Params.doNotLoadAnimations }} | ||
. | ||
{{ else }} | ||
animated fadeInDown | ||
{{ end }}" | ||
> | ||
{{ if .Params.thumbnail }} | ||
<div class="post__thumbnail-wrapper"> | ||
<img class="post__thumbnail" src="{{ .Params.thumbnail | relURL }}" alt="Thumbnail image" /> | ||
<div | ||
class="post {{ with .Site.Params.doNotLoadAnimations }} | ||
. | ||
{{ else }} | ||
animated fadeInDown | ||
{{ end }}" | ||
> | ||
{{ if .Params.thumbnail }} | ||
<div class="post__thumbnail-wrapper"> | ||
<img class="post__thumbnail" src="{{ .Params.thumbnail | relURL }}" alt="Thumbnail image" /> | ||
</div> | ||
|
||
{{ end }} | ||
<div class="post__content"> | ||
<h1>{{ .Title }}</h1> | ||
{{ if or (eq .Type "post") (eq .Type .Site.Params.postSectionName) }} | ||
<div class="info"> | ||
<em class="fas fa-calendar-day info__icon"></em> | ||
<span class="date info__text" | ||
>{{ if isset .Site.Params "singledateformat" }} | ||
{{ .Date.Format .Site.Params.singleDateFormat }} | ||
|
||
|
||
{{ else }} | ||
{{ .Date.Format "Mon, Jan 2, 2006" }} | ||
|
||
|
||
{{ end }}</span | ||
> | ||
<em class="fas fa-stopwatch info__icon"></em> | ||
<span class="reading-time info__text">{{ i18n "reading_time" .ReadingTime }}</span> | ||
</div> | ||
|
||
{{ end }} | ||
<div class="post__content"> | ||
<h1>{{ .Title }}</h1> | ||
{{ if or (eq .Type "post") (eq .Type .Site.Params.postSectionName) }} | ||
<div class="info"> | ||
<em class="fas fa-calendar-day info__icon"></em> | ||
<span class="date info__text" | ||
>{{ if isset .Site.Params "singledateformat" }} | ||
{{ .Date.Format .Site.Params.singleDateFormat }} | ||
|
||
|
||
{{ else }} | ||
{{ .Date.Format "Mon, Jan 2, 2006" }} | ||
{{- partial "expirationnote.html" . -}} | ||
|
||
{{- if (eq .Params.toc true) -}} | ||
<h3>Table of Contents</h3> | ||
{{ .TableOfContents }} | ||
|
||
{{ end }}</span | ||
> | ||
<em class="fas fa-stopwatch info__icon"></em> | ||
<span class="reading-time info__text">{{ i18n "reading_time" .ReadingTime }}</span> | ||
</div> | ||
|
||
{{ end }} | ||
{{- end -}} | ||
|
||
{{- partial "expirationnote.html" . -}} | ||
{{ .Content }} | ||
|
||
{{- if (eq .Params.toc true) -}} | ||
<h3>Table of Contents</h3> | ||
{{ .TableOfContents }} | ||
{{- if isset .Params "series" -}} | ||
{{- partial "series.html" . -}} | ||
|
||
|
||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{ .Content }} | ||
{{- if (eq .Params.contact true) -}} | ||
{{- partial "contact.html" . -}} | ||
|
||
{{- if isset .Params "series" -}} | ||
{{- partial "series.html" . -}} | ||
|
||
{{- end -}} | ||
</div> | ||
<div class="post__footer"> | ||
{{ with .Page.Params.Categories }} | ||
{{ partial "taxonomy/categories.html" . }} | ||
|
||
{{- end -}} | ||
|
||
{{- if (eq .Params.contact true) -}} | ||
{{- partial "contact.html" . -}} | ||
{{ end }} | ||
|
||
{{ with .Page.Params.Tags }} | ||
{{ partial "taxonomy/tags.html" . }} | ||
|
||
{{- end -}} | ||
</div> | ||
<div class="post__footer"> | ||
{{ with .Page.Params.Categories }} | ||
{{ partial "taxonomy/categories.html" . }} | ||
|
||
{{ end }} | ||
</div> | ||
|
||
{{ end }} | ||
{{ if and (or (eq .Type "post") (eq .Type .Site.Params.postSectionName)) (ne .Page.Params.disableComments true) }} | ||
{{- if .Site.DisqusShortname -}} | ||
<div id="comment"> | ||
<h2>{{ i18n "comments" }}</h2> | ||
{{ template "_internal/disqus.html" . }} | ||
</div> | ||
|
||
{{ with .Page.Params.Tags }} | ||
{{ partial "taxonomy/tags.html" . }} | ||
{{- end -}} | ||
{{- if .Site.Params.utterances.repo -}} | ||
<div id="comment"> | ||
<h2>{{ i18n "comments" }}</h2> | ||
{{ partial "comments/utterances.html" . }} | ||
</div> | ||
|
||
{{- end -}} | ||
{{- if .Site.Params.CommentoURL -}} | ||
<div id="comment"> | ||
<h2>{{ i18n "comments" }}</h2> | ||
{{ partial "comments/commento.html" . }} | ||
</div> | ||
|
||
{{ end }} | ||
</div> | ||
{{- end -}} | ||
{{- if .Site.Params.gitalk.repo -}} | ||
<div id="comment"> | ||
<h2>{{ i18n "comments" }}</h2> | ||
{{ partial "comments/gitalk.html" . }} | ||
</div> | ||
|
||
{{ if and (or (eq .Type "post") (eq .Type .Site.Params.postSectionName)) (ne .Page.Params.disableComments true) }} | ||
{{- if .Site.DisqusShortname -}} | ||
<div id="comment"> | ||
<h2>{{ i18n "comments" }}</h2> | ||
{{ template "_internal/disqus.html" . }} | ||
</div> | ||
|
||
{{- end -}} | ||
{{- if .Site.Params.utterances.repo -}} | ||
<div id="comment"> | ||
<h2>{{ i18n "comments" }}</h2> | ||
{{ partial "comments/utterances.html" . }} | ||
</div> | ||
|
||
{{- end -}} | ||
{{- if .Site.Params.CommentoURL -}} | ||
<div id="comment"> | ||
<h2>{{ i18n "comments" }}</h2> | ||
{{ partial "comments/commento.html" . }} | ||
</div> | ||
|
||
{{- end -}} | ||
{{- if .Site.Params.gitalk.repo -}} | ||
<div id="comment"> | ||
<h2>{{ i18n "comments" }}</h2> | ||
{{ partial "comments/gitalk.html" . }} | ||
</div> | ||
|
||
{{- end -}} | ||
{{- end -}} | ||
|
||
|
||
{{ end }} | ||
</div> | ||
{{ end }} | ||
</div> | ||
|
||
{{ end }} |
Oops, something went wrong.