roll

Rolled my own static website builder 💻

Commit
6832d2cee951268b72806c66e421bedb9ff94c58
Parent
4c30fb6e108b2b8e0fe406749bb9880a45a83ad1
Author
Pablo <pablo-pie@riseup.net>
Date

Typos in html::render_feed

Also made the

's in the feed a bit more accessible by using
instead of
for the titles

Diffstats

2 files changed, 5 insertions, 4 deletions

Status Name Changes Insertions Deletions
Modified exemple/css/styles.css 2 files changed 1 1
Modified src/html.rs 2 files changed 4 3
diff --git a/exemple/css/styles.css b/exemple/css/styles.css
@@ -377,7 +377,7 @@ hr {
   text-align: left !important;
 }
 
-#feed article .article-title {
+#feed article h6 {
   font-size: 1em;
   font-style: italic;
   font-weight: bold;
diff --git a/src/html.rs b/src/html.rs
@@ -571,7 +571,7 @@ pub fn render_feed(
   render_nav(w)?;
 
   writeln!(w, "<main>")?;
-  writeln!(w, "<div id=\"feed\"\">")?;
+  writeln!(w, "<div id=\"feed\">")?;
   writeln!(w, "<nav>")?;
   writeln!(w, "<ul>")?;
   writeln!(w, "<li><a href=\"/{POSTS_SUBDIR}/{RSS_FILE}\">rss feed</a></li>")?;
@@ -589,10 +589,11 @@ pub fn render_feed(
     // NOTE: see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/feed_role
     writeln!(w, "<article aria-labelledby=\"article-label-{i}\" aria-describedby=\"article-description-{i}\" aria-posinset=\"{i}\" aria-setsize=\"{feed_size}\">")?;
     writeln!(w, "<header>")?;
-    writeln!(w, "<div class=\"article-title\" id=\"article-label-{i}\">")?;
+    // NOTE: see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/article
+    writeln!(w, "<h6 id=\"article-label-{i}\">")?;
     writeln!(w, "<a href=\"/{POSTS_SUBDIR}/{post_name}.html\">{}</a>",
                 Escaped(title))?;
-    writeln!(w, "</div>")?;
+    writeln!(w, "</h6>")?;
     writeln!(w, "<time datetime=\"{}\">{}</time>", DateTime(*date), date)?;
     writeln!(w, "</header>")?;
     writeln!(w, "<div id=\"article-description-{i}\">")?;