-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rewrite templates using vento (#232)
- Loading branch information
Showing
26 changed files
with
309 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{ export function PostsList(posts) }} | ||
{{- for index, post of posts -}} | ||
<div class="{{ if index === 0 }}mt-0{{ else }}mx-0 my-8{{ /if }} no-underline"> | ||
<h2 class="font-semibold mx-0 my-0 text-xl leading-8" style="view-transition-name: post-{{ post.data.title |> slugify }}"> | ||
<a href="{{ post.url }}">{{ post.data.title }}</a> | ||
</h2> | ||
<div class="flex flex-row flex-wrap gap-2 lowercase my-2"> | ||
{{- if post.data.date -}} | ||
<span> | ||
{{ set date = post.data.date |> toShortDate }} | ||
{{ set edited = post.data.edited |> toShortDate }} | ||
<time datetime="{{ post.data.date }}">{{ date }}</time> | ||
{{- if post.data.edited && (edited !== date) -}} | ||
(last edited <time datetime="{{ post.data.edited }}">{{ edited }}</time>) | ||
{{- /if -}} | ||
</span> | ||
{{- /if -}} | ||
{{- if post.data.tags -}} | ||
<span>·</span> | ||
<div class="flex flex-row flex-wrap space-x-1"> | ||
{{- for index, tag of post.data.tags -}} | ||
<span> | ||
<a href="/tags/{{ tag |> slugify }}">{{ tag }}</a> | ||
{{- index != (post.data.tags.length - 1) ? ',' : '' -}} | ||
</span> | ||
{{- /for -}} | ||
</div> | ||
{{- /if -}} | ||
</div> | ||
<p class="mb-0 mt-1">{{ post.data.description }}</p> | ||
</div> | ||
{{- /for -}} | ||
{{ /export }} |
Oops, something went wrong.