Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 1 | {@java.util.List<eu.mulk.mulkcms2.benki.bookmarks.Bookmark> posts} |
| 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 | |
| 15 | {#nav}{#navbar siteSection=pageTitle /}{/nav} |
| 16 | |
| 17 | {#head} |
| 18 | <link href="{feedUri}" rel="alternate" type="application/atom+xml" /> |
| 19 | |
| 20 | <script type="module" src="/web_modules/elix/define/ExpandableSection.js"></script> |
| 21 | <script type="module" src="/bookmarks/MlkBookmarkSubmissionForm.js"></script> |
| 22 | <script type="module" src="/bookmarks/bookmarkList.js" defer></script> |
| 23 | {/head} |
| 24 | |
| 25 | {#body} |
| 26 | |
| 27 | {#if showBookmarkForm} |
| 28 | <elix-expandable-section id="bookmark-submission-pane"> |
| 29 | <h2 slot="header" class="small-title expandable-section-title"><button class="pure-button">Create New Bookmark</button></h2> |
| 30 | <section id="bookmark-submission"> |
| 31 | <mlk-bookmark-submission-form id="bookmark-submission-form"></mlk-bookmark-submission-form> |
| 32 | </section> |
| 33 | </elix-expandable-section> |
| 34 | {/if} |
| 35 | |
| 36 | <div class="paging"> |
| 37 | {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if} |
| 38 | <span class="filler"></span> |
| 39 | {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if} |
| 40 | </div> |
| 41 | |
| 42 | <section id="main-content"> |
| 43 | {#for post in posts} |
| 44 | {#with post} |
| 45 | {#if post.isBookmark} |
| 46 | <article class="bookmark"> |
| 47 | <header> |
| 48 | <a href="{uri}"><h1 class="bookmark-title">{title}</h1></a> |
| 49 | <div class="bookmark-info"> |
| 50 | <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time> |
| 51 | <span class="bookmark-owner">{owner.firstName} {owner.lastName}</span> |
| 52 | </div> |
| 53 | </header> |
| 54 | |
| 55 | <section class="bookmark-description"> |
| 56 | {descriptionHtml.raw} |
| 57 | </section> |
| 58 | </article> |
| 59 | {#else} |
| 60 | <article class="lazychat-message"> |
| 61 | <header> |
| 62 | <div class="lazychat-message-info"> |
| 63 | <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time> |
| 64 | <span class="lazychat-message-owner">{owner.firstName} {owner.lastName}</span> |
| 65 | </div> |
| 66 | </header> |
| 67 | |
| 68 | <section class="lazychat-message-content"> |
| 69 | {contentHtml.raw} |
| 70 | </section> |
| 71 | </article> |
| 72 | {/if} |
| 73 | {/with} |
| 74 | {/for} |
| 75 | </section> |
| 76 | |
| 77 | <div class="paging"> |
| 78 | {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if} |
| 79 | <span class="filler"></span> |
| 80 | {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if} |
| 81 | </div> |
| 82 | |
| 83 | {/body} |
| 84 | |
| 85 | {/include} |