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