-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor homepage * Improve rendering of front page - Navbar always shows - Posts display authors in post list * Render author/date for posts. Still needs to be styled. Still needs to handle multiple authors. * Make author field a list * Better style post meta-data * Render tags * Render RSS for tags and link to them * Update theme * Update icons Co-authored-by: Stefan van der Walt <stefanv@berkeley.edu>
- Loading branch information
1 parent
a2247ad
commit cb232ec
Showing
10 changed files
with
170 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.post-author:not(:first-child):before { | ||
content: ""; | ||
} | ||
|
||
.post-date { | ||
padding-left: 0.5rem; | ||
} | ||
|
||
.post-tag { | ||
padding-left: 0.3rem; | ||
} | ||
|
||
.post-author:not(:first-child) { | ||
padding-left: 0.5rem; | ||
} | ||
|
||
.post-meta { | ||
color: var(--colorSecondaryDark); | ||
padding-bottom: 1rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
--- | ||
title: This is a test blog post | ||
author: Stéfan van der Walt | ||
author: ["Stéfan van der Walt", "Pamphile Roy"] | ||
date: 2022-02-25 | ||
tags: | ||
- tag1 | ||
- tag2 | ||
--- | ||
|
||
Hi there, and welcome to the Scientific Python blog! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{{ define "navbar" }} | ||
{{ partial "navbar.html" . }} | ||
{{ end }} | ||
|
||
{{ define "main" }} | ||
<section class="content-padding flex-row"> | ||
<div class="content-container"> | ||
<h1 id="term-title"> | ||
Posts with | ||
<a href="atom.xml">#{{ .Title }} | ||
<span class="icon fas fa-rss" style="vertical-align: baseline;"></span> | ||
</a> | ||
</h1> | ||
{{ range .Pages }} | ||
<div class="post-list"> | ||
<article> | ||
<div class="post-title"> | ||
<a href="{{ .RelPermalink }}">{{ .Title }}</a> | ||
</div> | ||
{{ partial "post_meta.html" . }} | ||
<div class="post-summary">{{ .Summary }}</div> | ||
</article> | ||
</div> | ||
{{ end }} | ||
</div> | ||
</section> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
{{ define "navbar" }} | ||
{{ partial "navbar.html" . }} | ||
{{ end }} | ||
|
||
{{ define "main" }} | ||
{{ partial "section/section.html" . }} | ||
{{ partial "section.html" . }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{{- $title := .Site.Params.title }} | ||
{{- $navbar := .Site.Params.navbar }} | ||
{{- $navbarLogo := .Site.Params.navbarlogo }} | ||
<nav id="nav" class="navbar is-fresh is-transparent no-shadow" role="navigation" aria-label="main navigation"> | ||
<div class="container is-max-widescreen"> | ||
<div class="navbar-brand"> | ||
{{- if $navbarLogo}} | ||
<a id="navbar-item" class="navbar-item" href="{{ $navbarLogo.link }}"> | ||
<img id="navbar-logo" src="{{ printf "/images/%s" $navbarLogo.image | relURL }}" alt="{{ default (printf "%s logo" $title) $navbarLogo.altText }}"> | ||
<div id="navbar-logo-text">{{ default "" $navbarLogo.text }}</div> | ||
</a> | ||
{{- end}} | ||
|
||
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbar-menu"> | ||
<span aria-hidden="true"></span> | ||
<span aria-hidden="true"></span> | ||
<span aria-hidden="true"></span> | ||
</a> | ||
</div> | ||
|
||
<div id="navbar-menu" class="navbar-menu is-static"> | ||
|
||
<div class="navbar-end"> | ||
{{- range $navbar }} | ||
{{- if .sublinks }} | ||
<div id="navbar-item" class="navbar-item has-dropdown is-hoverable"> | ||
<a class="navbar-link"> | ||
{{ .title }} | ||
</a> | ||
|
||
<div class="navbar-dropdown"> | ||
{{- range .sublinks }} | ||
<a href="{{ .url }}" id="navbar-item" class="navbar-item"> | ||
{{ .title }} | ||
</a> | ||
{{- end }} | ||
</div> | ||
</div> | ||
{{- else if .button }} | ||
<a href="{{ .url }}" id="navbar-item" class="navbar-item"> | ||
<span class="button signup-button rounded secondary-btn raised"> | ||
{{ .title }} | ||
</span> | ||
</a> | ||
{{- else }} | ||
<a href="{{ .url }}" id="navbar-item" class="navbar-item is-secondary"> | ||
{{ .title }} | ||
</a> | ||
{{- end }} | ||
{{- end }} | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<div class="post-meta"> | ||
<span class="post-authors"> | ||
{{- range .Params.author -}} | ||
<div class="post-author"><span style="vertical-align: bottom;" class="icon fa fa-user"></span> {{ . }}</div> | ||
{{- end -}} | ||
</span> | ||
{{ if .Date }} | ||
<span class="post-date"><span style="vertical-align: bottom;" class="icon fas fa-calendar"></span> {{.Date.Format "January 2, 2006"}}</span> | ||
{{ end }} | ||
{{- if .Params.tags -}} | ||
<div class="post-tags"> | ||
<span style="vertical-align: bottom;" class="icon fas fa-tag"></span> | ||
{{- range .Params.tags -}} | ||
<span class="post-tag"><a href="{{ path.Join "/tags/" . | relURL }}">#{{.}}</a></span> | ||
{{- end -}} | ||
</div> | ||
{{- end -}} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<section class="content-padding flex-row"> | ||
<div class="content-container"> | ||
{{ range .Pages }} | ||
<div class="post-list"> | ||
<article> | ||
<div class="post-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></div> | ||
{{ partial "post_meta.html" . }} | ||
<div class="post-summary">{{ .Summary }}</div> | ||
</article> | ||
</div> | ||
{{ end }} | ||
</div> | ||
</section> |
Submodule scientific-python-hugo-theme
updated
14 files
+3 −3 | Makefile | |
+5 −0 | assets/css/content.css | |
+17 −12 | assets/css/styles.css | |
+5 −2 | doc/Makefile | |
+2 −1 | doc/config.yaml | |
+0 −0 | doc/content/shortcodes.md.stub | |
+1 −1 | layouts/_default/baseof.html | |
+1 −1 | layouts/partials/footer.html | |
+5 −3 | layouts/partials/javascript.html | |
+1 −17 | layouts/partials/navbar-clone.html | |
+1 −16 | layouts/partials/navbar.html | |
+20 −0 | layouts/partials/translation.html | |
+24 −0 | layouts/shortcodes/mermaid.html | |
+1 −2 | static/js/fresh.js |