blob: 3cd4e498a9f573fccaaa4f002d7c3cd48977777d [file] [log] [blame]
Matthias Andreas Benkard06e6c812020-04-13 17:01:35 +02001{@java.util.List<eu.mulk.mulkcms2.benki.posts.Post> posts}
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +01002{@java.lang.String pageTitle}
3{@java.lang.Boolean showBookmarkForm}
4{@java.lang.Boolean hasPreviousPage}
5{@java.lang.Boolean hasNextPage}
6{@java.lang.Integer previousCursor}
7{@java.lang.Integer nextCursor}
8{@java.lang.Integer pageSize}
9
10{#include base.html}
11
12{#title}Benki {pageTitle}{/title}
13{#siteSection}{pageTitle}{/siteSection}
14
15{#nav}{#navbar siteSection=pageTitle /}{/nav}
16
17{#head}
18 <link href="{feedUri}" rel="alternate" type="application/atom+xml" />
19
Matthias Andreas Benkarddb23ab62020-04-13 20:01:13 +020020 <script type="module" src="/web_modules/elix/define/Button.js"></script>
21 <script type="module" src="/web_modules/elix/define/ExpandablePanel.js"></script>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010022 <script type="module" src="/web_modules/elix/define/ExpandableSection.js"></script>
23 <script type="module" src="/bookmarks/MlkBookmarkSubmissionForm.js"></script>
Matthias Andreas Benkard12c7cac2020-03-26 07:19:45 +010024 <script type="module" src="/lazychat/MlkLazychatSubmissionForm.js"></script>
25 <script type="module" src="/posts/postList.js" defer></script>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010026{/head}
27
28{#body}
29
30{#if showBookmarkForm}
31 <elix-expandable-section id="bookmark-submission-pane">
32 <h2 slot="header" class="small-title expandable-section-title"><button class="pure-button">Create New Bookmark</button></h2>
33 <section id="bookmark-submission">
34 <mlk-bookmark-submission-form id="bookmark-submission-form"></mlk-bookmark-submission-form>
35 </section>
36 </elix-expandable-section>
37{/if}
38
Matthias Andreas Benkard12c7cac2020-03-26 07:19:45 +010039{#if showLazychatForm}
40 <elix-expandable-section id="lazychat-submission-pane">
41 <h2 slot="header" class="small-title expandable-section-title"><button class="pure-button">Post Message</button></h2>
42 <section id="lazychat-submission">
43 <mlk-lazychat-submission-form id="lazychat-submission-form"></mlk-lazychat-submission-form>
44 </section>
45 </elix-expandable-section>
46{/if}
47
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010048<div class="paging">
49 {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if}
50 <span class="filler"></span>
51 {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if}
52</div>
53
54<section id="main-content">
55 {#for post in posts}
56 {#with post}
57 {#if post.isBookmark}
58 <article class="bookmark">
59 <header>
60 <a href="{uri}"><h1 class="bookmark-title">{title}</h1></a>
61 <div class="bookmark-info">
62 <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time>
63 <span class="bookmark-owner">{owner.firstName} {owner.lastName}</span>
64 </div>
65 </header>
66
67 <section class="bookmark-description">
68 {descriptionHtml.raw}
69 </section>
70 </article>
71 {#else}
72 <article class="lazychat-message">
73 <header>
Matthias Andreas Benkarddb23ab62020-04-13 20:01:13 +020074 <div class="lazychat-message-info">
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010075 <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time>
76 <span class="lazychat-message-owner">{owner.firstName} {owner.lastName}</span>
77 </div>
Matthias Andreas Benkard966a94e2020-04-13 17:13:58 +020078
Matthias Andreas Benkarddb23ab62020-04-13 20:01:13 +020079 <div class="lazychat-message-controls">
80 {#if showLazychatForm}
81 <button class="pure-button lazychat-edit-button">Edit</button>
82 {/if}
83 </div>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010084 </header>
85
Matthias Andreas Benkarddb23ab62020-04-13 20:01:13 +020086 <section class="lazychat-editor">
87 {#if showLazychatForm}
88 <elix-expandable-panel class="lazychat-editor-pane editor-pane">
89 <mlk-lazychat-submission-form edited-id="{post.id}"></mlk-lazychat-submission-form>
90 </elix-expandable-panel>
91 {/if}
92 </section>
93
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010094 <section class="lazychat-message-content">
95 {contentHtml.raw}
96 </section>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010097 </article>
98 {/if}
99 {/with}
100 {/for}
101</section>
102
103<div class="paging">
104 {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if}
105 <span class="filler"></span>
106 {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if}
107</div>
108
109{/body}
110
111{/include}