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 | db23ab6 | 2020-04-13 20:01:13 +0200 | [diff] [blame] | 20 | <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 Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 22 | <script type="module" src="/web_modules/elix/define/ExpandableSection.js"></script> |
| 23 | <script type="module" src="/bookmarks/MlkBookmarkSubmissionForm.js"></script> |
Matthias Andreas Benkard | 12c7cac | 2020-03-26 07:19:45 +0100 | [diff] [blame] | 24 | <script type="module" src="/lazychat/MlkLazychatSubmissionForm.js"></script> |
| 25 | <script type="module" src="/posts/postList.js" defer></script> |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 26 | {/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 Benkard | 12c7cac | 2020-03-26 07:19:45 +0100 | [diff] [blame] | 39 | {#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 Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 48 | <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 Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 55 | {#for day in postDays} |
| 56 | <div class="post-day"> |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame^] | 57 | <div class="post-day-info"> |
| 58 | <time datetime="{day.date.htmlDate}">{day.date.humanDate}</time> |
| 59 | </div> |
| 60 | |
Matthias Andreas Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 61 | {#for post in day.posts} |
| 62 | {#with post} |
| 63 | {#if post.isBookmark} |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame^] | 64 | <article class="bookmark {#if descriptionHtml != ""}post-with-nonempty-body{/if}"> |
Matthias Andreas Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 65 | <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 Benkard | bbac0c7 | 2020-04-19 19:38:49 +0200 | [diff] [blame] | 72 | |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame^] | 73 | <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 Benkard | bbac0c7 | 2020-04-19 19:38:49 +0200 | [diff] [blame] | 79 | |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame^] | 80 | <a href="{uri}" class="bookmark-title"> |
| 81 | <h1 class="bookmark-title">⇢ {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 Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 93 | {descriptionHtml.raw} |
| 94 | </section> |
| 95 | </article> |
| 96 | {#else} |
| 97 | <article class="lazychat-message"> |
Matthias Andreas Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 98 | <section class="lazychat-editor post-editor"> |
| 99 | {#if showLazychatForm} |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame^] | 100 | <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 Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 103 | {/if} |
| 104 | </section> |
Matthias Andreas Benkard | db23ab6 | 2020-04-13 20:01:13 +0200 | [diff] [blame] | 105 | |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame^] | 106 | <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 Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 122 | {contentHtml.raw} |
| 123 | </section> |
| 124 | </article> |
| 125 | {/if} |
| 126 | {/with} |
| 127 | {/for} |
| 128 | </div> |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 129 | {/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} |