Matthias Andreas Benkard | 5326f5e | 2023-08-06 21:34:08 +0200 | [diff] [blame] | 1 | {@java.util.List<eu.mulk.mulkcms2.benki.posts.Post$Day<eu.mulk.mulkcms2.benki.posts.Post<?>>> postDays} |
Matthias Andreas Benkard | f435e66 | 2022-06-05 16:27:10 +0200 | [diff] [blame] | 2 | {@java.lang.String feedUri} |
| 3 | {@java.lang.String pageTitle} |
| 4 | {@boolean showBookmarkForm} |
| 5 | {@boolean showLazychatForm} |
| 6 | {@boolean showCommentBox} |
| 7 | {@boolean hasPreviousPage} |
| 8 | {@boolean hasNextPage} |
| 9 | {@java.lang.Integer previousCursor} |
| 10 | {@java.lang.Integer nextCursor} |
| 11 | {@java.lang.Integer pageSize} |
| 12 | {@java.lang.String searchQuery} |
| 13 | |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 14 | {#include base.html} |
| 15 | |
| 16 | {#title}Benki {pageTitle}{/title} |
| 17 | {#siteSection}{pageTitle}{/siteSection} |
| 18 | |
Matthias Andreas Benkard | 188327d | 2020-04-17 21:22:57 +0200 | [diff] [blame] | 19 | {#nav}{#navbar siteSection=pageTitle /} |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 20 | |
| 21 | {#head} |
| 22 | <link href="{feedUri}" rel="alternate" type="application/atom+xml" /> |
| 23 | |
Matthias Andreas Benkard | ad76d62 | 2020-04-27 08:08:17 +0200 | [diff] [blame] | 24 | {#if showBookmarkForm || showLazychatForm} |
Matthias Andreas Benkard | 813e597 | 2020-06-14 19:27:42 +0200 | [diff] [blame] | 25 | <script type="module" src="/lib.js"></script> |
Matthias Andreas Benkard | ad76d62 | 2020-04-27 08:08:17 +0200 | [diff] [blame] | 26 | {/if} |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 27 | {/head} |
| 28 | |
| 29 | {#body} |
| 30 | |
| 31 | {#if showBookmarkForm} |
| 32 | <elix-expandable-section id="bookmark-submission-pane"> |
| 33 | <h2 slot="header" class="small-title expandable-section-title"><button class="pure-button">Create New Bookmark</button></h2> |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 34 | <div id="bookmark-submission"> |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 35 | <mlk-bookmark-submission-form id="bookmark-submission-form"></mlk-bookmark-submission-form> |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 36 | </div> |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 37 | </elix-expandable-section> |
| 38 | {/if} |
| 39 | |
Matthias Andreas Benkard | 12c7cac | 2020-03-26 07:19:45 +0100 | [diff] [blame] | 40 | {#if showLazychatForm} |
| 41 | <elix-expandable-section id="lazychat-submission-pane"> |
| 42 | <h2 slot="header" class="small-title expandable-section-title"><button class="pure-button">Post Message</button></h2> |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 43 | <div id="lazychat-submission"> |
Matthias Andreas Benkard | 12c7cac | 2020-03-26 07:19:45 +0100 | [diff] [blame] | 44 | <mlk-lazychat-submission-form id="lazychat-submission-form"></mlk-lazychat-submission-form> |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 45 | </div> |
Matthias Andreas Benkard | 12c7cac | 2020-03-26 07:19:45 +0100 | [diff] [blame] | 46 | </elix-expandable-section> |
| 47 | {/if} |
| 48 | |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 49 | <div class="paging"> |
Matthias Andreas Benkard | 8563a3c | 2020-09-16 17:57:24 +0200 | [diff] [blame] | 50 | <form id="post-search-bar" method="get" class="pure-form"> |
| 51 | <input placeholder="Search..." value="{searchQuery}" aria-label="Search" id="post-search-query" name="search-query" type="search"/> |
| 52 | <input type="submit" aria-label="Submit search query" class="pure-button pure-button-primary" value="🔎"/> |
| 53 | </form> |
| 54 | {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}&search-query={searchQuery}" class="pure-button">⇠ previous page</a>{/if} |
| 55 | {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}&search-query={searchQuery}" class="pure-button">next page ⇢</a>{/if} |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 56 | </div> |
| 57 | |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 58 | <div id="main-content"> |
Matthias Andreas Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 59 | {#for day in postDays} |
| 60 | <div class="post-day"> |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 61 | <div class="post-day-info"> |
| 62 | <time datetime="{day.date.htmlDate}">{day.date.humanDate}</time> |
| 63 | </div> |
| 64 | |
Matthias Andreas Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 65 | {#for post in day.posts} |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 66 | {#if post.isBookmark} |
| 67 | <article class="bookmark {#if post.descriptionHtml != ""}post-with-nonempty-body{/if}"> |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 68 | <div class="bookmark-editor post-editor"> |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 69 | {#if showBookmarkForm} |
| 70 | <elix-expandable-panel class="bookmark-editor-pane editor-pane"> |
| 71 | <mlk-bookmark-submission-form edited-id="{post.id}"></mlk-bookmark-submission-form> |
| 72 | </elix-expandable-panel> |
| 73 | {/if} |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 74 | </div> |
Matthias Andreas Benkard | bbac0c7 | 2020-04-19 19:38:49 +0200 | [diff] [blame] | 75 | |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 76 | <header> |
| 77 | <div class="bookmark-info"> |
| 78 | <span class="bookmark-owner post-owner">{post.owner.firstName}</span> |
| 79 | <a class="post-link" href="/posts/{post.id}"> |
| 80 | <span class="post-self-link">#</span> |
| 81 | </a> |
Matthias Andreas Benkard | 8dcc6ae | 2022-06-04 16:02:25 +0200 | [diff] [blame] | 82 | {#if post.comments.size() > 0} |
| 83 | <a class="comment-box-link" href="/posts/{post.id}#comment-box-{post.id}"> |
| 84 | <span class="comment-box-self-link">({post.comments.size()})</span> |
| 85 | </a> |
| 86 | {/if} |
Matthias Andreas Benkard | bbac0c7 | 2020-04-19 19:38:49 +0200 | [diff] [blame] | 87 | |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 88 | <a href="{post.uri}" class="bookmark-title"> |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 89 | <h2 class="bookmark-title"><span class="bookmark-symbol">🔖 </span> {post.title}</h2>. |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 90 | </a> |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 91 | </div> |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 92 | </header> |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 93 | |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 94 | <div class="bookmark-controls"> |
| 95 | {#if showBookmarkForm} |
| 96 | <button class="pure-button bookmark-edit-button">Edit</button> |
| 97 | {/if} |
| 98 | </div> |
Matthias Andreas Benkard | 533e6d4 | 2020-12-16 13:26:38 +0100 | [diff] [blame] | 99 | |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 100 | <div class="bookmark-description post-content"> |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 101 | {post.descriptionHtml.raw} |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 102 | </div> |
Matthias Andreas Benkard | db23ab6 | 2020-04-13 20:01:13 +0200 | [diff] [blame] | 103 | |
Matthias Andreas Benkard | 14e5944 | 2022-05-24 22:19:29 +0200 | [diff] [blame] | 104 | {#if showCommentBox} |
Matthias Andreas Benkard | 0351a8f | 2022-05-26 08:05:00 +0200 | [diff] [blame] | 105 | {#commentBox postId=post.id comments=post.comments /} |
Matthias Andreas Benkard | 14e5944 | 2022-05-24 22:19:29 +0200 | [diff] [blame] | 106 | {/if} |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 107 | </article> |
| 108 | {#else} |
| 109 | <article class="lazychat-message"> |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 110 | <div class="lazychat-editor post-editor"> |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 111 | {#if showLazychatForm} |
| 112 | <elix-expandable-panel class="lazychat-editor-pane editor-pane"> |
| 113 | <mlk-lazychat-submission-form edited-id="{post.id}"></mlk-lazychat-submission-form> |
| 114 | </elix-expandable-panel> |
| 115 | {/if} |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 116 | </div> |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 117 | |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 118 | <header> |
| 119 | <div class="lazychat-message-info"> |
| 120 | <span class="lazychat-message-owner post-owner">{post.owner.firstName}</span> |
| 121 | <a class="post-link" href="/posts/{post.id}"> |
| 122 | <span class="post-self-link">#</span> |
| 123 | </a> |
Matthias Andreas Benkard | 8dcc6ae | 2022-06-04 16:02:25 +0200 | [diff] [blame] | 124 | {#if post.comments.size() > 0} |
| 125 | <a class="comment-box-link" href="/posts/{post.id}#comment-box-{post.id}"> |
| 126 | <span class="comment-box-self-link">({post.comments.size()})</span> |
| 127 | </a> |
| 128 | {/if} |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 129 | </div> |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 130 | </header> |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 131 | |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 132 | <div class="lazychat-message-controls"> |
| 133 | {#if showLazychatForm} |
| 134 | <button class="pure-button lazychat-edit-button">Edit</button> |
| 135 | {/if} |
| 136 | </div> |
| 137 | |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 138 | <div class="lazychat-message-content post-content"> |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 139 | {post.descriptionHtml.raw} |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 140 | </div> |
Matthias Andreas Benkard | 14e5944 | 2022-05-24 22:19:29 +0200 | [diff] [blame] | 141 | |
| 142 | {#if showCommentBox} |
Matthias Andreas Benkard | 0351a8f | 2022-05-26 08:05:00 +0200 | [diff] [blame] | 143 | {#commentBox postId=post.id comments=post.comments /} |
Matthias Andreas Benkard | 14e5944 | 2022-05-24 22:19:29 +0200 | [diff] [blame] | 144 | {/if} |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 145 | </article> |
| 146 | {/if} |
Matthias Andreas Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 147 | {/for} |
| 148 | </div> |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 149 | {/for} |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 150 | </div> |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 151 | |
| 152 | <div class="paging"> |
Matthias Andreas Benkard | 8563a3c | 2020-09-16 17:57:24 +0200 | [diff] [blame] | 153 | {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}&search-query={searchQuery}" class="pure-button">⇠ previous page</a>{/if} |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 154 | <span class="filler"></span> |
Matthias Andreas Benkard | 8563a3c | 2020-09-16 17:57:24 +0200 | [diff] [blame] | 155 | {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}&search-query={searchQuery}" class="pure-button">next page ⇢</a>{/if} |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 156 | </div> |
| 157 | |
| 158 | {/body} |
| 159 | |
| 160 | {/include} |