Move template modifications out of themes/hyde and rollback misc changes

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
Harsh Shandilya 2020-02-04 02:15:50 +05:30
parent 834d8a42cf
commit e9df2e450c
10 changed files with 37 additions and 12 deletions

View File

@ -0,0 +1,10 @@
{{ partial "head.html" . }}
<body class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}">
{{ partialCached "sidebar.html" . }}
<main class="content container">
{{ block "main" . -}}{{- end }}
</main>
{{ template "_internal/google_analytics_async.html" . }}
</body>
</html>

20
layouts/index.html Normal file
View File

@ -0,0 +1,20 @@
{{ define "main" -}}
<div class="posts">
{{ range .Site.RegularPages -}}
{{ if .Date }}
<article class="post">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h1>
<p class="post-date"><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "January 2, 2006" }}</time> | ~{{ .ReadingTime }} min read</p>
{{ .Description }}
{{ if .Truncated }}
<div class="read-more-link">
<a href="{{ .RelPermalink }}">Read More…</a>
</div>
{{ end }}
</article>
{{- end }}
</div>
{{- end }}
{{- end }}

View File

@ -0,0 +1,2 @@
<link rel="preload" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700"></noscript>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 KiB

After

Width:  |  Height:  |  Size: 437 KiB

View File

@ -1,6 +1,6 @@
{{ partial "head.html" . }}
<body class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}">
{{ partialCached "sidebar.html" . }}
{{ partial "sidebar.html" . }}
<main class="content container">
{{ block "main" . -}}{{- end }}
</main>

View File

@ -1,11 +1,7 @@
{{ define "main" -}}
<div class="post">
<h1>{{ .Title }}</h1>
<p class="post-date"><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "January 2, 2006" }}</time> | ~{{ .ReadingTime }} min read |
{{ range .Params.tags }}
<span class="tag"><a class="tag" href="{{ "tags/" | absLangURL }}{{ . | urlize }}">#{{.}}</a> </span>
{{ end }}
</p>
<time datetime={{ .Date.Format "2006-01-02T15:04:05Z0700" }} class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
{{ .Content }}
</div>

View File

@ -1,13 +1,12 @@
{{ define "main" -}}
<div class="posts">
{{ range .Site.RegularPages -}}
{{ if .Date }}
<article class="post">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h1>
<p class="post-date"><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "January 2, 2006" }}</time> | ~{{ .ReadingTime }} min read</p>
{{ .Description }}
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}" class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
{{ .Summary }}
{{ if .Truncated }}
<div class="read-more-link">
<a href="{{ .RelPermalink }}">Read More…</a>
@ -17,4 +16,3 @@
{{- end }}
</div>
{{- end }}
{{- end }}

View File

@ -1,2 +1 @@
<link rel="preload" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700"></noscript>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Abril+Fatface|PT+Sans:400,400i,700">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 465 B

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

After

Width:  |  Height:  |  Size: 183 B