blob: f178927f76216e148fb30dd3f1a9c62975878308 [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">
Matthias Andreas Benkard369e6982020-04-26 13:14:21 +020057 <div class="post-day-info">
58 <time datetime="{day.date.htmlDate}">{day.date.humanDate}</time>
59 </div>
60
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +020061 {#for post in day.posts}
62 {#with post}
63 {#if post.isBookmark}
Matthias Andreas Benkard369e6982020-04-26 13:14:21 +020064 <article class="bookmark {#if descriptionHtml != ""}post-with-nonempty-body{/if}">
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +020065 <section class="bookmark-editor post-editor">
66 {#if showBookmarkForm}
67 <elix-expandable-panel class="bookmark-editor-pane editor-pane">
68 <mlk-bookmark-submission-form edited-id="{post.id}"></mlk-bookmark-submission-form>
69 </elix-expandable-panel>
70 {/if}
71 </section>
Matthias Andreas Benkardbbac0c72020-04-19 19:38:49 +020072
Matthias Andreas Benkard369e6982020-04-26 13:14:21 +020073 <header>
74 <div class="bookmark-info">
75 <span class="bookmark-owner post-owner">{owner.firstName}</span>
76 <a class="post-link" href="/posts/{post.id}">
77 <span class="post-self-link">#</span>
78 </a>
Matthias Andreas Benkardbbac0c72020-04-19 19:38:49 +020079
Matthias Andreas Benkard369e6982020-04-26 13:14:21 +020080 <a href="{uri}" class="bookmark-title">
81 <h1 class="bookmark-title">⇢&nbsp;{title}</h1>.
82 </a>
83 </div>
84 </header>
85
86 <div class="bookmark-controls">
87 {#if showBookmarkForm}
88 <button class="pure-button bookmark-edit-button">Edit</button>
89 {/if}
90 </div>
91
92 <section class="bookmark-description post-content">
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +020093 {descriptionHtml.raw}
94 </section>
95 </article>
96 {#else}
97 <article class="lazychat-message">
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +020098 <section class="lazychat-editor post-editor">
99 {#if showLazychatForm}
Matthias Andreas Benkard369e6982020-04-26 13:14:21 +0200100 <elix-expandable-panel class="lazychat-editor-pane editor-pane">
101 <mlk-lazychat-submission-form edited-id="{post.id}"></mlk-lazychat-submission-form>
102 </elix-expandable-panel>
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +0200103 {/if}
104 </section>
Matthias Andreas Benkarddb23ab62020-04-13 20:01:13 +0200105
Matthias Andreas Benkard369e6982020-04-26 13:14:21 +0200106 <header>
107 <div class="lazychat-message-info">
108 <span class="lazychat-message-owner post-owner">{owner.firstName}</span>
109 <a class="post-link" href="/posts/{post.id}">
110 <span class="post-self-link">#</span>
111 </a>
112 </div>
113 </header>
114
115 <div class="lazychat-message-controls">
116 {#if showLazychatForm}
117 <button class="pure-button lazychat-edit-button">Edit</button>
118 {/if}
119 </div>
120
121 <section class="lazychat-message-content post-content">
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +0200122 {contentHtml.raw}
123 </section>
124 </article>
125 {/if}
126 {/with}
127 {/for}
128 </div>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +0100129 {/for}
130</section>
131
132<div class="paging">
133 {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if}
134 <span class="filler"></span>
135 {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if}
136</div>
137
138{/body}
139
140{/include}