summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2021-12-22 01:06:39 -0500
committerCara Salter <cara@devcara.com>2021-12-22 01:06:39 -0500
commit3d7cd8a7addd86b7a97a50821eb348345e0d427a (patch)
tree875aecda597c8161359005c33a147097fa36c807 /templates
parentc4d7f8f50d53057005d6bb28ac487f69ea45bd5e (diff)
downloadsite-3d7cd8a7addd86b7a97a50821eb348345e0d427a.tar.gz
site-3d7cd8a7addd86b7a97a50821eb348345e0d427a.zip
Work for the day
Post parsing, index page, navbar, CSS, blog listings There's something weird with the path matching that's making it miss the post view page in favor of the list view page.
Diffstat (limited to 'templates')
-rw-r--r--templates/bloglist.rs.html19
-rw-r--r--templates/footer.rs.html6
-rw-r--r--templates/header.rs.html11
-rw-r--r--templates/index.rs.html43
-rw-r--r--templates/post.rs.html10
5 files changed, 83 insertions, 6 deletions
diff --git a/templates/bloglist.rs.html b/templates/bloglist.rs.html
new file mode 100644
index 0000000..98cd171
--- /dev/null
+++ b/templates/bloglist.rs.html
@@ -0,0 +1,19 @@
+@use crate::blog::post::Post;
+@use super::{header_html, footer_html};
+
+@(posts: Vec<Post>)
+
+@:header_html(Some("Posts"), None)
+
+<h1>Posts</h1>
+
+<p>
+<ul>
+ @for post in posts {
+ <li>@post.date.format("%B %d %Y") -
+ <a href="/@post.link">@post.front_matter.title</a></li>
+ }
+</ul>
+</p>
+
+@:footer_html()
diff --git a/templates/footer.rs.html b/templates/footer.rs.html
index 5029544..1574a50 100644
--- a/templates/footer.rs.html
+++ b/templates/footer.rs.html
@@ -1,12 +1,12 @@
@()
-</div>
-<hr />
-<footer>
+
+<footer class="footer">
<blockquote>Content copyright Cara Salter 2021, based on <a
href="https://github.com/Xe/site">Xe/site</a>
under the Zlib license</blockquote>
<p>This server runs version @env!("GIT_SHA"), located on my <a
href='https://git.carathe.dev/~muirrum/site/commit/@env!("GIT_SHA")'>sourcehut</a>
</footer>
+</div>
</body>
</html>
diff --git a/templates/header.rs.html b/templates/header.rs.html
index afcf445..c93566c 100644
--- a/templates/header.rs.html
+++ b/templates/header.rs.html
@@ -1,4 +1,4 @@
-@use chrono::{DateLike, Utc};
+@use chrono::{Datelike, Utc};
@(title: Option<&str>, styles: Option<&str>)
@@ -10,7 +10,16 @@
} else {
<title>cara salter</title>
}
+ <link rel="stylesheet" href="/static/gruvbox.css">
+ <link rel="stylesheet" href="/static/custom.css">
+ <meta name="viewport" content="width=device-width,
+ initial-scale=1.0">
</head>
<body>
<div class="container">
+ <ul class="navbar">
+ <li class="navbar-item"><a href="/">Home</a></li>
+ <li class="navbar-item"><a
+ href="/blog">Posts</a></li>
+ </ul>
diff --git a/templates/index.rs.html b/templates/index.rs.html
index 6e35935..d4158a1 100644
--- a/templates/index.rs.html
+++ b/templates/index.rs.html
@@ -1,9 +1,48 @@
-@use super::{header_html}
+@use super::{header_html, footer_html};
@()
@:header_html(None, None)
<link rel="canonical" href="https://devcara.com">
-Test
+
+<div class="two-column">
+
+ <div class="inner-column">
+ <h3>About me</h3>
+ I am a:
+ <ul>
+ <li>Trans woman (she/her/hers)</li>
+ <li>Eagle Scout</li>
+ <li>Software Engineer</li>
+ </ul>
+
+ My interests include:
+ <ul>
+ <li>Radio</li>
+ <li>Event production</li>
+ <li>Software tinkering</li>
+ <li>Linux</li>
+ </ul>
+ Among other things.
+
+ </div>
+ <div class="inner-column">
+ <h3>Skills</h3>
+ <h4>Web Development</h4>
+ <ul>
+ <li>Rust (Warp)</li>
+ <li>Go (Gin-gonic)</li>
+ <li>Python (Django/Flask)</li>
+ </ul>
+ <h4>Systems Administration</h4>
+ <ul>
+ <li>Prometheus Monitoring/Alerts</li>
+ <li>Ansible</li>
+ <li>Shell scripting</li>
+ <li>Nginx</li>
+ </ul>
+ </div>
</div>
+
+@:footer_html()
diff --git a/templates/post.rs.html b/templates/post.rs.html
new file mode 100644
index 0000000..c638bfb
--- /dev/null
+++ b/templates/post.rs.html
@@ -0,0 +1,10 @@
+@use super::{header_html, footer_html};
+@use crate::blog::post::Post;
+
+@(post: Post, body: impl ToHtml)
+
+@:header_html(Some(&post.front_matter.title.clone()), None))
+
+@body
+
+@:footer_html()