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 | bbac0c7 | 2020-04-19 19:38:49 +0200 | [diff] [blame] | 69 | |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 70 | <a href="{post.uri}" class="bookmark-title"> |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 71 | <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] | 72 | </a> |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 73 | </div> |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 74 | </header> |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 75 | |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 76 | <div class="bookmark-controls"> |
| 77 | {#if showBookmarkForm} |
| 78 | <button class="pure-button bookmark-edit-button">Edit</button> |
| 79 | {/if} |
| 80 | </div> |
Matthias Andreas Benkard | 533e6d4 | 2020-12-16 13:26:38 +0100 | [diff] [blame] | 81 | |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 82 | <div class="bookmark-description post-content"> |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 83 | {post.descriptionHtml.raw} |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 84 | </div> |
Matthias Andreas Benkard | db23ab6 | 2020-04-13 20:01:13 +0200 | [diff] [blame] | 85 | |
Matthias Andreas Benkard | 14e5944 | 2022-05-24 22:19:29 +0200 | [diff] [blame] | 86 | {#if showCommentBox} |
Matthias Andreas Benkard | 0351a8f | 2022-05-26 08:05:00 +0200 | [diff] [blame] | 87 | {#commentBox postId=post.id comments=post.comments /} |
Matthias Andreas Benkard | 14e5944 | 2022-05-24 22:19:29 +0200 | [diff] [blame] | 88 | {/if} |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 89 | </article> |
| 90 | {#else} |
| 91 | <article class="lazychat-message"> |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 92 | <div class="lazychat-editor post-editor"> |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 93 | {#if showLazychatForm} |
| 94 | <elix-expandable-panel class="lazychat-editor-pane editor-pane"> |
| 95 | <mlk-lazychat-submission-form edited-id="{post.id}"></mlk-lazychat-submission-form> |
| 96 | </elix-expandable-panel> |
| 97 | {/if} |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 98 | </div> |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 99 | |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 100 | <header> |
| 101 | <div class="lazychat-message-info"> |
| 102 | <span class="lazychat-message-owner post-owner">{post.owner.firstName}</span> |
| 103 | <a class="post-link" href="/posts/{post.id}"> |
| 104 | <span class="post-self-link">#</span> |
| 105 | </a> |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 106 | </div> |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 107 | </header> |
Matthias Andreas Benkard | 369e698 | 2020-04-26 13:14:21 +0200 | [diff] [blame] | 108 | |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 109 | <div class="lazychat-message-controls"> |
| 110 | {#if showLazychatForm} |
| 111 | <button class="pure-button lazychat-edit-button">Edit</button> |
| 112 | {/if} |
| 113 | </div> |
| 114 | |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 115 | <div class="lazychat-message-content post-content"> |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 116 | {post.descriptionHtml.raw} |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 117 | </div> |
Matthias Andreas Benkard | 14e5944 | 2022-05-24 22:19:29 +0200 | [diff] [blame] | 118 | |
| 119 | {#if showCommentBox} |
Matthias Andreas Benkard | 0351a8f | 2022-05-26 08:05:00 +0200 | [diff] [blame] | 120 | {#commentBox postId=post.id comments=post.comments /} |
Matthias Andreas Benkard | 14e5944 | 2022-05-24 22:19:29 +0200 | [diff] [blame] | 121 | {/if} |
Matthias Andreas Benkard | 49b0151 | 2021-07-05 06:45:54 +0200 | [diff] [blame] | 122 | </article> |
| 123 | {/if} |
Matthias Andreas Benkard | 1c2a8a7 | 2020-04-26 06:09:57 +0200 | [diff] [blame] | 124 | {/for} |
| 125 | </div> |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 126 | {/for} |
Matthias Andreas Benkard | dcad91c | 2022-05-24 07:14:08 +0200 | [diff] [blame] | 127 | </div> |
Matthias Andreas Benkard | 371164a | 2020-03-23 06:21:25 +0100 | [diff] [blame] | 128 | |
| 129 | <div class="paging"> |
Matthias Andreas Benkard | 8563a3c | 2020-09-16 17:57:24 +0200 | [diff] [blame] | 130 | {#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] | 131 | <span class="filler"></span> |
Matthias Andreas Benkard | 8563a3c | 2020-09-16 17:57:24 +0200 | [diff] [blame] | 132 | {#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] | 133 | </div> |
| 134 | |
| 135 | {/body} |
| 136 | |
| 137 | {/include} |