summaryrefslogtreecommitdiff
path: root/src/main/resources/templates/benki/posts
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-03-23 06:21:25 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-03-23 06:21:25 +0100
commit371164a188b93b24f33cb5badb0362ac2544d33d (patch)
tree2b19582c04a50ecddc2357e2a895613f9d041519 /src/main/resources/templates/benki/posts
parent573f806676a7ebc2a62aa39d742127fbf74fbb3c (diff)
Use generic page template for bookmark and lazy chat lists.
Change-Id: I86cc78c8164d6672d8b5cfbc2a3433954068967e
Diffstat (limited to 'src/main/resources/templates/benki/posts')
-rw-r--r--src/main/resources/templates/benki/posts/postList.html85
1 files changed, 85 insertions, 0 deletions
diff --git a/src/main/resources/templates/benki/posts/postList.html b/src/main/resources/templates/benki/posts/postList.html
new file mode 100644
index 0000000..b68f796
--- /dev/null
+++ b/src/main/resources/templates/benki/posts/postList.html
@@ -0,0 +1,85 @@
+{@java.util.List<eu.mulk.mulkcms2.benki.bookmarks.Bookmark> posts}
+{@java.lang.String pageTitle}
+{@java.lang.Boolean showBookmarkForm}
+{@java.lang.Boolean hasPreviousPage}
+{@java.lang.Boolean hasNextPage}
+{@java.lang.Integer previousCursor}
+{@java.lang.Integer nextCursor}
+{@java.lang.Integer pageSize}
+
+{#include base.html}
+
+{#title}Benki {pageTitle}{/title}
+{#siteSection}{pageTitle}{/siteSection}
+
+{#nav}{#navbar siteSection=pageTitle /}{/nav}
+
+{#head}
+ <link href="{feedUri}" rel="alternate" type="application/atom+xml" />
+
+ <script type="module" src="/web_modules/elix/define/ExpandableSection.js"></script>
+ <script type="module" src="/bookmarks/MlkBookmarkSubmissionForm.js"></script>
+ <script type="module" src="/bookmarks/bookmarkList.js" defer></script>
+{/head}
+
+{#body}
+
+{#if showBookmarkForm}
+ <elix-expandable-section id="bookmark-submission-pane">
+ <h2 slot="header" class="small-title expandable-section-title"><button class="pure-button">Create New Bookmark</button></h2>
+ <section id="bookmark-submission">
+ <mlk-bookmark-submission-form id="bookmark-submission-form"></mlk-bookmark-submission-form>
+ </section>
+ </elix-expandable-section>
+{/if}
+
+<div class="paging">
+ {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if}
+ <span class="filler"></span>
+ {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if}
+</div>
+
+<section id="main-content">
+ {#for post in posts}
+ {#with post}
+ {#if post.isBookmark}
+ <article class="bookmark">
+ <header>
+ <a href="{uri}"><h1 class="bookmark-title">{title}</h1></a>
+ <div class="bookmark-info">
+ <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time>
+ <span class="bookmark-owner">{owner.firstName} {owner.lastName}</span>
+ </div>
+ </header>
+
+ <section class="bookmark-description">
+ {descriptionHtml.raw}
+ </section>
+ </article>
+ {#else}
+ <article class="lazychat-message">
+ <header>
+ <div class="lazychat-message-info">
+ <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time>
+ <span class="lazychat-message-owner">{owner.firstName} {owner.lastName}</span>
+ </div>
+ </header>
+
+ <section class="lazychat-message-content">
+ {contentHtml.raw}
+ </section>
+ </article>
+ {/if}
+ {/with}
+ {/for}
+</section>
+
+<div class="paging">
+ {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if}
+ <span class="filler"></span>
+ {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if}
+</div>
+
+{/body}
+
+{/include}