Skip to content

Commit

Permalink
Add date links into footer, remove 'Posted On' (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiefdhurst authored Jan 8, 2025
2 parents 33c37e5 + b1847ad commit 18cf7da
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion web/templates/index.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<article>
<h1><a href="/{{.Slug}}">{{.Title}}</a></h1>
<p class="date">
Posted on {{.GetDate}}
{{.GetDate}}
{{if $enableEdit}}<span class="float-right"><a href="/{{.Slug}}/edit" class="button button-outline">Edit</a></span>{{end}}
</p>
<div class="summary">
Expand Down
6 changes: 3 additions & 3 deletions web/templates/view.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<article class="view" itemscope itemtype="https://schema.org/BlogPosting">
<h1 itemprop="title headline">{{.Journal.Title}}</h1>
<p class="date">
<span itemprop="dateCreated pubdate datePublished" content="{{.Journal.Date}}">Posted on {{.Journal.GetDate}}</span>
<span itemprop="dateCreated pubdate datePublished" content="{{.Journal.Date}}">{{.Journal.GetDate}}</span>
{{if .Container.Configuration.EnableEdit}}<span class="float-right"><a href="/{{.Journal.Slug}}/edit" class="button button-outline">Edit</a></span>{{end}}
</p>
<div class="content" itemprop="mainEntityOfPage">
Expand All @@ -16,13 +16,13 @@
<div class="prev">
{{if .Prev.ID}}
<span>Previous</span>
<a href="/{{.Prev.Slug}}">{{.Prev.Title}}</a>
<a href="/{{.Prev.Slug}}">{{.Prev.Title}}</a> <small>{{.Prev.GetDate}}</small>
{{end}}
</div>
<div class="next">
{{if .Next.ID}}
<span>Next</span>
<a href="/{{.Next.Slug}}">{{.Next.Title}}</a>
<a href="/{{.Next.Slug}}">{{.Next.Title}}</a> <small>{{.Next.GetDate}}</small>
{{end}}
</div>
</nav>
Expand Down
19 changes: 16 additions & 3 deletions web/themes/default/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ article .content a,
article .content a:link,
article .content a:visited,
article .content a:active,
article .content a:hover, {
article .content a:hover {
box-shadow: inset 0 -2px 0 currentColor;
transition: .3s;
text-decoration: none;
}

article a:hover {
Expand Down Expand Up @@ -351,11 +351,24 @@ button:hover,
width: 50%;
}

.prev-next.next > div {
.prev-next > div.next {
text-align: right;
}

.prev-next a:link,
.prev-next a:visited,
.prev-next a:active,
.prev-next a:hover {
font-weight: 700;
}

.prev-next span {
color: #222;
display: block;
font-size: .875rem;
}

.prev-next small {
color: #777;
display: block;
font-size: .875rem;
Expand Down

0 comments on commit 18cf7da

Please sign in to comment.