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/article.css (renamed from clams-server/src/main/resources/public/css/post.css)14
-rw-r--r--clams-server/src/main/resources/public/css/articles.css (renamed from clams-server/src/main/resources/public/css/blog.css)10
-rw-r--r--clams-server/src/main/resources/public/css/home.css6
-rw-r--r--clams-server/src/main/resources/templates/article.html21
-rw-r--r--clams-server/src/main/resources/templates/articles.html (renamed from clams-server/src/main/resources/templates/blog.html)20
-rw-r--r--clams-server/src/main/resources/templates/blog-search.html26
-rw-r--r--clams-server/src/main/resources/templates/home.html8
-rw-r--r--clams-server/src/main/resources/templates/post.html21
8 files changed, 60 insertions, 66 deletions
diff --git a/clams-server/src/main/resources/public/css/post.css b/clams-server/src/main/resources/public/css/article.css
index 6a237e1..faf6f90 100644
--- a/clams-server/src/main/resources/public/css/post.css
+++ b/clams-server/src/main/resources/public/css/article.css
@@ -1,4 +1,4 @@
-.post-header {
+.article-header {
display: flex;
justify-content: space-between;
margin-top: 45px;
@@ -9,21 +9,21 @@
padding-bottom: 10px;
}
-.post-content {
+.article-content {
line-height: 1.8;
margin-bottom: 80px;
}
-.post-content p {
+.article-content p {
margin-bottom: 1.5rem;
}
-.post-content p:has(img) {
+.article-content p:has(img) {
margin: 40px 0;
text-align: center;
}
-.post-content img {
+.article-content img {
width: 100%;
max-width: 550px;
height: auto;
@@ -32,7 +32,7 @@
display: inline-block;
}
-.post-nav {
+.article-nav {
display: flex;
justify-content: space-between;
margin-top: 60px;
@@ -41,7 +41,7 @@
}
@media (max-width: 768px) {
- .post-header {
+ .article-header {
margin-top: 10px;
flex-direction: column;
align-items: center;
diff --git a/clams-server/src/main/resources/public/css/blog.css b/clams-server/src/main/resources/public/css/articles.css
index 2284182..b7b7b4f 100644
--- a/clams-server/src/main/resources/public/css/blog.css
+++ b/clams-server/src/main/resources/public/css/articles.css
@@ -4,7 +4,7 @@
margin: 0 auto 30px auto;
}
-.blog-section {
+.articles-section {
margin-bottom: 60px;
}
@@ -60,17 +60,17 @@
opacity: 0.7;
}
-.post-list {
+.article-list {
margin-top: 10px;
padding-left: 35px !important;
border-left: 2px solid var(--border-color);
}
-.post-list li {
+.article-list li {
margin-bottom: 0.8rem;
}
-.post-list a {
+.article-list a {
font-size: 1rem;
font-weight: normal;
}
@@ -125,7 +125,7 @@
font-style: italic;
}
-.back-to-blog {
+.back-to-articles {
margin-top: 40px;
display: inline-block;
}
diff --git a/clams-server/src/main/resources/public/css/home.css b/clams-server/src/main/resources/public/css/home.css
index f76d93a..268e371 100644
--- a/clams-server/src/main/resources/public/css/home.css
+++ b/clams-server/src/main/resources/public/css/home.css
@@ -29,12 +29,6 @@
word-wrap: break-word;
}
-.study-line {
- margin-top: 0.5rem;
- font-size: 0.95rem;
- opacity: 0.8;
-}
-
@media (max-width: 768px) {
.content-grid {
grid-template-columns: 1fr;
diff --git a/clams-server/src/main/resources/templates/article.html b/clams-server/src/main/resources/templates/article.html
new file mode 100644
index 0000000..7d0c23f
--- /dev/null
+++ b/clams-server/src/main/resources/templates/article.html
@@ -0,0 +1,21 @@
+{% 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>
+
+ <h1>{{ title }}</h1>
+
+ <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/blog.html b/clams-server/src/main/resources/templates/articles.html
index 896cf56..905ed52 100644
--- a/clams-server/src/main/resources/templates/blog.html
+++ b/clams-server/src/main/resources/templates/articles.html
@@ -4,24 +4,24 @@
<main class="main-container">
<a href="/" class="back-link-top">&larr; back</a>
<header>
- <h1>Elias Haugsbakk's Blog</h1>
+ <h1>My articles</h1>
<p class="intro-text">A collection of my writings and thoughts.</p>
- <form action="/blog" method="GET" class="search-form">
- <input type="text" name="search" value="{{ search_value }}" placeholder="Search posts..."
- aria-label="Search blog posts">
+ <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">Search</button>
</form>
</header>
- <section id="all" class="blog-section">
- <h2>All Posts</h2>
- {% for group in posts_by_year %}
+ <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="post-list">
- {% for post in group.value %}
- <li><a href="/blog/{{ post.slug }}">{{ post.title }}</a></li>
+ <ul class="article-list">
+ {% for article in group.value %}
+ <li><a href="/articles/{{ article.slug }}">{{ article.title }}</a></li>
{% endfor %}
</ul>
</details>
diff --git a/clams-server/src/main/resources/templates/blog-search.html b/clams-server/src/main/resources/templates/blog-search.html
index e2188cf..dd435e5 100644
--- a/clams-server/src/main/resources/templates/blog-search.html
+++ b/clams-server/src/main/resources/templates/blog-search.html
@@ -2,13 +2,13 @@
{% block content %}
<main class="main-container">
- <a href="/blog" class="back-link-top">&larr; back</a>
+ <a href="/articles" class="back-link-top">&larr; back</a>
<header>
- <h1>Elias Haugsbakk's Blog</h1>
- <p class="intro-text">For search: "<strong>{{ search_term }}</strong>" -- Found {{ results_count }} matching posts</p>
+ <h1>My articles</h1>
+ <p class="intro-text">For search: "<strong>{{ search_term }}</strong>" -- Found {{ results_count }} matching articles</p>
- <form action="/blog" method="GET" class="search-form">
- <input type="text" name="search" value="{{ search_term }}" placeholder="Search posts..." aria-label="Search blog posts">
+ <form action="/articles" method="GET" class="search-form">
+ <input type="text" name="search" value="{{ search_term }}" placeholder="Search articles..." aria-label="Search articles">
<button type="submit">Search</button>
</form>
</header>
@@ -17,20 +17,20 @@
{% if results is empty %}
<div class="no-results">
{% if search_term is empty %}
- <p>Please enter a search term to search the blog posts. Or <a href="/blog">go back to all posts</a>.</p>
+ <p>Please enter a search term to search the articles. Or <a href="/articles">go back to all articles</a>.</p>
{% else %}
- <p>Found no posts matching <strong>"{{ search_term }}"</strong>. <br>
- <a href="/blog">Go back to all posts</a>.</p>
+ <p>Found no articles matching <strong>"{{ search_term }}"</strong>. <br>
+ <a href="/articles">Go back to all articles</a>.</p>
{% endif %}
</div>
{% else %}
<ul class="search-results-list">
- {% for post in results %}
+ {% for article in results %}
<li class="search-result-item">
- <span class="search-result-date">{{ post.formattedDate }}</span>
- <a href="/blog/{{ post.slug }}">{{ post.title }}</a>
- {% if post.summary is not empty %}
- <span class="search-result-summary">-- {{ post.summary }}</span>
+ <span class="search-result-date">{{ article.formattedDate }}</span>
+ <a href="/articles/{{ article.slug }}">{{ article.title }}</a>
+ {% if article.summary is not empty %}
+ <span class="search-result-summary">-- {{ article.summary }}</span>
{% endif %}
</li>
{% endfor %}
diff --git a/clams-server/src/main/resources/templates/home.html b/clams-server/src/main/resources/templates/home.html
index df82680..4a99658 100644
--- a/clams-server/src/main/resources/templates/home.html
+++ b/clams-server/src/main/resources/templates/home.html
@@ -7,15 +7,15 @@
<div class="content-grid">
<div class="left-column">
<img src="/images/elias_haugsbakk.jpeg" alt="Image of Elias Haugsbakk" class="profile-img">
- <p>Hello! I am Elias. This is my personal website for projects, writing, and code.</p>
- <p class="study-line">I'm currently studying Computer Science at NTNU, Trondheim.</p>
+ <p>Hello! I am Elias. This is my personal website for projects, writings, and code.</p>
+ <p>I'm currently studying Computer Science at NTNU, Trondheim.</p>
</div>
<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="/blog">Blog</a> <span class="description">-- notes and thoughts</span></li>
- <li><a href="https://github.com/eliashaugsbakk">GitHub</a> <span class="description"></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>
</ul>
</div>
</div>
diff --git a/clams-server/src/main/resources/templates/post.html b/clams-server/src/main/resources/templates/post.html
deleted file mode 100644
index 7899099..0000000
--- a/clams-server/src/main/resources/templates/post.html
+++ /dev/null
@@ -1,21 +0,0 @@
-{% extends "templates/layout.html" %}
-
-{% block content %}
-<main class="main-container">
- <a href="/blog" 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>
-
- <h1>{{ title }}</h1>
-
- <article class="post-content">
- {{ content | raw }}
- </article>
-
- <nav class="post-nav">
- {{ back_to_index | raw }}
- </nav>
-</main>
-{% endblock %}