summaryrefslogtreecommitdiff
path: root/clams-server/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'clams-server/src/main/resources')
-rw-r--r--clams-server/src/main/resources/public/css/post.css (renamed from clams-server/src/main/resources/public/css/article.css)14
-rw-r--r--clams-server/src/main/resources/public/css/posts.css (renamed from clams-server/src/main/resources/public/css/articles.css)12
-rw-r--r--clams-server/src/main/resources/templates/article.html19
-rw-r--r--clams-server/src/main/resources/templates/articles.html38
-rw-r--r--clams-server/src/main/resources/templates/home.html6
-rw-r--r--clams-server/src/main/resources/templates/post.html19
-rw-r--r--clams-server/src/main/resources/templates/posts-search.html (renamed from clams-server/src/main/resources/templates/articles-search.html)26
-rw-r--r--clams-server/src/main/resources/templates/posts.html38
8 files changed, 86 insertions, 86 deletions
diff --git a/clams-server/src/main/resources/public/css/article.css b/clams-server/src/main/resources/public/css/post.css
index 318df62..a12af10 100644
--- a/clams-server/src/main/resources/public/css/article.css
+++ b/clams-server/src/main/resources/public/css/post.css
@@ -1,4 +1,4 @@
-.article-header {
+.post-header {
display: flex;
justify-content: space-between;
margin-top: 2.8rem;
@@ -20,23 +20,23 @@ blockquote {
font-style: italic;
}
-.article-content {
+.post-content {
line-height: 1.8;
font-size: var(--font-size-body);
margin-bottom: 5rem;
}
-.article-content p {
+.post-content p {
margin-bottom: 1.5rem;
font-size: inherit;
}
-.article-content p:has(img) {
+.post-content p:has(img) {
margin: 2.4rem 0;
text-align: center;
}
-.article-content img {
+.post-content img {
width: 100%;
max-width: 34.4rem;
height: auto;
@@ -45,7 +45,7 @@ blockquote {
display: inline-block;
}
-.article-nav {
+.post-nav {
display: flex;
justify-content: space-between;
margin-top: 3.8rem;
@@ -54,7 +54,7 @@ blockquote {
}
@media (max-width: 768px) {
- .article-header {
+ .post-header {
margin-top: 10px;
flex-direction: column;
align-items: center;
diff --git a/clams-server/src/main/resources/public/css/articles.css b/clams-server/src/main/resources/public/css/posts.css
index 3ff7648..f6b1565 100644
--- a/clams-server/src/main/resources/public/css/articles.css
+++ b/clams-server/src/main/resources/public/css/posts.css
@@ -4,7 +4,7 @@
margin: 0 auto 1.8rem auto;
}
-.articles-section {
+.posts-section {
margin-bottom: 3.8rem;
}
@@ -49,26 +49,26 @@
color: var(--accent-color)
}
-.article-list {
+.post-list {
margin-top: 0.625rem;
padding-left: 2.2rem !important;
border-left: 2px solid var(--border-color);
}
-.article-list-item,
+.post-list-item,
.search-result-item {
margin-bottom: 0.8rem;
font-size: 1rem;
line-height: 1.6;
}
-.article-list a,
+.post-list a,
.search-result-item a {
font-size: 1rem;
font-weight: normal;
}
-.article-date {
+.post-date {
display: inline-block;
font-size: 0.9rem;
color: var(--text-color);
@@ -113,7 +113,7 @@
font-style: italic;
}
-.back-to-articles {
+.back-to-posts {
margin-top: 2.4rem;
display: inline-block;
}
diff --git a/clams-server/src/main/resources/templates/article.html b/clams-server/src/main/resources/templates/article.html
deleted file mode 100644
index 98b135b..0000000
--- a/clams-server/src/main/resources/templates/article.html
+++ /dev/null
@@ -1,19 +0,0 @@
-{% extends "templates/layout.html" %}
-
-{% block content %}
-<main class="main-container">
- <a href="/articles" class="back-link-top">&larr; back</a>
- <header class="article-header">
- <span class="article-date">{{ published_date }}</span>
- <span class="article-author">{{ author }}</span>
- </header>
-
- <article class="article-content">
- {{ content | raw }}
- </article>
-
- <nav class="article-nav">
- {{ back_to_index | raw }}
- </nav>
-</main>
-{% endblock %}
diff --git a/clams-server/src/main/resources/templates/articles.html b/clams-server/src/main/resources/templates/articles.html
deleted file mode 100644
index 5feddae..0000000
--- a/clams-server/src/main/resources/templates/articles.html
+++ /dev/null
@@ -1,38 +0,0 @@
-{% extends "templates/layout.html" %}
-
-{% block content %}
-<main class="main-container">
- <a href="/" class="back-link-top">&larr; back</a>
- <header>
- <h1>My articles</h1>
- <p class="intro-text">A collection of my writings and thoughts.</p>
-
- <form action="/articles" method="GET" class="search-form">
- <input type="text" name="search" value="{{ search_value }}" placeholder="Search articles..."
- aria-label="Search articles">
- <button type="submit" class="pill-button">Search</button>
- </form>
- </header>
-
- <section id="all" class="articles-section">
- <h2>All Articles</h2>
- {% for group in articles_by_year %}
- <details class="year-accordion" {% if loop.first %}open{% endif %}>
- <summary class="year-toggle">{{ group.key }}</summary>
- <ul class="article-list">
- {% for article in group.value %}
- <li class="article-list-item">
- <span class="article-date">{{ article.formattedDate }}</span>
- <a href="/articles/{{ article.slug }}">{{ article.title }}</a>
- {% if article.summary is not empty %}
- <br>
- <span class="search-result-summary">-- {{ article.summary }}</span>
- {% endif %}
- </li>
- {% endfor %}
- </ul>
- </details>
- {% endfor %}
- </section>
-</main>
-{% endblock %}
diff --git a/clams-server/src/main/resources/templates/home.html b/clams-server/src/main/resources/templates/home.html
index 4a99658..242d501 100644
--- a/clams-server/src/main/resources/templates/home.html
+++ b/clams-server/src/main/resources/templates/home.html
@@ -13,9 +13,9 @@
<div class="right-column">
<ul>
- <li><a href="/projects">Projects</a> <span class="description">-- the things I have built (and kept around)</span></li>
- <li><a href="/articles">Articles</a> <span class="description">-- notes and thoughts</span></li>
- <li><a href="https://github.com/eliashaugsbakk">GitHub</a> <span class="description">-- GitHub?</span></li>
+ <li><a href="/projects">Projects</a> <span class="description"></span></li>
+ <li><a href="/posts">Blog</a> <span class="description"></span></li>
+ <li><a href="https://github.com/eliashaugsbakk">GitHub</a> <span class="description"></span></li>
</ul>
</div>
</div>
diff --git a/clams-server/src/main/resources/templates/post.html b/clams-server/src/main/resources/templates/post.html
new file mode 100644
index 0000000..d20bda6
--- /dev/null
+++ b/clams-server/src/main/resources/templates/post.html
@@ -0,0 +1,19 @@
+{% extends "templates/layout.html" %}
+
+{% block content %}
+<main class="main-container">
+ <a href="/posts" class="back-link-top">&larr; back</a>
+ <header class="post-header">
+ <span class="post-date">{{ published_date }}</span>
+ <span class="post-author">{{ author }}</span>
+ </header>
+
+ <post class="post-content">
+ {{ content | raw }}
+ </post>
+
+ <nav class="post-nav">
+ {{ back_to_index | raw }}
+ </nav>
+</main>
+{% endblock %}
diff --git a/clams-server/src/main/resources/templates/articles-search.html b/clams-server/src/main/resources/templates/posts-search.html
index 54eb609..34a2ed5 100644
--- a/clams-server/src/main/resources/templates/articles-search.html
+++ b/clams-server/src/main/resources/templates/posts-search.html
@@ -2,13 +2,13 @@
{% block content %}
<main class="main-container">
- <a href="/articles" class="back-link-top">&larr; back</a>
+ <a href="/posts" class="back-link-top">&larr; back</a>
<header>
- <h1>My articles</h1>
- <p class="intro-text">For search: "<strong>{{ search_term }}</strong>" -- Found {{ results_count }} matching articles</p>
+ <h1>My posts</h1>
+ <p class="intro-text">For search: "<strong>{{ search_term }}</strong>" -- Found {{ results_count }} matching posts</p>
- <form action="/articles" method="GET" class="search-form">
- <input type="text" name="search" value="{{ search_term }}" placeholder="Search articles..." aria-label="Search articles">
+ <form action="/posts" method="GET" class="search-form">
+ <input type="text" name="search" value="{{ search_term }}" placeholder="Search posts..." aria-label="Search posts">
<button type="submit" class="pill-button">Search</button>
</form>
</header>
@@ -17,21 +17,21 @@
{% if results is empty %}
<div class="no-results">
{% if search_term is empty %}
- <p>Please enter a search term to search the articles. Or <a href="/articles">go back to all articles</a>.</p>
+ <p>Please enter a search term to search the posts. Or <a href="/posts">go back to all posts</a>.</p>
{% else %}
- <p>Found no articles matching <strong>"{{ search_term }}"</strong>. <br>
- <a href="/articles">Go back to all articles</a>.</p>
+ <p>Found no posts matching <strong>"{{ search_term }}"</strong>. <br>
+ <a href="/posts">Go back to all posts</a>.</p>
{% endif %}
</div>
{% else %}
<ul class="search-results-list">
- {% for article in results %}
+ {% for post in results %}
<li class="search-result-item">
- <span class="article-date">{{ article.formattedDate }}</span>
- <a href="/articles/{{ article.slug }}">{{ article.title }}</a>
- {% if article.summary is not empty %}
+ <span class="post-date">{{ post.formattedDate }}</span>
+ <a href="/posts/{{ post.slug }}">{{ post.title }}</a>
+ {% if post.summary is not empty %}
<br>
- <span class="search-result-summary">-- {{ article.summary }}</span>
+ <span class="search-result-summary">-- {{ post.summary }}</span>
{% endif %}
</li>
{% endfor %}
diff --git a/clams-server/src/main/resources/templates/posts.html b/clams-server/src/main/resources/templates/posts.html
new file mode 100644
index 0000000..3eecd62
--- /dev/null
+++ b/clams-server/src/main/resources/templates/posts.html
@@ -0,0 +1,38 @@
+{% extends "templates/layout.html" %}
+
+{% block content %}
+<main class="main-container">
+ <a href="/" class="back-link-top">&larr; back</a>
+ <header>
+ <h1>Blog</h1>
+ <p class="intro-text">My blog posts.</p>
+
+ <form action="/posts" method="GET" class="search-form">
+ <input type="text" name="search" value="{{ search_value }}" placeholder="Search posts..."
+ aria-label="Search posts">
+ <button type="submit" class="pill-button">Search</button>
+ </form>
+ </header>
+
+ <section id="all" class="posts-section">
+ <h2>All Posts</h2>
+ {% for group in posts_by_year %}
+ <details class="year-accordion" {% if loop.first %}open{% endif %}>
+ <summary class="year-toggle">{{ group.key }}</summary>
+ <ul class="post-list">
+ {% for post in group.value %}
+ <li class="post-list-item">
+ <span class="post-date">{{ post.formattedDate }}</span>
+ <a href="/posts/{{ post.slug }}">{{ post.title }}</a>
+ {% if post.summary is not empty %}
+ <br>
+ <span class="search-result-summary">-- {{ post.summary }}</span>
+ {% endif %}
+ </li>
+ {% endfor %}
+ </ul>
+ </details>
+ {% endfor %}
+ </section>
+</main>
+{% endblock %}