Skip to content

Commit 2338276

Browse files
authored
Lume v3 #17
Merge pull request #17 from famebot/v3 - Lume v3 updates
2 parents 57038ef + a214b91 commit 2338276

File tree

6 files changed

+28
-1380
lines changed

6 files changed

+28
-1380
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
_site
2-
_cache
31
.DS_Store
2+
_bin
3+
_site
4+
deno.lock

_includes/layouts/archive.vto

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,20 @@ bodyClass: body-tag
1212
<a href="/feed.xml">Atom</a>, <a href="/feed.json">JSON</a>
1313
</p>
1414
{{ if pagination.page === 1 }}
15-
{{ set pageTags = search.pages("type=tag", "tag") }}
15+
{{ set pageAuthors = search.pages("type=author pagination.page=1", "author") }}
16+
{{ if pageAuthors.length > 1 }}
17+
<nav class="page-navigation">
18+
<h2>{{ i18n.search.authors }}:</h2>
19+
20+
<ul class="page-navigation-tags">
21+
{{ for page of pageAuthors }}
22+
<li><a href="{{ page.url }}" class="badge">{{ page.author }}</a></li>
23+
{{ /for }}
24+
</ul>
25+
</nav>
26+
{{ /if }}
27+
28+
{{ set pageTags = search.pages("type=tag pagination.page=1", "tag") }}
1629
{{ if pageTags.length }}
1730
<nav class="page-navigation">
1831
<h2>{{ i18n.search.tags }}<span class="html-only"> 🏷️</span></h2>
@@ -27,30 +40,5 @@ bodyClass: body-tag
2740
{{ /if }}
2841

2942
{{ include "templates/post-list.vto" { postslist: results } }}
30-
31-
{{ if pagination.totalPages !== 1 }}
32-
<nav class="page-pagination pagination">
33-
<ul>
34-
{{- if pagination.previous }}
35-
<li class="pagination-prev">
36-
<a href="{{ pagination.previous }}" rel="prev">{{ i18n.nav.previous }}</a>
37-
</li>
38-
{{ /if }}
39-
40-
<li class="pagination-page">
41-
{{ i18n.nav.page }} {{ pagination.page }}
42-
</li>
43-
44-
{{- if pagination.next }}
45-
<li class="pagination-next">
46-
<a href="{{ pagination.next }}" rel="next">{{ i18n.nav.next }}</a>
47-
</li>
48-
{{ /if }}
49-
</ul>
50-
</nav>
51-
{{ /if }}
52-
53-
{{ if pagination.page === 1 }}
54-
<br><div class="search" id="search"></div>
55-
{{ /if }}
43+
{{ include "templates/pagination.vto" }}
5644
</main>

_includes/layouts/archive_result.vto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ bodyClass: body-tag
88
<h1 class="page-title">{{ title }}</h1>
99
</header>
1010
<p class="nav-back"><a href="/archive/">{{ i18n.nav.back }}</a></p><br>
11-
{{ include "templates/post-list.vto" { postslist: search.pages(search_query) } }}
11+
{{ include "templates/post-list.vto" { postslist: results } }}
12+
{{ include "templates/pagination.vto" }}
1213
</main>

deno.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"imports": {
3-
"lume/": "https://deno.land/x/lume@v2.5.3/",
4-
"blog/": "https://deno.land/x/lume_theme_simple_blog@v0.15.11/",
3+
"lume/": "https://deno.land/x/lume@v3.0.2/",
4+
"blog/": "https://deno.land/x/lume_theme_simple_blog@v0.16.0/",
55
"lume/cms/": "https://cdn.jsdelivr.net/gh/lumeland/[email protected]/",
6-
"lume/jsx-runtime": "https://deno.land/x/[email protected].8/jsx-runtime.ts"
6+
"lume/jsx-runtime": "https://deno.land/x/[email protected].10/jsx-runtime.ts"
77
},
88
"tasks": {
99
"lume": "echo \"import 'lume/cli.ts'\" | deno run -A -",
@@ -31,7 +31,10 @@
3131
"tags": [
3232
"recommended"
3333
]
34-
}
34+
},
35+
"plugins": [
36+
"https://deno.land/x/[email protected]/lint.ts"
37+
]
3538
},
3639
"fmt": {
3740
"exclude": [

0 commit comments

Comments
 (0)