Apply some bootstrap styling

This commit is contained in:
ItsDrike 2021-08-25 11:53:41 +02:00
parent a82ab80745
commit 71fc71e30a
No known key found for this signature in database
GPG key ID: B5F6B41F708C3ADD
4 changed files with 48 additions and 33 deletions

View file

@ -1,18 +1,22 @@
{{ define "main" }} {{ define "main" }}
{{ partial "content.html" . }} <div id="main">
<div class="container">
{{ partial "content.html" . }}
<!--Group posts by months--> <!--Group posts by months-->
{{ range .Pages.GroupByDate "2006-01" }} {{ range .Pages.GroupByDate "2006-01" }}
{{ $month := print .Key "-01"}} {{ $month := print .Key "-01"}}
{{ $display := dateFormat "2006-01" $month }} {{ $display := dateFormat "2006-01" $month }}
<h3 id="{{ $display }}"> <h3 class="mt-5" id="{{ $display }}">
<a href="#{{ $display }}"> <a href="#{{ $display }}">
<time datetime="{{ $month }}" title='{{ dateFormat "January 2006" $month }}'>{{ $display }}</time> <time datetime="{{ $month }}" title='{{ dateFormat "January 2006" $month }}'>{{ $display }}</time>
</a> </a>
</h3> </h3>
<!--List posts belonging to current month --> <!--List posts belonging to current month -->
{{ range (sort .Pages "Date" "desc") }} {{ range (sort .Pages "Date" "desc") }}
{{ partial "list_item.html" . }} {{ partial "list_item.html" . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
</div>
</div>
{{ end }} {{ end }}

View file

@ -1,9 +1,11 @@
{{ if not .Date.IsZero }} {{ if not .Date.IsZero }}
<span title='{{ .Date.Format "January 2 2006" }}'>{{ .Date.Format "2006-01-02" }}</span> <span class="pr-2" title='{{ .Date.Format "January 2 2006" }}'>
<i class="far fa-calendar-alt pr-1>"></i>{{ .Date.Format "2006-01-02" }}
</span>
{{ end }} {{ end }}
{{ if .Params.tags }} {{ if .Params.tags }}
{{ range $1, $e := .Params.tags }} {{ range $1, $e := .Params.tags }}
<a href="/tags/{{ urlize . }}">#{{ . }}</a> <a class="mr-1" href="/tags/{{ urlize . }}">#{{ . }}</a>
{{ end }} {{ end }}
{{ end }} {{ end }}

View file

@ -1,14 +1,21 @@
<h1>{{ .Title }}</h1> <h1 class="display-4">{{ .Title }}</h1>
{{ if .Params.subtitle }}
<h5 class="my-3">{{ markdownify .Params.subtitle | emojify }}</h5>
{{ end }}
{{ if .IsPage }} {{ if .IsPage }}
<p>{{ partial "content-details.html" . }}</p> <p>{{ partial "content-details.html" . }}</p>
{{ end }} {{ end }}
<hr>
<div class="content"> {{ if .Content }}
{{ if .TableOfContents }} <hr>
<div class="content">
{{ .TableOfContents }} <div class="content mt-3">
</div> {{ if .TableOfContents }}
{{ end }} <div class="float-1g-right ml-lg-3 mb-3 p-3">
{{ .Content }} {{ .TableOfContents }}
</div> </div>
{{ end }}
{{ .Content }}
</div>
{{ end }}

View file

@ -1,7 +1,9 @@
<div class="media-body"> <div class="media list-page-item mb-3" data-id="{{ .File.UniqueID }}">
<a href="{{ .RelPermalink }}"> <div class="media-body">
<h5>{{ .Title }}</h5> <a href="{{ .RelPermalink }}">
</a> <h5 class="my-0">{{ .Title }}</h5>
<small>{{ partial "content-details.html" . }}</small> </a>
<p>{{ partial "summary.html" . }}</p> <small>{{ partial "content-details.html" . }}</small>
<p>{{ partial "summary.html" . }}</p>
</div>
</div> </div>