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-01 08:22:15 +0300
committerUrja Acharya <urja.acharya@huskers.unl.edu>2021-03-01 08:22:15 +0300
commit9495cb612590c43c39a3b3c3582ce288009b6c76 (patch)
tree9f68a8a1583a1d929ed3d1b74477bbe10dba5030
parent8b75c25c0a50e44e1f1599adb979492a95dfcf95 (diff)
modified header for all pages except home page
-rw-r--r--layouts/_default/list.html3
-rw-r--r--layouts/_default/single.html4
-rw-r--r--layouts/_default/taxonomy.html9
-rw-r--r--layouts/partials/head.html5
-rw-r--r--layouts/partials/header.html34
-rw-r--r--layouts/partials/title.html17
-rw-r--r--layouts/section/archive.html1
-rw-r--r--layouts/section/pinnedPosts.html1
-rw-r--r--static/css/main.css15
9 files changed, 50 insertions, 39 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index eb7c0cd..dbfa4b1 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,6 +1,7 @@
{{ define "main" }}
-<h1>{{ .Title }}</h1>
+<div class="list-page">
{{ range (.Paginator 10).Pages }}
{{ partial "listPage" . }}
{{ end }}
+</div>
{{ end }} \ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 917c4f9..9983b08 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,7 +1,3 @@
{{ define "main" }}
-<div class="front-matter">
- <h1>{{ .Title }}</h1>
- <p>{{ dateFormat .Site.Params.theme.dateFormat .Date }} &middot; {{ .Site.Params.author }}</p>
-</div>
{{ .Content }}
{{ end }}
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
index ea0c32f..34d6b4e 100644
--- a/layouts/_default/taxonomy.html
+++ b/layouts/_default/taxonomy.html
@@ -1,6 +1,7 @@
{{ define "main" }}
-<h1>#{{ .Title }}</h1>
-{{ range (.Paginator 10).Pages.ByDate.Reverse }}
-{{ partial "listPage" . }}
-{{ end }}
+<div class="taxonomy-data">
+ {{ range (.Paginator 10).Pages.ByDate.Reverse }}
+ {{ partial "listPage" . }}
+ {{ end }}
+</div>
{{ end }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 5567668..6670b4f 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,9 +1,6 @@
<head>
<title>
- {{ .Site.Title }}
- {{ if and (not .IsHome) (.Title) }}
- - {{ .Title }}
- {{ end }}
+ {{- if and (not .IsHome) (.Title) }} {{ .Title }} - {{ end }} {{ .Site.Title -}}
</title>
<meta name="theme-color" content="#a3001b" />
<meta charset="utf-8" />
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index d0d73f0..bd774d7 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,9 +1,14 @@
-<header>
+<header {{ if .IsHome }}class="home-page-header" {{ end }}>
+ {{ if .IsHome }}
<div class="header-image-container">
<div class="header-image">
- <img src="{{ .Site.Params.about.profileImage | relURL }}" alt="profile image of {{ .Site.Params.author }}"/>
+ <img
+ src="{{ .Site.Params.about.profileImage | relURL }}"
+ alt="profile image of {{ .Site.Params.author }}"
+ />
</div>
</div>
+ {{ end }}
<div class="header-info">
{{ if not .IsHome }}
<a class="home-icon" href="{{ `/` | relURL }}" aria-label="home page">
@@ -11,27 +16,14 @@
</a>
{{ else }}
<h1 class="site-title">{{- .Site.Title -}}</h1>
- {{ end }}
-
- <div>
- <p class="site-title home-{{ .IsHome }}">
- {{ if not .IsHome }} {{ .Site.Title }} {{ end }}
- </p>
- <p class="about-narrative">
- {{ .Site.Params.about.narrative | markdownify }}
- </p>
- </div>
-
+ {{ end }} {{ partial "title" . }} {{ if .IsHome }}
<div class="social-info">
- {{- range $key, $val := .Site.Params.social -}}
- <a
- class="social-link"
- href="{{ $val }}"
- aria-label="{{ $key }}"
- >
- {{- $key -}}
- </a>
+ {{- range $key, $val := .Site.Params.social -}}
+ <a class="social-link" href="{{ $val }}" aria-label="{{ $key }}">
+ {{- $key -}}
+ </a>
{{- end -}}
</div>
+ {{ end }}
</div>
</header>
diff --git a/layouts/partials/title.html b/layouts/partials/title.html
new file mode 100644
index 0000000..6f12a98
--- /dev/null
+++ b/layouts/partials/title.html
@@ -0,0 +1,17 @@
+<div>
+ <p class="site-title home-{{ .IsHome }}">
+ {{ if not .IsHome }}
+ {{ if eq .Kind "taxonomy" }}#{{ end }}{{ .Title }}
+ {{ if eq .Kind "page" }}
+ <p>
+ {{ dateFormat .Site.Params.theme.dateFormat .Date }} &middot; {{ .Site.Params.author }}
+ </p>
+ {{ end }}
+ {{ end }}
+ </p>
+ {{ if .IsHome }}
+ <p class="about-narrative">
+ {{ .Site.Params.about.narrative | markdownify }}
+ </p>
+ {{ end }}
+</div>
diff --git a/layouts/section/archive.html b/layouts/section/archive.html
index 686e8bb..20050ac 100644
--- a/layouts/section/archive.html
+++ b/layouts/section/archive.html
@@ -1,5 +1,4 @@
{{ define "main" }}
-<h1>{{ .Title }}</h1>
{{$paginator := .Paginate (where .Site.Pages "Kind" "page").ByDate.Reverse 50 }}
<div class="archive-table">
{{ range $paginator.Pages }}
diff --git a/layouts/section/pinnedPosts.html b/layouts/section/pinnedPosts.html
index e9e39b4..0049765 100644
--- a/layouts/section/pinnedPosts.html
+++ b/layouts/section/pinnedPosts.html
@@ -1,5 +1,4 @@
{{ define "main" }}
-<h1>{{ .Title }}</h1>
{{$paginator := .Paginate (where .Site.Pages "Params.pinned" true).ByDate.Reverse 5 }}
{{ range $paginator.Pages }}
<h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
diff --git a/static/css/main.css b/static/css/main.css
index dcd702b..c042cbf 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -45,13 +45,15 @@ a:hover {
header {
background-color: var(--primary);
margin-top: 5px;
- min-height: 275px;
display: flex;
flex-direction: row;
justify-content: start;
flex-wrap: wrap;
}
-header img {
+header .home-page-header {
+ min-height: 275px;
+}
+header .home-page-header img {
height: 100%;
}
.header-info {
@@ -168,7 +170,7 @@ h6 {
}
.site-title.home-false {
display: block;
- font-size: 1.5em;
+ font-size: 2em;
font-weight: 600;
margin-bottom: 0.5em;
text-decoration: underline;
@@ -251,6 +253,9 @@ svg {
.archive-table {
width: 100%;
}
+.archive-table {
+ margin-top: 1em;
+}
.home-page-card {
background-color: var(--bgLight) !important;
padding: 15px;
@@ -310,6 +315,10 @@ svg {
padding: 0 0.5em;
border-radius: 5px;
}
+.taxonomy-data,
+.list-page {
+ margin-top: 1em;
+}
.list-page-data {
display: flex;
margin-bottom: 0.5em;