blob: a29d88676903a7f951a20d791870df8662c087a0 [file] [log] [blame]
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +01001{@java.util.List<eu.mulk.mulkcms2.benki.bookmarks.Bookmark> posts}
2{@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>
72 <div class="lazychat-message-info">
73 <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time>
74 <span class="lazychat-message-owner">{owner.firstName} {owner.lastName}</span>
75 </div>
76 </header>
77
78 <section class="lazychat-message-content">
79 {contentHtml.raw}
80 </section>
81 </article>
82 {/if}
83 {/with}
84 {/for}
85</section>
86
87<div class="paging">
88 {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if}
89 <span class="filler"></span>
90 {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if}
91</div>
92
93{/body}
94
95{/include}