From 23b19f817da907f9c4b3d286b72d8ebd32468194 Mon Sep 17 00:00:00 2001 From: Urja Acharya Date: Wed, 3 Mar 2021 18:02:32 -0800 Subject: Reorganization and style changes --- exampleSite/content/post/math-typesetting.mmark | 1 - layouts/404.html | 4 +- layouts/_default/baseof.html | 11 +-- layouts/index.html | 31 +-------- layouts/partials/footer.html | 26 ++++---- layouts/partials/header.html | 89 ------------------------- layouts/partials/homeHeader.html | 17 +++++ layouts/partials/index/pinnedPost.html | 14 ++++ layouts/partials/index/recentPost.html | 9 +++ layouts/partials/regularHeader.html | 27 ++++++++ layouts/partials/share.html | 36 ++++++++++ layouts/partials/social.html | 12 ++++ layouts/section/archive.html | 2 +- static/css/main.css | 12 ++-- 14 files changed, 146 insertions(+), 145 deletions(-) delete mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/homeHeader.html create mode 100644 layouts/partials/index/pinnedPost.html create mode 100644 layouts/partials/index/recentPost.html create mode 100644 layouts/partials/regularHeader.html create mode 100644 layouts/partials/share.html create mode 100644 layouts/partials/social.html diff --git a/exampleSite/content/post/math-typesetting.mmark b/exampleSite/content/post/math-typesetting.mmark index 7f421ae..a1467e3 100644 --- a/exampleSite/content/post/math-typesetting.mmark +++ b/exampleSite/content/post/math-typesetting.mmark @@ -3,7 +3,6 @@ author: Hugo Authors title: Math Typesetting date: 2019-03-08 description: A brief guide to setup KaTeX -markup: mmark math: true --- diff --git a/layouts/404.html b/layouts/404.html index 5a1c6de..7542398 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,3 +1,3 @@ {{ define "main" }} -

Page not found

-{{ end }} \ No newline at end of file +

The page does not exist. Go back to home page.

+{{ end }} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 68fff46..dcf346a 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -2,11 +2,12 @@ {{- partial "head.html" . -}} - {{- partial "header.html" . -}} -
- {{- block "main" . }} - {{- end }} -
+ {{ if .IsHome }} + {{ partial "homeHeader" . }} + {{ else }} + {{ partial "regularHeader" . }} + {{ end }} +
{{- block "main" . }} {{- end }}
{{- partial "footer.html" . -}} diff --git a/layouts/index.html b/layouts/index.html index 6b3157a..7095424 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,33 +1,6 @@ {{ define "main" }} -{{ range ((where .Site.Pages "Params.pinned" true).ByDate.Reverse) | first 1 }} -

- {{ .Title }} -

-
-

{{ .Summary | plainify | truncate 250 }}

- - -
-{{ end }} - -

Recent Posts

-
- {{ range ((where .Site.Pages "Kind" "page").ByDate.Reverse) | first 6 }} - {{ partial "listPage" . }} - {{ end }} - -
- +{{ partial "index/pinnedPost" . }} +{{ partial "index/recentPost" . }}

Sections

{{ range .Site.Sections }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 878ec2b..f0c644e 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,39 +1,37 @@