blob: 2f932ecdadaace9491465e192ec283c21b9b33b3 [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 Benkardbbac0c72020-04-19 19:38:49 +020069
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020070 <a href="{post.uri}" class="bookmark-title">
Matthias Andreas Benkarddcad91c2022-05-24 07:14:08 +020071 <h2 class="bookmark-title"><span class="bookmark-symbol">🔖 </span> {post.title}</h2>.
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020072 </a>
Matthias Andreas Benkard369e6982020-04-26 13:14:21 +020073 </div>
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020074 </header>
Matthias Andreas Benkard369e6982020-04-26 13:14:21 +020075
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020076 <div class="bookmark-controls">
77 {#if showBookmarkForm}
78 <button class="pure-button bookmark-edit-button">Edit</button>
79 {/if}
80 </div>
Matthias Andreas Benkard533e6d42020-12-16 13:26:38 +010081
Matthias Andreas Benkarddcad91c2022-05-24 07:14:08 +020082 <div class="bookmark-description post-content">
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020083 {post.descriptionHtml.raw}
Matthias Andreas Benkarddcad91c2022-05-24 07:14:08 +020084 </div>
Matthias Andreas Benkarddb23ab62020-04-13 20:01:13 +020085
Matthias Andreas Benkard14e59442022-05-24 22:19:29 +020086 {#if showCommentBox}
Matthias Andreas Benkard0351a8f2022-05-26 08:05:00 +020087 {#commentBox postId=post.id comments=post.comments /}
Matthias Andreas Benkard14e59442022-05-24 22:19:29 +020088 {/if}
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020089 </article>
90 {#else}
91 <article class="lazychat-message">
Matthias Andreas Benkarddcad91c2022-05-24 07:14:08 +020092 <div class="lazychat-editor post-editor">
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +020093 {#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 Benkarddcad91c2022-05-24 07:14:08 +020098 </div>
Matthias Andreas Benkard369e6982020-04-26 13:14:21 +020099
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +0200100 <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 Benkard369e6982020-04-26 13:14:21 +0200106 </div>
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +0200107 </header>
Matthias Andreas Benkard369e6982020-04-26 13:14:21 +0200108
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +0200109 <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 Benkarddcad91c2022-05-24 07:14:08 +0200115 <div class="lazychat-message-content post-content">
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +0200116 {post.descriptionHtml.raw}
Matthias Andreas Benkarddcad91c2022-05-24 07:14:08 +0200117 </div>
Matthias Andreas Benkard14e59442022-05-24 22:19:29 +0200118
119 {#if showCommentBox}
Matthias Andreas Benkard0351a8f2022-05-26 08:05:00 +0200120 {#commentBox postId=post.id comments=post.comments /}
Matthias Andreas Benkard14e59442022-05-24 22:19:29 +0200121 {/if}
Matthias Andreas Benkard49b01512021-07-05 06:45:54 +0200122 </article>
123 {/if}
Matthias Andreas Benkard1c2a8a72020-04-26 06:09:57 +0200124 {/for}
125 </div>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +0100126 {/for}
Matthias Andreas Benkarddcad91c2022-05-24 07:14:08 +0200127</div>
Matthias Andreas Benkard371164a2020-03-23 06:21:25 +0100128
129<div class="paging">
Matthias Andreas Benkard8563a3c2020-09-16 17:57:24 +0200130 {#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 +0100131 <span class="filler"></span>
Matthias Andreas Benkard8563a3c2020-09-16 17:57:24 +0200132 {#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 +0100133</div>
134
135{/body}
136
137{/include}