blob: 2911be47a1830c6cf2012d65e8cfd64e7f23bb91 [file] [log] [blame]
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +02001{@java.util.List<eu.mulk.mulkcms2.benki.posts.Day> postDays}
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">
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +020055 {#for day in postDays}
56 <div class="post-day">
57 {#for post in day.posts}
58 {#with post}
59 {#if post.isBookmark}
60 <article class="bookmark">
61 <header>
62 <div class="bookmark-info">
63 <a class="post-link" href="/posts/{post.id}">
64 <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time>
65 <span class="bookmark-owner">{owner.firstName} {owner.lastName}</span>
66 </a>
67 </div>
Matthias Andreas Benkardbbac0c72020-04-19 19:38:49 +020068
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +020069 <div class="bookmark-controls">
70 {#if showBookmarkForm}
71 <button class="pure-button bookmark-edit-button">Edit</button>
72 {/if}
73 </div>
74 </header>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010075
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +020076 <section class="bookmark-editor post-editor">
77 {#if showBookmarkForm}
78 <elix-expandable-panel class="bookmark-editor-pane editor-pane">
79 <mlk-bookmark-submission-form edited-id="{post.id}"></mlk-bookmark-submission-form>
80 </elix-expandable-panel>
81 {/if}
82 </section>
Matthias Andreas Benkardbbac0c72020-04-19 19:38:49 +020083
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +020084 <section class="bookmark-title-section">
85 <a href="{uri}" class="bookmark-title"><h1 class="bookmark-title">⇢&nbsp;{title}</h1></a>
86 </section>
Matthias Andreas Benkardbbac0c72020-04-19 19:38:49 +020087
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +020088 <section class="bookmark-description">
89 {descriptionHtml.raw}
90 </section>
91 </article>
92 {#else}
93 <article class="lazychat-message">
94 <header>
95 <div class="lazychat-message-info">
96 <a class="post-link" href="/posts/{post.id}">
97 <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time>
98 <span class="lazychat-message-owner">{owner.firstName} {owner.lastName}</span>
99 </a>
100 </div>
Matthias Andreas Benkard966a94e2020-04-13 17:13:58 +0200101
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +0200102 <div class="lazychat-message-controls">
103 {#if showLazychatForm}
104 <button class="pure-button lazychat-edit-button">Edit</button>
105 {/if}
106 </div>
107 </header>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +0100108
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +0200109 <section class="lazychat-editor post-editor">
110 {#if showLazychatForm}
111 <elix-expandable-panel class="lazychat-editor-pane editor-pane">
112 <mlk-lazychat-submission-form edited-id="{post.id}"></mlk-lazychat-submission-form>
113 </elix-expandable-panel>
114 {/if}
115 </section>
Matthias Andreas Benkarddb23ab62020-04-13 20:01:13 +0200116
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +0200117 <section class="lazychat-message-content">
118 {contentHtml.raw}
119 </section>
120 </article>
121 {/if}
122 {/with}
123 {/for}
124 </div>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +0100125 {/for}
126</section>
127
128<div class="paging">
129 {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if}
130 <span class="filler"></span>
131 {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if}
132</div>
133
134{/body}
135
136{/include}