summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-04-18 14:00:39 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-04-18 14:02:53 +0200
commit5794b9062d1dd94415757c2236bdfc766921f97f (patch)
tree77315f1c90117c7d12a9e785bf679938c54ae217 /src
parentbaf0f964721a3a1b5a78a9e5b13b1a6f76b17915 (diff)
KB46 Add All Posts resource.
Change-Id: Ifc8ae0693d7e17addf4a84ed4eedcb43d5ea2f57
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/mulk/mulkcms2/benki/posts/AllPostsResource.java11
-rw-r--r--src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java2
-rw-r--r--src/main/resources/META-INF/resources/cms2/base.css4
-rw-r--r--src/main/resources/templates/tags/navbar.html5
4 files changed, 19 insertions, 3 deletions
diff --git a/src/main/java/eu/mulk/mulkcms2/benki/posts/AllPostsResource.java b/src/main/java/eu/mulk/mulkcms2/benki/posts/AllPostsResource.java
new file mode 100644
index 0000000..47c644c
--- /dev/null
+++ b/src/main/java/eu/mulk/mulkcms2/benki/posts/AllPostsResource.java
@@ -0,0 +1,11 @@
+package eu.mulk.mulkcms2.benki.posts;
+
+import javax.ws.rs.Path;
+
+@Path("/posts")
+public class AllPostsResource extends PostResource {
+
+ public AllPostsResource() {
+ super(PostFilter.ALL, "All Posts");
+ }
+}
diff --git a/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java b/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java
index a691490..e7b6e9a 100644
--- a/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java
+++ b/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java
@@ -260,7 +260,7 @@ public abstract class PostResource {
}
}
- protected Session getSession() {
+ protected final Session getSession() {
return entityManager.unwrap(Session.class);
}
diff --git a/src/main/resources/META-INF/resources/cms2/base.css b/src/main/resources/META-INF/resources/cms2/base.css
index b165f1c..d1b16f9 100644
--- a/src/main/resources/META-INF/resources/cms2/base.css
+++ b/src/main/resources/META-INF/resources/cms2/base.css
@@ -96,6 +96,10 @@ body > nav > ol > li {
flex: auto;
}
+body > nav > ol > li.indented {
+ text-indent: 1em;
+}
+
body > nav > ol > li.this-page {
background-color: var(--main-bg-color);
border: 1px solid lightgray;
diff --git a/src/main/resources/templates/tags/navbar.html b/src/main/resources/templates/tags/navbar.html
index b78a658..a6ba163 100644
--- a/src/main/resources/templates/tags/navbar.html
+++ b/src/main/resources/templates/tags/navbar.html
@@ -1,8 +1,9 @@
{@java.lang.String siteSection}
<ol>
- <li class='{#if siteSection == "Bookmarks"}this-page{/}' data-site-section="Bookmarks"><a href="/bookmarks">Bookmarks</a></li>
- <li class='{#if siteSection == "Lazy Chat"}this-page{/}' data-site-section="Lazy Chat"><a href="/lazychat">Lazy Chat</a></li>
+ <li class='{#if siteSection == "All Posts"}this-page{/}' data-site-section="All Posts"><a href="/posts">All Posts</a></li>
+ <li class='{#if siteSection == "Bookmarks"}this-page{/} indented' data-site-section="Bookmarks"><a href="/bookmarks">Bookmarks</a></li>
+ <li class='{#if siteSection == "Lazy Chat"}this-page{/} indented' data-site-section="Lazy Chat"><a href="/lazychat">Lazy Chat</a></li>
<li class='{#if siteSection == "Wiki"}this-page{/}' data-site-section="Wiki"><a href="/wiki/Home">Wiki</a></li>
<li class='{#if siteSection == "About"}this-page{/}' data-site-section="About"><a href="/about">Contact Info</a></li>
</ol>