blob: 8dd5210217170e9fd018fecca83ca29f1d3f6ba1 [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
20 <script type="module" src="/web_modules/elix/define/ExpandableSection.js"></script>
21 <script type="module" src="/bookmarks/MlkBookmarkSubmissionForm.js"></script>
Matthias Andreas Benkard12c7cac2020-03-26 07:19:45 +010022 <script type="module" src="/lazychat/MlkLazychatSubmissionForm.js"></script>
23 <script type="module" src="/posts/postList.js" defer></script>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010024{/head}
25
26{#body}
27
28{#if showBookmarkForm}
29 <elix-expandable-section id="bookmark-submission-pane">
30 <h2 slot="header" class="small-title expandable-section-title"><button class="pure-button">Create New Bookmark</button></h2>
31 <section id="bookmark-submission">
32 <mlk-bookmark-submission-form id="bookmark-submission-form"></mlk-bookmark-submission-form>
33 </section>
34 </elix-expandable-section>
35{/if}
36
Matthias Andreas Benkard12c7cac2020-03-26 07:19:45 +010037{#if showLazychatForm}
38 <elix-expandable-section id="lazychat-submission-pane">
39 <h2 slot="header" class="small-title expandable-section-title"><button class="pure-button">Post Message</button></h2>
40 <section id="lazychat-submission">
41 <mlk-lazychat-submission-form id="lazychat-submission-form"></mlk-lazychat-submission-form>
42 </section>
43 </elix-expandable-section>
44{/if}
45
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010046<div class="paging">
47 {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if}
48 <span class="filler"></span>
49 {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if}
50</div>
51
52<section id="main-content">
53 {#for post in posts}
54 {#with post}
55 {#if post.isBookmark}
56 <article class="bookmark">
57 <header>
58 <a href="{uri}"><h1 class="bookmark-title">{title}</h1></a>
59 <div class="bookmark-info">
60 <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time>
61 <span class="bookmark-owner">{owner.firstName} {owner.lastName}</span>
62 </div>
63 </header>
64
65 <section class="bookmark-description">
66 {descriptionHtml.raw}
67 </section>
68 </article>
69 {#else}
70 <article class="lazychat-message">
71 <header>
Matthias Andreas Benkard06e6c812020-04-13 17:01:35 +020072 <div class="lazychat-message-info" style="display: inline-block">
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010073 <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time>
74 <span class="lazychat-message-owner">{owner.firstName} {owner.lastName}</span>
75 </div>
Matthias Andreas Benkard06e6c812020-04-13 17:01:35 +020076
77 {#if showLazychatForm}
78 <elix-expandable-section class="lazychat-editor-pane editor-pane">
79 <mlk-lazychat-submission-form edited-id="{post.id}"></mlk-lazychat-submission-form>
80 </elix-expandable-section>
81 {/if}
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010082 </header>
83
84 <section class="lazychat-message-content">
85 {contentHtml.raw}
86 </section>
Matthias Andreas Benkard06e6c812020-04-13 17:01:35 +020087
88 <section class="lazychat-editor">
89 </section>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010090 </article>
91 {/if}
92 {/with}
93 {/for}
94</section>
95
96<div class="paging">
97 {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if}
98 <span class="filler"></span>
99 {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if}
100</div>
101
102{/body}
103
104{/include}