Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/urjaacharya/redgood.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrja Acharya <urja.acharya@huskers.unl.edu>2021-03-04 05:02:32 +0300
committerUrja Acharya <urja.acharya@huskers.unl.edu>2021-03-04 05:02:32 +0300
commit23b19f817da907f9c4b3d286b72d8ebd32468194 (patch)
tree4fdbae9ec919bedfbc03019bfa77aa6322725ce6
parent7993d0b887b93b161e81744f938607d16bdb709d (diff)
Reorganization and style changes
-rw-r--r--exampleSite/content/post/math-typesetting.mmark1
-rw-r--r--layouts/404.html4
-rw-r--r--layouts/_default/baseof.html11
-rw-r--r--layouts/index.html31
-rw-r--r--layouts/partials/footer.html26
-rw-r--r--layouts/partials/header.html89
-rw-r--r--layouts/partials/homeHeader.html17
-rw-r--r--layouts/partials/index/pinnedPost.html14
-rw-r--r--layouts/partials/index/recentPost.html9
-rw-r--r--layouts/partials/regularHeader.html27
-rw-r--r--layouts/partials/share.html36
-rw-r--r--layouts/partials/social.html12
-rw-r--r--layouts/section/archive.html2
-rw-r--r--static/css/main.css12
14 files changed, 146 insertions, 145 deletions
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" }}
-<h1>Page not found</h1>
-{{ end }} \ No newline at end of file
+<p>The page does not exist. <a href="{{ `/` | relURL }}">Go back to home page</a>.</p>
+{{ 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 @@
<html lang="{{ .Site.LanguageCode }}">
{{- partial "head.html" . -}}
<body>
- {{- partial "header.html" . -}}
- <main>
- {{- block "main" . }}
- {{- end }}
- </main>
+ {{ if .IsHome }}
+ {{ partial "homeHeader" . }}
+ {{ else }}
+ {{ partial "regularHeader" . }}
+ {{ end }}
+ <main>{{- block "main" . }} {{- end }}</main>
{{- partial "footer.html" . -}}
</body>
</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 }}
-<h2>
- <a href="{{ .Permalink }}">{{ .Title }}</a>
-</h2>
-<div class="pinned-post home-page-card">
- <p>{{ .Summary | plainify | truncate 250 }}</p>
- <div class="home-page-card-links">
- <a href="{{ .Permalink }}">
- Read Pinned Post
- </a>
- </div>
- <div class="home-page-card-links">
- <a href="{{ `pinnedposts` | relURL }}">All Pinned</a>
- </div>
-</div>
-{{ end }}
-
-<h3>Recent Posts</h3>
-<div class="recent-posts home-page-card">
- {{ range ((where .Site.Pages "Kind" "page").ByDate.Reverse) | first 6 }}
- {{ partial "listPage" . }}
- {{ end }}
- <div class="home-page-card-links">
- <a href="{{ `archive` | relURL }}"
- >All Posts</a
- >
- </div>
-</div>
-
+{{ partial "index/pinnedPost" . }}
+{{ partial "index/recentPost" . }}
<h3>Sections</h3>
<div class="site-sections home-page-card">
{{ 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 @@
<footer>
{{ if eq .Kind "section" }}
- <div>
- {{ template "_internal/pagination.html" . }}
- </div>
- {{ end }} {{ if eq .Kind "page" }}
+ <div>{{ template "_internal/pagination.html" . }}</div>
+ {{ end }}
+ {{ if eq .Kind "page" }}
<div class="prev-next">
{{- if .PrevInSection }}
<a
class="active"
href="{{ .PrevInSection.Permalink | relURL }}"
aria-label="Previous Article"
- >Previous</a
- >
+ ><i class="bi bi-arrow-left-circle"></i
+ ></a>
{{- else }}
- <div class="disabled">N/A</div>
+ <div class="disabled"><i class="bi bi-arrow-left-circle"></i></div>
{{- end }}
- <a href="#" aria-label="navigate to top">Top</a>
+ <a href="#" aria-label="navigate to top"
+ ><i class="bi bi-box-arrow-in-up"></i></a>
{{- if .NextInSection }}
<a
class="active"
href="{{ .NextInSection.Permalink | relURL }}"
aria-label="Next Article"
- >Next</a
- >
+ ><i class="bi bi-arrow-right-circle"></i
+ ></a>
{{- else }}
- <div class="disabled">N/A</div>
+ <div class="disabled"><i class="bi bi-arrow-right-circle"></i></div>
{{- end }}
</div>
{{ end }}
<div class="footer">
<p>
- {{ if .Site.Params.theme.copyrightInFooter }}
- &copy;
- {{end}}
+ {{ if .Site.Params.theme.copyrightInFooter }} &copy; {{end}}
{{ dateFormat "2006" now }} {{ .Site.Params.author }}.
{{ .Site.Params.theme.footerText | markdownify }}.
</p>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
deleted file mode 100644
index 8d0719b..0000000
--- a/layouts/partials/header.html
+++ /dev/null
@@ -1,89 +0,0 @@
-{{ if .IsHome }}
-<header class="home-page-header">
- <div class="header-image-container">
- <div class="header-image">
- <img
- src="{{ .Site.Params.about.profileImage | relURL }}"
- alt="profile image of {{ .Site.Params.author }}"
- />
- </div>
- </div>
- <div class="header-info">
- <h1 class="main-title">{{- .Site.Title -}}</h1>
- <p class="about-narrative">
- {{ .Site.Params.about.narrative | markdownify }}
- </p>
- {{ $width := mul (len .Site.Params.social) 2 }}
- <div class="social-info" style="width: {{ $width }}em;">
- {{- range $key, $val := .Site.Params.social -}}
- <a class="header-icon" href="{{ $val.url }}" aria-label="{{ $key }}"
- ><i class="{{ $val.icon }}"></i>
- </a>
- {{- end -}}
- </div>
- </div>
-</header>
-{{ else }}
-<header class="regular-page-header">
- <div
- style="
- display: flex;
- justify-content: space-between;
- width: 98%;
- margin-bottom: 0.5em;
- "
- >
- <a class="header-icon" href="{{ `/` | relURL }}" aria-label="home page">
- <i class="bi bi-house-door"></i>
- </a>
- <div
- class="share-links"
- style="
- display: flex;
- margin-left: 1em;
- align-items: center;
- width: 120px;
- justify-content: space-between;
- "
- >
- {{ $url := printf "%s" .URL | absLangURL }}
- <a
- class="header-icon"
- href="mailto:?subject={{ print .Title ` by ` .Site.Params.author }}&amp;body={{ $url }}"
- target="_self"
- rel="noopener"
- aria-label="share by email"
- ><i class="bi bi-envelope"></i
- ></a>
- <a
- class="header-icon"
- href="https://facebook.com/sharer/sharer.php?u={{ $url }}"
- target="_blank"
- rel="noopener"
- aria-label="share on facebook"
- ><i class="bi bi-facebook"></i
- ></a>
- <a
- class="header-icon"
- href="https://twitter.com/intent/tweet/?text={{ print .Title ` by ` .Site.Params.author }}&amp;url={{ $url }}"
- target="_blank"
- rel="noopener"
- aria-label="share on twitter"
- ><i class="bi bi-twitter"></i
- ></a>
- </div>
- </div>
- <div class="page-title-and-info" style="text-align: center">
- <h1 class="page-title">
- {{ if or (eq .Kind "taxonomy") (eq .Kind "term") }}#{{ end }}{{ .Title }}
- </h1>
- {{ if eq .Kind "page" }}
- <p class="document-date">
- {{ dateFormat .Site.Params.theme.dateFormat .Date }} &middot; {{ .Site.Params.author }}
- </p>
- {{ if .Description }}
- <p class="document-description">"{{ .Description }}"</p>
- {{ end }} {{ end }}
- </div>
-</header>
-{{ end }}
diff --git a/layouts/partials/homeHeader.html b/layouts/partials/homeHeader.html
new file mode 100644
index 0000000..a32c792
--- /dev/null
+++ b/layouts/partials/homeHeader.html
@@ -0,0 +1,17 @@
+<header class="home-page-header">
+ <div class="header-image-container">
+ <div class="header-image">
+ <img
+ src="{{ .Site.Params.about.profileImage | relURL }}"
+ alt="profile image of {{ .Site.Params.author }}"
+ />
+ </div>
+ </div>
+ <div class="header-info">
+ <h1 class="main-title">{{- .Site.Title -}}</h1>
+ <p class="about-narrative">
+ {{ .Site.Params.about.narrative | markdownify }}
+ </p>
+ {{ partial "social" . }}
+ </div>
+</header>
diff --git a/layouts/partials/index/pinnedPost.html b/layouts/partials/index/pinnedPost.html
new file mode 100644
index 0000000..8b29a3d
--- /dev/null
+++ b/layouts/partials/index/pinnedPost.html
@@ -0,0 +1,14 @@
+{{ range ((where .Site.Pages "Params.pinned" true).ByDate.Reverse) | first 1 }}
+<h2>
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+</h2>
+<div class="pinned-post home-page-card">
+ <p>{{ .Summary | plainify | truncate 250 }}</p>
+ <div class="home-page-card-links">
+ <a href="{{ .Permalink }}"> Read Pinned Post </a>
+ </div>
+ <div class="home-page-card-links">
+ <a href="{{ `pinnedposts` | relURL }}">All Pinned</a>
+ </div>
+</div>
+{{ end }}
diff --git a/layouts/partials/index/recentPost.html b/layouts/partials/index/recentPost.html
new file mode 100644
index 0000000..7578c0f
--- /dev/null
+++ b/layouts/partials/index/recentPost.html
@@ -0,0 +1,9 @@
+<h3>Recent Posts</h3>
+<div class="recent-posts home-page-card">
+ {{ range ((where .Site.Pages "Kind" "page").ByDate.Reverse) | first 6 }}
+ {{ partial "listPage" . }}
+ {{ end }}
+ <div class="home-page-card-links">
+ <a href="{{ `archive` | relURL }}">All Posts</a>
+ </div>
+</div>
diff --git a/layouts/partials/regularHeader.html b/layouts/partials/regularHeader.html
new file mode 100644
index 0000000..69470fc
--- /dev/null
+++ b/layouts/partials/regularHeader.html
@@ -0,0 +1,27 @@
+<header class="regular-page-header">
+ <div
+ style="
+ display: flex;
+ justify-content: space-between;
+ width: 98%;
+ margin-bottom: 0.5em;
+ "
+ >
+ <a class="header-icon" href="{{ `/` | relURL }}" aria-label="home page">
+ <i class="bi bi-house-door"></i>
+ </a>
+ {{ partial "share" . }}
+ </div>
+ <div class="page-title-and-info" style="text-align: center">
+ <h1 class="page-title">
+ {{ if or (eq .Kind "taxonomy") (eq .Kind "term") }}#{{ end }}{{ .Title }}
+ </h1>
+ {{ if eq .Kind "page" }}
+ <p class="document-date">
+ {{ dateFormat .Site.Params.theme.dateFormat .Date }} &middot; {{ .Params.author }}
+ </p>
+ {{ if .Description }}
+ <p class="document-description">"{{ .Description }}"</p>
+ {{ end }} {{ end }}
+ </div>
+</header>
diff --git a/layouts/partials/share.html b/layouts/partials/share.html
new file mode 100644
index 0000000..e7cd823
--- /dev/null
+++ b/layouts/partials/share.html
@@ -0,0 +1,36 @@
+<div
+ class="share-links"
+ style="
+ display: flex;
+ margin-left: 1em;
+ align-items: center;
+ width: 120px;
+ justify-content: space-between;
+ "
+>
+ {{ $url := printf "%s" .URL | absLangURL }}
+ <a
+ class="header-icon"
+ href="mailto:?subject={{ print .Title ` by ` .Site.Params.author }}&amp;body={{ $url }}"
+ target="_self"
+ rel="noopener"
+ aria-label="share by email"
+ ><i class="bi bi-envelope"></i
+ ></a>
+ <a
+ class="header-icon"
+ href="https://facebook.com/sharer/sharer.php?u={{ $url }}"
+ target="_blank"
+ rel="noopener"
+ aria-label="share on facebook"
+ ><i class="bi bi-facebook"></i
+ ></a>
+ <a
+ class="header-icon"
+ href="https://twitter.com/intent/tweet/?text={{ print .Title ` by ` .Site.Params.author }}&amp;url={{ $url }}"
+ target="_blank"
+ rel="noopener"
+ aria-label="share on twitter"
+ ><i class="bi bi-twitter"></i
+ ></a>
+</div>
diff --git a/layouts/partials/social.html b/layouts/partials/social.html
new file mode 100644
index 0000000..5a1bd37
--- /dev/null
+++ b/layouts/partials/social.html
@@ -0,0 +1,12 @@
+{{ $width := mul (len .Site.Params.social) 2 }}
+<div class="social-info" style="width: {{ $width }}em;">
+ {{- range $key, $val := .Site.Params.social -}} {{ if eq $key "email" }}
+ <a class="header-icon" href="mailto:{{- $val.url }}" aria-label="{{ $key }}"
+ ><i class="{{ $val.icon }}"></i>
+ </a>
+ {{ else }}
+ <a class="header-icon" href="{{- $val.url }}" aria-label="{{ $key }}"
+ ><i class="{{ $val.icon }}"></i>
+ </a>
+ {{ end }} {{- end -}}
+</div>
diff --git a/layouts/section/archive.html b/layouts/section/archive.html
index 20050ac..3ca7c90 100644
--- a/layouts/section/archive.html
+++ b/layouts/section/archive.html
@@ -1,5 +1,5 @@
{{ define "main" }}
-{{$paginator := .Paginate (where .Site.Pages "Kind" "page").ByDate.Reverse 50 }}
+{{$paginator := .Paginate (where .Site.Pages "Kind" "page").ByDate.Reverse 20 }}
<div class="archive-table">
{{ range $paginator.Pages }}
{{ partial "listPage" . }}
diff --git a/static/css/main.css b/static/css/main.css
index 1fa8434..a19b466 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -1,15 +1,15 @@
:root {
--bg: whitesmoke;
- --bgDark: #b3b3b3;
--bgLight: white;
--mainText: rgb(0, 0, 0);
--secondaryText: rgb(105, 105, 105);
--primary: #a3001b;
--highlight: #b6ffb6;
--shadow: black;
+ --inactive: grey;
}
html {
- font-size: 16px;
+ font-size: 18px;
overflow-y: scroll;
background-color: var(--bg);
box-sizing: border-box;
@@ -21,7 +21,7 @@ body {
max-width: 900px;
min-width: 250px;
margin: auto;
- font-size: 1.2em;
+ font-size: 1em;
color: var(--mainText);
border-radius: 5px;
min-height: 100vh;
@@ -287,8 +287,9 @@ svg {
.prev-next {
display: flex;
flex-direction: row;
- justify-content: space-around;
+ justify-content: space-between;
margin-bottom: 3em;
+ font-size: 1.5em;
}
.prev-next > div,
.prev-next > a {
@@ -313,6 +314,9 @@ main img {
max-width: 100%;
margin: 1em auto;
}
+.disabled {
+ color: var(--inactive);
+}
@media only screen and (max-width: 720px) {
.home-page-header {
flex-direction: column;