Matthias Andreas Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 1 | {@java.util.List<eu.mulk.mulkcms2.benki.posts.Day> postDays} |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 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 | |
Matthias Andreas Benkard | 188327d | 2020-04-17 21:22:57 +0200 | [diff] [blame] | 15 | {#nav}{#navbar siteSection=pageTitle /} |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 16 | |
| 17 | {#head} |
| 18 | <link href="{feedUri}" rel="alternate" type="application/atom+xml" /> |
| 19 | |
Matthias Andreas Benkard | ad76d62 | 2020-04-27 08:08:17 +0200 | [diff] [blame] | 20 | {#if showBookmarkForm || showLazychatForm} |
Matthias Andreas Benkard | db23ab6 | 2020-04-13 20:01:13 +0200 | [diff] [blame] | 21 | <script type="module" src="/web_modules/elix/define/Button.js"></script> |
| 22 | <script type="module" src="/web_modules/elix/define/ExpandablePanel.js"></script> |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 23 | <script type="module" src="/web_modules/elix/define/ExpandableSection.js"></script> |
| 24 | <script type="module" src="/bookmarks/MlkBookmarkSubmissionForm.js"></script> |
Matthias Andreas Benkard | 12c7cac | 2020-03-26 07:19:45 +0100 | [diff] [blame] | 25 | <script type="module" src="/lazychat/MlkLazychatSubmissionForm.js"></script> |
| 26 | <script type="module" src="/posts/postList.js" defer></script> |
Matthias Andreas Benkard | ad76d62 | 2020-04-27 08:08:17 +0200 | [diff] [blame] | 27 | {/if} |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 28 | {/head} |
| 29 | |
| 30 | {#body} |
| 31 | |
| 32 | {#if showBookmarkForm} |
| 33 | <elix-expandable-section id="bookmark-submission-pane"> |
| 34 | <h2 slot="header" class="small-title expandable-section-title"><button class="pure-button">Create New Bookmark</button></h2> |
| 35 | <section id="bookmark-submission"> |
| 36 | <mlk-bookmark-submission-form id="bookmark-submission-form"></mlk-bookmark-submission-form> |
| 37 | </section> |
| 38 | </elix-expandable-section> |
| 39 | {/if} |
| 40 | |
Matthias Andreas Benkard | 12c7cac | 2020-03-26 07:19:45 +0100 | [diff] [blame] | 41 | {#if showLazychatForm} |
| 42 | <elix-expandable-section id="lazychat-submission-pane"> |
| 43 | <h2 slot="header" class="small-title expandable-section-title"><button class="pure-button">Post Message</button></h2> |
| 44 | <section id="lazychat-submission"> |
| 45 | <mlk-lazychat-submission-form id="lazychat-submission-form"></mlk-lazychat-submission-form> |
| 46 | </section> |
| 47 | </elix-expandable-section> |
| 48 | {/if} |
| 49 | |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 50 | <div class="paging"> |
| 51 | {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if} |
| 52 | <span class="filler"></span> |
| 53 | {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if} |
| 54 | </div> |
| 55 | |
| 56 | <section id="main-content"> |
Matthias Andreas Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 57 | {#for day in postDays} |
| 58 | <div class="post-day"> |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 59 | <div class="post-day-info"> |
| 60 | <time datetime="{day.date.htmlDate}">{day.date.humanDate}</time> |
| 61 | </div> |
| 62 | |
Matthias Andreas Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 63 | {#for post in day.posts} |
| 64 | {#with post} |
| 65 | {#if post.isBookmark} |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 66 | <article class="bookmark {#if descriptionHtml != ""}post-with-nonempty-body{/if}"> |
Matthias Andreas Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 67 | <section class="bookmark-editor post-editor"> |
| 68 | {#if showBookmarkForm} |
| 69 | <elix-expandable-panel class="bookmark-editor-pane editor-pane"> |
| 70 | <mlk-bookmark-submission-form edited-id="{post.id}"></mlk-bookmark-submission-form> |
| 71 | </elix-expandable-panel> |
| 72 | {/if} |
| 73 | </section> |
Matthias Andreas Benkard | bbac0c7 | 2020-04-19 19:38:49 +0200 | [diff] [blame] | 74 | |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 75 | <header> |
| 76 | <div class="bookmark-info"> |
| 77 | <span class="bookmark-owner post-owner">{owner.firstName}</span> |
| 78 | <a class="post-link" href="/posts/{post.id}"> |
| 79 | <span class="post-self-link">#</span> |
| 80 | </a> |
Matthias Andreas Benkard | bbac0c7 | 2020-04-19 19:38:49 +0200 | [diff] [blame] | 81 | |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 82 | <a href="{uri}" class="bookmark-title"> |
Matthias Andreas Benkard | 8040689 | 2020-04-26 18:41:39 +0200 | [diff] [blame] | 83 | <h1 class="bookmark-title"><span class="bookmark-symbol">🔖 </span> {title}</h1>. |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 84 | </a> |
| 85 | </div> |
| 86 | </header> |
| 87 | |
| 88 | <div class="bookmark-controls"> |
| 89 | {#if showBookmarkForm} |
| 90 | <button class="pure-button bookmark-edit-button">Edit</button> |
| 91 | {/if} |
| 92 | </div> |
| 93 | |
| 94 | <section class="bookmark-description post-content"> |
Matthias Andreas Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 95 | {descriptionHtml.raw} |
| 96 | </section> |
| 97 | </article> |
| 98 | {#else} |
| 99 | <article class="lazychat-message"> |
Matthias Andreas Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 100 | <section class="lazychat-editor post-editor"> |
| 101 | {#if showLazychatForm} |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 102 | <elix-expandable-panel class="lazychat-editor-pane editor-pane"> |
| 103 | <mlk-lazychat-submission-form edited-id="{post.id}"></mlk-lazychat-submission-form> |
| 104 | </elix-expandable-panel> |
Matthias Andreas Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 105 | {/if} |
| 106 | </section> |
Matthias Andreas Benkard | db23ab6 | 2020-04-13 20:01:13 +0200 | [diff] [blame] | 107 | |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 108 | <header> |
| 109 | <div class="lazychat-message-info"> |
| 110 | <span class="lazychat-message-owner post-owner">{owner.firstName}</span> |
| 111 | <a class="post-link" href="/posts/{post.id}"> |
| 112 | <span class="post-self-link">#</span> |
| 113 | </a> |
| 114 | </div> |
| 115 | </header> |
| 116 | |
| 117 | <div class="lazychat-message-controls"> |
| 118 | {#if showLazychatForm} |
| 119 | <button class="pure-button lazychat-edit-button">Edit</button> |
| 120 | {/if} |
| 121 | </div> |
| 122 | |
| 123 | <section class="lazychat-message-content post-content"> |
Matthias Andreas Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 124 | {contentHtml.raw} |
| 125 | </section> |
| 126 | </article> |
| 127 | {/if} |
| 128 | {/with} |
| 129 | {/for} |
| 130 | </div> |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 131 | {/for} |
| 132 | </section> |
| 133 | |
| 134 | <div class="paging"> |
| 135 | {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if} |
| 136 | <span class="filler"></span> |
| 137 | {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if} |
| 138 | </div> |
| 139 | |
| 140 | {/body} |
| 141 | |
| 142 | {/include} |