fix dates

This commit is contained in:
Cadey Ratio 2020-07-15 09:16:51 -04:00
parent 55c7585e98
commit cedde935f2
10 changed files with 40 additions and 24 deletions

View File

@ -40,4 +40,5 @@ mkShell {
SITE_PREFIX = "devel.";
CLACK_SET = "Ashlynn,Terry Davis,Dennis Ritchie";
RUST_LOG = "info";
GITHUB_SHA = "devel";
}

View File

@ -113,6 +113,12 @@ impl PartialOrd for Post {
}
}
impl Post {
pub fn detri(&self) -> String {
self.date.format("M%m %d %Y").to_string()
}
}
pub fn load(dir: &str) -> Result<Vec<Post>> {
let mut result: Vec<Post> = vec![];

View File

@ -5,7 +5,7 @@ self.addEventListener('install', function(event) {
event.waitUntil(preLoad());
});
const cacheName = "cache-2019-11-01";
const cacheName = "cache-xesite-2.0.0";
var preLoad = function(){
console.log('[PWA Builder] Install Event processing');

View File

@ -14,7 +14,7 @@
<p>
<ul>
@for post in posts {
<li>@post.date - <a href="@post.link">@post.front_matter.title</a></li>
<li>@post.date.format("%Y-%m-%d") - <a href="@post.link">@post.front_matter.title</a></li>
}
</ul>
</p>

View File

@ -24,25 +24,25 @@
<script type="application/ld+json">
@{
"@@context": "http://schema.org",
"@@type": "Article",
"headline": "@post.front_matter.title",
"image": "https://christine.website/static/img/avatar.png",
"url": "https://christine.website/@post.link",
"datePublished": "@post.date",
"mainEntityOfPage": @{
"@@type": "WebPage",
"@@id": "https://christine.website/@post.link"
@},
"author": @{
"@@type": "Person",
"name": "Christine Dodrill"
@},
"publisher": @{
"@@type": "Person",
"name": "Christine Dodrill"
@}
@}
"@@context": "http://schema.org",
"@@type": "Article",
"headline": "@post.front_matter.title",
"image": "https://christine.website/static/img/avatar.png",
"url": "https://christine.website/@post.link",
"datePublished": "@post.date",
"mainEntityOfPage": @{
"@@type": "WebPage",
"@@id": "https://christine.website/@post.link"
@},
"author": @{
"@@type": "Person",
"name": "Christine Dodrill"
@},
"publisher": @{
"@@type": "Person",
"name": "Christine Dodrill"
@}
@}
</script>
@body
@ -52,6 +52,8 @@
<!-- The button that should be clicked. -->
<button onclick="share_on_mastodon()">Share on Mastodon</button>
<p>This article was posted on @post.detri(). Facts and circumstances may have changed since publication. Please <a href="/contact">contact me</a> before jumping to conclusions if something seems wrong or unclear.</p>
@if post.front_matter.series.is_some() {
<p>Series: <a href="/blog/series/@post.front_matter.series.as_ref().unwrap()">@post.front_matter.series.as_ref().unwrap()</a></p>
}

View File

@ -1,10 +1,13 @@
@use crate::APPLICATION_NAME as APP;
@()
</div>
<hr />
<footer>
<blockquote>Copyright 2020 Christine Dodrill. Any and all opinions listed here are my own and not representative of my employers; future, past and present.</blockquote>
<br />
<!--<p>Like what you see? Donate on <a href="https://www.patreon.com/cadey">Patreon</a> like <a href="/patrons">these awesome people</a>!</p>-->
<p>Looking for someone for your team? Take a look <a href="/signalboost">here</a>.</p>
<p>Served by @APP running commit @env!("GITHUB_SHA"), see <a href="https://github.com/Xe/site">source code here</a>.</p>
</footer>
</div>

View File

@ -14,7 +14,7 @@
<div class="card cell -4of12 blogpost-card">
<header class="card-header">@post.front_matter.title</header>
<div class="card-content">
<center><p>Posted on @post.date<br /><a href="@post.link"><img src="@post.front_matter.thumb.as_ref().unwrap()" /></a></p></center>
<center><p>Posted on @post.date.format("%Y-%m-%d")<br /><a href="@post.link"><img src="@post.front_matter.thumb.as_ref().unwrap()" /></a></p></center>
</div>
</div>
}

View File

@ -58,6 +58,8 @@
<!-- The button that should be clicked. -->
<button onclick="share_on_mastodon()">Share on Mastodon</button>
<p>This artwork was posted on @post.detri().</p>
@if post.front_matter.series.is_some() {
<p>Series: <a href="/blog/series/@post.front_matter.series.as_ref().unwrap()">@post.front_matter.series.as_ref().unwrap()</a></p>
}

View File

@ -15,7 +15,7 @@
<p>
<ul>
@for post in posts {
<li>@post.date - <a href="@post.link">@post.front_matter.title</a></li>
<li>@post.date.format("%Y-%m-%d") - <a href="@post.link">@post.front_matter.title</a></li>
}
</ul>
</p>

View File

@ -54,6 +54,8 @@
<!-- The button that should be clicked. -->
<button onclick="share_on_mastodon()">Share on Mastodon</button>
<p>This article was posted on @post.detri(). Facts and circumstances may have changed since publication. Please <a href="/contact">contact me</a> before jumping to conclusions if something seems wrong or unclear.</p>
@if post.front_matter.series.is_some() {
<p>Series: <a href="/blog/series/@post.front_matter.series.as_ref().unwrap()">@post.front_matter.series.as_ref().unwrap()</a></p>
}