blob: bc479f434703dafcadbc23590dacdbc19d74e213 [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
Matthias Andreas Benkard188327d2020-04-17 21:22:57 +020015{#nav}{#navbar siteSection=pageTitle /}
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010016
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>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010060 <div class="bookmark-info">
Matthias Andreas Benkard695427b2020-04-18 15:55:44 +020061 <a class="post-link" href="/posts/{post.id}">
62 <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time>
63 <span class="bookmark-owner">{owner.firstName} {owner.lastName}</span>
64 </a>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010065 </div>
Matthias Andreas Benkardbbac0c72020-04-19 19:38:49 +020066
67 <div class="bookmark-controls">
68 {#if showBookmarkForm}
69 <button class="pure-button bookmark-edit-button">Edit</button>
70 {/if}
71 </div>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010072 </header>
73
Matthias Andreas Benkardbbac0c72020-04-19 19:38:49 +020074 <section class="bookmark-editor post-editor">
75 {#if showBookmarkForm}
76 <elix-expandable-panel class="bookmark-editor-pane editor-pane">
77 <mlk-bookmark-submission-form edited-id="{post.id}"></mlk-bookmark-submission-form>
78 </elix-expandable-panel>
79 {/if}
80 </section>
81
82 <section class="bookmark-title-section">
83 <a href="{uri}" class="bookmark-title"><h1 class="bookmark-title">⇢&nbsp;{title}</h1></a>
84 </section>
85
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010086 <section class="bookmark-description">
87 {descriptionHtml.raw}
88 </section>
89 </article>
90 {#else}
91 <article class="lazychat-message">
92 <header>
Matthias Andreas Benkarddb23ab62020-04-13 20:01:13 +020093 <div class="lazychat-message-info">
Matthias Andreas Benkard695427b2020-04-18 15:55:44 +020094 <a class="post-link" href="/posts/{post.id}">
95 <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time>
96 <span class="lazychat-message-owner">{owner.firstName} {owner.lastName}</span>
97 </a>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010098 </div>
Matthias Andreas Benkard966a94e2020-04-13 17:13:58 +020099
Matthias Andreas Benkarddb23ab62020-04-13 20:01:13 +0200100 <div class="lazychat-message-controls">
101 {#if showLazychatForm}
102 <button class="pure-button lazychat-edit-button">Edit</button>
103 {/if}
104 </div>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +0100105 </header>
106
Matthias Andreas Benkardbbac0c72020-04-19 19:38:49 +0200107 <section class="lazychat-editor post-editor">
Matthias Andreas Benkarddb23ab62020-04-13 20:01:13 +0200108 {#if showLazychatForm}
109 <elix-expandable-panel class="lazychat-editor-pane editor-pane">
110 <mlk-lazychat-submission-form edited-id="{post.id}"></mlk-lazychat-submission-form>
111 </elix-expandable-panel>
112 {/if}
113 </section>
114
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +0100115 <section class="lazychat-message-content">
116 {contentHtml.raw}
117 </section>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +0100118 </article>
119 {/if}
120 {/with}
121 {/for}
122</section>
123
124<div class="paging">
125 {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if}
126 <span class="filler"></span>
127 {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if}
128</div>
129
130{/body}
131
132{/include}