diff --git a/site_test/archive.html b/site_test/archive.html index c6f0f5b..c6d9116 100644 --- a/site_test/archive.html +++ b/site_test/archive.html @@ -7,10 +7,10 @@ {% block content -%} {% for year in years %} -
{{ entry.title }}
diff --git a/site_test/css/main.scss b/site_test/css/main.scss
index 25f6e85..f57dcc2 100644
--- a/site_test/css/main.scss
+++ b/site_test/css/main.scss
@@ -115,6 +115,10 @@ table {
}
}
+hr {
+ border: 1px solid black;
+}
+
html {
font-family: "Valkyrie A", Charter, serif;
font-size: 16px;
@@ -360,9 +364,29 @@ footer {
left: 0;
background: var(--webring-gradient);
}
+ &:hover::after {
+ height: 3px;
+ bottom: 1px;
+ }
a {
color: transparent;
text-decoration: none;
position: relative;
}
}
+
+.archive-list {
+ padding: 0;
+ font-size: 1.5rem;
+
+ li {
+ list-style: none;
+
+ time {
+ color: var(--secondary-text-color);
+ }
+ &:hover time {
+ color: var(--text-color);
+ }
+ }
+}
diff --git a/site_test/layout/tag.html b/site_test/layout/tag.html
index eee9799..9fd6a7b 100644
--- a/site_test/layout/tag.html
+++ b/site_test/layout/tag.html
@@ -9,10 +9,10 @@
{{ entry.title }}
diff --git a/src/generator/archive.rs b/src/generator/archive.rs
index 1cda671..b4ed83b 100644
--- a/src/generator/archive.rs
+++ b/src/generator/archive.rs
@@ -1,6 +1,6 @@
use std::collections::HashMap;
-use chrono::Datelike;
+use chrono::{DateTime, Datelike, FixedOffset};
use compute_graph::{
builder::GraphBuilder,
input::{Input, InputVisitable},
@@ -62,7 +62,7 @@ impl Rule for Entries {
.map(|post| Entry {
permalink: post.permalink(),
title: post.metadata.title.clone(),
- year: post.metadata.date.year(),
+ date: post.metadata.date,
})
.collect()
}
@@ -75,7 +75,7 @@ impl Rule for PostsByYear {
fn evaluate(&mut self) -> Self::Output {
let mut map = HashMap::new();
for entry in self.input_0().iter().cloned() {
- map.entry(entry.year).or_insert(vec![]).push(entry);
+ map.entry(entry.date.year()).or_insert(vec![]).push(entry);
}
PostsYearMap(map)
}
@@ -97,5 +97,5 @@ impl PostsYearMap {
pub struct Entry {
pub permalink: String,
pub title: String,
- pub year: i32,
+ pub date: DateTime