summaryrefslogtreecommitdiff
path: root/clams-server/src/main/resources/templates
diff options
context:
space:
mode:
Diffstat (limited to 'clams-server/src/main/resources/templates')
-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
6 files changed, 73 insertions, 73 deletions
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 %}