blob: 8c66e1d4ca5d540e2458ba10b5668cd85ce04a86 [file] [log] [blame]
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +01001{#include base.html}
2
3{#title}Benki {pageTitle}{/title}
4{#siteSection}{pageTitle}{/siteSection}
5
Matthias Andreas Benkard188327d2020-04-17 21:22:57 +02006{#nav}{#navbar siteSection=pageTitle /}
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +01007
8{#head}
9 <link href="{feedUri}" rel="alternate" type="application/atom+xml" />
10
Matthias Andreas Benkardad76d622020-04-27 08:08:17 +020011 {#if showBookmarkForm || showLazychatForm}
Matthias Andreas Benkard813e5972020-06-14 19:27:42 +020012 <script type="module" src="/lib.js"></script>
Matthias Andreas Benkardad76d622020-04-27 08:08:17 +020013 {/if}
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010014{/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 Benkarddcad91c2022-05-24 07:14:08 +020021 <div id="bookmark-submission">
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010022 <mlk-bookmark-submission-form id="bookmark-submission-form"></mlk-bookmark-submission-form>
Matthias Andreas Benkarddcad91c2022-05-24 07:14:08 +020023 </div>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010024 </elix-expandable-section>
25{/if}
26
Matthias Andreas Benkard12c7cac2020-03-26 07:19:45 +010027{#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 Benkarddcad91c2022-05-24 07:14:08 +020030 <div id="lazychat-submission">
Matthias Andreas Benkard12c7cac2020-03-26 07:19:45 +010031 <mlk-lazychat-submission-form id="lazychat-submission-form"></mlk-lazychat-submission-form>
Matthias Andreas Benkarddcad91c2022-05-24 07:14:08 +020032 </div>
Matthias Andreas Benkard12c7cac2020-03-26 07:19:45 +010033 </elix-expandable-section>
34{/if}
35
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +010036<div class="paging">
Matthias Andreas Benkard8563a3c2020-09-16 17:57:24 +020037 <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="&#x1f50e;"/>
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 Benkard371164a2020-03-23 06:21:25 +010043</div>
44
Matthias Andreas Benkarddcad91c2022-05-24 07:14:08 +020045<div id="main-content">
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +020046 {#for day in postDays}
47 <div class="post-day">
Matthias Andreas Benkard369e6982020-04-26 13:14:21 +020048 <div class="post-day-info">
49 <time datetime="{day.date.htmlDate}">{day.date.humanDate}</time>
50 </div>
51
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +020052 {#for post in day.posts}
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020053 {#if post.isBookmark}
54 <article class="bookmark {#if post.descriptionHtml != ""}post-with-nonempty-body{/if}">
Matthias Andreas Benkarddcad91c2022-05-24 07:14:08 +020055 <div class="bookmark-editor post-editor">
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020056 {#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 Benkarddcad91c2022-05-24 07:14:08 +020061 </div>
Matthias Andreas Benkardbbac0c72020-04-19 19:38:49 +020062
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020063 <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 Benkard8dcc6ae2022-06-04 16:02:25 +020069 {#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 Benkardbbac0c72020-04-19 19:38:49 +020074
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020075 <a href="{post.uri}" class="bookmark-title">
Matthias Andreas Benkarddcad91c2022-05-24 07:14:08 +020076 <h2 class="bookmark-title"><span class="bookmark-symbol">🔖 </span> {post.title}</h2>.
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020077 </a>
Matthias Andreas Benkard369e6982020-04-26 13:14:21 +020078 </div>
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020079 </header>
Matthias Andreas Benkard369e6982020-04-26 13:14:21 +020080
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020081 <div class="bookmark-controls">
82 {#if showBookmarkForm}
83 <button class="pure-button bookmark-edit-button">Edit</button>
84 {/if}
85 </div>
Matthias Andreas Benkard533e6d42020-12-16 13:26:38 +010086
Matthias Andreas Benkarddcad91c2022-05-24 07:14:08 +020087 <div class="bookmark-description post-content">
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020088 {post.descriptionHtml.raw}
Matthias Andreas Benkarddcad91c2022-05-24 07:14:08 +020089 </div>
Matthias Andreas Benkarddb23ab62020-04-13 20:01:13 +020090
Matthias Andreas Benkard14e59442022-05-24 22:19:29 +020091 {#if showCommentBox}
Matthias Andreas Benkard0351a8f2022-05-26 08:05:00 +020092 {#commentBox postId=post.id comments=post.comments /}
Matthias Andreas Benkard14e59442022-05-24 22:19:29 +020093 {/if}
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020094 </article>
95 {#else}
96 <article class="lazychat-message">
Matthias Andreas Benkarddcad91c2022-05-24 07:14:08 +020097 <div class="lazychat-editor post-editor">
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020098 {#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 Benkarddcad91c2022-05-24 07:14:08 +0200103 </div>
Matthias Andreas Benkard369e6982020-04-26 13:14:21 +0200104
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +0200105 <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 Benkard8dcc6ae2022-06-04 16:02:25 +0200111 {#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 Benkard369e6982020-04-26 13:14:21 +0200116 </div>
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +0200117 </header>
Matthias Andreas Benkard369e6982020-04-26 13:14:21 +0200118
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +0200119 <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 Benkarddcad91c2022-05-24 07:14:08 +0200125 <div class="lazychat-message-content post-content">
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +0200126 {post.descriptionHtml.raw}
Matthias Andreas Benkarddcad91c2022-05-24 07:14:08 +0200127 </div>
Matthias Andreas Benkard14e59442022-05-24 22:19:29 +0200128
129 {#if showCommentBox}
Matthias Andreas Benkard0351a8f2022-05-26 08:05:00 +0200130 {#commentBox postId=post.id comments=post.comments /}
Matthias Andreas Benkard14e59442022-05-24 22:19:29 +0200131 {/if}
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +0200132 </article>
133 {/if}
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +0200134 {/for}
135 </div>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +0100136 {/for}
Matthias Andreas Benkarddcad91c2022-05-24 07:14:08 +0200137</div>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +0100138
139<div class="paging">
Matthias Andreas Benkard8563a3c2020-09-16 17:57:24 +0200140 {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}&search-query={searchQuery}" class="pure-button">⇠ previous page</a>{/if}
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +0100141 <span class="filler"></span>
Matthias Andreas Benkard8563a3c2020-09-16 17:57:24 +0200142 {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}&search-query={searchQuery}" class="pure-button">next page ⇢</a>{/if}
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +0100143</div>
144
145{/body}
146
147{/include}