Improve indents in theme

This commit is contained in:
Joshua Goins 2023-04-13 17:19:53 -04:00
parent adbe777ccf
commit d4ba7a063f
12 changed files with 76 additions and 90 deletions

View file

@ -1,6 +1,5 @@
{{ define "main" }} {{ define "main" }}
<h2>{{ .Title }}</h2> <h2>{{ .Title }}</h2>
<hr> <hr>
{{ with resources.Get .Params.filename }} {{ with resources.Get .Params.filename }}
@ -98,11 +97,9 @@
</table> </table>
{{ with .Content }} {{ with .Content }}
<h3>Commentary</h3> <h3>Commentary</h3>
<p> <p>{{ . }}</p>
{{ . }}
</p>
{{ end }} {{ end }}
{{ if .Params.threed }} {{ if .Params.threed }}

View file

@ -1,11 +1,11 @@
{{ $paginator := .Paginate (where .RegularPagesRecursive "Type" "art") }} {{ $paginator := .Paginate (where .RegularPagesRecursive "Type" "art") }}
<div class="grid"> <div class="grid">
<div class="grid-sizer"></div> <div class="grid-sizer"></div>
{{ range $paginator.Pages }} {{ range $paginator.Pages }}
{{ partial "render-art" . }} {{ partial "render-art" . }}
{{ end }} {{ end }}
</div> </div>
<div style="text-align: center;"> <div style="text-align: center;">

View file

@ -1,5 +1,4 @@
<h2>{{ .Title }}</h2> <h2>{{ .Title }}</h2>
<hr> <hr>
{{ .Content }} {{ .Content }}

View file

@ -1,17 +1,17 @@
<h3>Comments</h3> <h3>Comments</h3>
{{ if hugo.IsProduction }} {{ if hugo.IsProduction }}
<script <script
data-isso="//{{ $.Site.Params.isso_url }}/" data-isso="//{{ $.Site.Params.isso_url }}/"
data-isso-title="" data-isso-title=""
data-isso-avatar="false" data-isso-avatar="false"
data-isso-vote="false" data-isso-vote="false"
data-isso-reveal-on-click="5" data-isso-reveal-on-click="5"
data-isso-page-author-hashes="96ab157c3aaa" data-isso-page-author-hashes="96ab157c3aaa"
src="//{{ $.Site.Params.isso_url }}/js/embed.min.js" async crossorigin></script> src="//{{ $.Site.Params.isso_url }}/js/embed.min.js" async crossorigin></script>
<section id="isso-thread" data-title="{{ .Title }}" data-isso-id="{{ .File.ContentBaseName }}"> <section id="isso-thread" data-title="{{ .Title }}" data-isso-id="{{ .File.ContentBaseName }}">
<noscript>Javascript needs to be activated to view comments.</noscript> <noscript>Javascript needs to be activated to view comments.</noscript>
</section> </section>
{{ else }} {{ else }}
<p>Comments are disabled in development mode.</p> <p>Comments are disabled in development mode.</p>
{{ end }} {{ end }}

View file

@ -30,14 +30,12 @@
<figcaption> <figcaption>
{{ with .title }} {{ with .title }}
<i>"{{ . }}"</i> <i>"{{ . }}"</i>
{{ end }} {{ end }}
</figcaption> </figcaption>
{{ else }} {{ else }}
<em>CANNOT FIND {{ .filename }}</em>
<em>CANNOT FIND {{ .filename }}</em>
{{ end }} {{ end }}
</figure> </figure>
{{ end }} {{ end }}

View file

@ -27,13 +27,13 @@
{{ $masonry := resources.Get "js/masonry.min.js" }} {{ $masonry := resources.Get "js/masonry.min.js" }}
{{ if hugo.IsProduction }} {{ if hugo.IsProduction }}
{{ $masonry = $masonry | minify | fingerprint | resources.PostProcess }} {{ $masonry = $masonry | fingerprint | resources.PostProcess }}
{{ end }} {{ end }}
<script src="{{ $masonry.RelPermalink }}" integrity="{{ $masonry.Data.Integrity }}"></script> <script src="{{ $masonry.RelPermalink }}" integrity="{{ $masonry.Data.Integrity }}"></script>
{{ $imagesloaded := resources.Get "js/imagesloaded.min.js" }} {{ $imagesloaded := resources.Get "js/imagesloaded.min.js" }}
{{ if hugo.IsProduction }} {{ if hugo.IsProduction }}
{{ $imagesloaded = $imagesloaded | minify | fingerprint | resources.PostProcess }} {{ $imagesloaded = $imagesloaded | fingerprint | resources.PostProcess }}
{{ end }} {{ end }}
<script src="{{ $imagesloaded.RelPermalink }}" integrity="{{ $imagesloaded.Data.Integrity }}"></script> <script src="{{ $imagesloaded.RelPermalink }}" integrity="{{ $imagesloaded.Data.Integrity }}"></script>

View file

@ -1,5 +1,4 @@
{{ $avatar := resources.Get .Site.Params.profile_picture }} {{ with resources.Get .Site.Params.profile_picture }}
{{ with $avatar }} <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}"/>
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}"/>
{{ end }} {{ end }}
<h1>{{ .Site.Title }}</h1> <h1>{{ .Site.Title }}</h1>

View file

@ -1,5 +1,4 @@
{{ $related := .Site.RegularPages.Related . | first 5 }} {{ with .Site.RegularPages.Related . | first 5 }}
{{ with $related }}
<h3>See Also</h3> <h3>See Also</h3>
<ul> <ul>
{{ range . }} {{ range . }}

View file

@ -1,56 +1,55 @@
{{ $base := "art" }} {{ $base := "art" }}
{{ if .Params.threed }} {{ if .Params.threed }}
{{ $base = "3d" }} {{ $base = "3d" }}
{{ end }} {{ end }}
{{ if .Params.animation }} {{ if .Params.animation }}
{{ $base = "animation" }} {{ $base = "animation" }}
{{ end }} {{ end }}
{{ $full := resources.Get (printf "%s/%s.webp" $base .Params.slug) }} {{ $full := resources.Get (printf "%s/%s.webp" $base .Params.slug) }}
{{ if $full }} {{ if $full }}
{{ $filename_without_ext := .Params.slug }}
{{ $filename_without_ext := .Params.slug }} {{ $month := 1 }}
{{ $year := 1 }}
{{ $month := 1 }} {{ if .Params.date }}
{{ $year := 1 }} {{ $split := split .Params.date "-" }}
{{ $month = index $split 0 }}
{{ if .Params.date }} {{ $year = index $split 3 }}
{{ $split := split .Params.date "-" }}
{{ $month = index $split 0 }}
{{ $year = index $split 3 }}
{{ end }}
<a class="no-decoration grid-item" href="{{ .Permalink }}">
{{ $path := printf "/%s/%d/%.2d/%s" $base (int $year) (int $month) $filename_without_ext}}
{{ $title := .Params.title }}
{{ $image := (resources.Get (printf "%s/%s.webp" $base .Params.slug)).Resize "400x" }}
{{ if .Params.nsfw }}
{{ $image = $image | images.Filter (images.GaussianBlur 6) (images.Pixelate 8) }}
{{ end }} {{ end }}
{{ with $image }} <a class="no-decoration grid-item" href="{{ .Permalink }}">
{{ if $.Params.threed }}
{{ with resources.Get "3d.png" }} {{ $path := printf "/%s/%d/%.2d/%s" $base (int $year) (int $month) $filename_without_ext}}
<img alt="Viewable 3D" title="Viewable 3D" style="z-index: 1; position: absolute; left: 10px; top: 10px" src="{{ .Permalink }}" /> {{ $title := .Params.title }}
{{ end }} {{ $image := (resources.Get (printf "%s/%s.webp" $base .Params.slug)).Resize "400x" }}
{{ if .Params.nsfw }}
{{ $image = $image | images.Filter (images.GaussianBlur 6) (images.Pixelate 8) }}
{{ end }} {{ end }}
{{ if $.Params.animation }} {{ with $image }}
{{ with resources.Get "play-circle.png" }} {{ if $.Params.threed }}
<img alt="Viewable Animation" title="Viewable Animation" style="z-index: 1; position: absolute; left: 10px; top: 10px" src="{{ .Permalink }}" /> {{ with resources.Get "3d.png" }}
<img alt="Viewable 3D" title="Viewable 3D" style="z-index: 1; position: absolute; left: 10px; top: 10px" src="{{ .Permalink }}" />
{{ end }}
{{ end }} {{ end }}
{{ if $.Params.animation }}
{{ with resources.Get "play-circle.png" }}
<img alt="Viewable Animation" title="Viewable Animation" style="z-index: 1; position: absolute; left: 10px; top: 10px" src="{{ .Permalink }}" />
{{ end }}
{{ end }}
<img width="{{ .Width }}" height="{{ .Height }}" alt="{{ $title }}" title="{{ $title }}" src="{{ .Permalink }}">
{{ else }}
<p>Thumbnail not found!</p>
{{ end }} {{ end }}
<img width="{{ .Width }}" height="{{ .Height }}" alt="{{ $title }}" title="{{ $title }}" src="{{ .Permalink }}"> </a>
{{ else }}
<p>Thumbnail not found!</p>
{{ end }}
</a>
{{ else }} {{ else }}
<em>CANNOT FIND {{ .Params.slug }}</em>
<em>CANNOT FIND {{ .Params.slug }}</em>
{{ end }} {{ end }}

View file

@ -1,7 +1,7 @@
{{ $name := urlize .Title }} {{ $name := urlize .Title }}
{{ with .Slug }} {{ with .Slug }}
{{ $name = . }} {{ $name = . }}
{{ end }} {{ end }}
<div style="width: 100px; margin-top: 20px; margin-bottom: 20px; margin-left: auto; margin-right: auto"> <div style="width: 100px; margin-top: 20px; margin-bottom: 20px; margin-left: auto; margin-right: auto">
@ -11,16 +11,13 @@
</div> </div>
{{ if hugo.IsProduction }} {{ if hugo.IsProduction }}
{{ $site := resources.Get "js/voting.js" }} {{ $site = resources.Get "js/voting.js" | minify | fingerprint | resources.PostProcess }}
{{ if hugo.IsProduction }} <script src="{{ $site.RelPermalink }}" integrity="{{ $site.Data.Integrity }}"></script>
{{ $site = $site | minify | fingerprint | resources.PostProcess }}
{{ end }}
<script src="{{ $site.RelPermalink }}" integrity="{{ $site.Data.Integrity }}"></script>
<script type="text/javascript"> <script type="text/javascript">
refresh({{ $name }}) refresh({{ $name }})
</script> </script>
{{ else }} {{ else }}
<p>debug: {{ $name }}</p> <p style="text-align: center">Voting is disabled in development mode.</p>
{{ end }} {{ end }}

View file

@ -1,4 +1,3 @@
{{ $avatar := resources.Get .Site.Params.profile_picture }} {{ with resources.Get .Site.Params.profile_picture }}
{{ with $avatar }} <img id="about-pic" alt="Profile Picture" title="Profile Picture" src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}"/>
<img id="about-pic" src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}"/>
{{ end }} {{ end }}

View file

@ -1,11 +1,10 @@
<h3>Recent Blog Posts</h3> <h3>Recent Blog Posts</h3>
<div class="generic-con"> <div class="generic-con">
{{ range first 3 (where .Site.Pages "Type" "blog").ByDate.Reverse }}
{{ range first 3 (where .Site.Pages "Type" "blog").ByDate.Reverse }} <li style="margin-left: 10px; list-style-type: square;">
<li style="margin-left: 10px; list-style-type: square;"> <a href="{{ .Permalink }}">{{ .Title }}</a>
<a href="{{ .Permalink }}">{{ .Title }}</a> <p><i>{{ .Summary }}</i></p>
<p><i>{{ .Summary }}</i></p> </li>
</li> {{ end }}
{{ end }}
</div> </div>