Skip to content

Commit

Permalink
fix formatting errors from recent prs
Browse files Browse the repository at this point in the history
  • Loading branch information
thilobillerbeck committed Aug 28, 2024
1 parent 7ccfab4 commit c56b138
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 30 deletions.
72 changes: 43 additions & 29 deletions src/pages/blog.astro
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,20 @@ const blogMenu = await getEntry("menus", "blog");
>
{
blogMenu.data.map((e) => (
<div class="flex flex-row md:flex-col gap-4">
<div class="flex-1">
<input
name="category"
type="checkbox"
role="checkbox"
id={`check-${e.id}`}
value={e.id}
class="peer h-0 w-0 opacity-0"
checked
/>
<label
for={`check-${e.id}`}
class="
<div class="flex flex-row md:flex-col gap-4">
<div class="flex-1">
<input
name="category"
type="checkbox"
role="checkbox"
id={`check-${e.id}`}
value={e.id}
class="peer h-0 w-0 opacity-0"
checked
/>
<label
for={`check-${e.id}`}
class="
before:block
before:absolute
before:h-8
Expand All @@ -93,23 +93,37 @@ const blogMenu = await getEntry("menus", "blog");
peer-checked:before:w-8
peer-checked:before:icon-[mdi--checkbox-marked-outline]
relative p-4 md:p-8 gap-2 w-full md:w-auto text-nix-blue border-1 fill-nix-blue hover:fill-white border-nix-blue rounded-2xl flex md:flex-col items-center hover:bg-nix-blue-darker hover:text-white cursor-pointer peer-checked:bg-nix-blue peer-checked:text-white peer-checked:fill-white hover:peer-checked:border-nix-blue-darker hover:peer-checked:bg-nix-blue-darker peer-focus:ring-2 peer-focus:ring-black peer-focus:ring-offset-2"
>
<InlineSVG src={e.icon} class="w-12 md:w-24" />
<span class="font-light">{e.title}</span>
</label>
</div>
<div class="md:hidden pt-6">
<label
class="
>
<InlineSVG src={e.icon} class="w-12 md:w-24" />
<span class="font-light">{e.title}</span>
</label>
</div>
<div class="md:hidden pt-6">
<label
class="
relative p-4 md:p-8 gap-2 w-full md:w-auto text-nix-blue border-1 fill-nix-blue hover:fill-white border-nix-blue rounded-2xl flex md:flex-col items-center hover:bg-nix-blue-darker hover:text-white cursor-pointer peer-checked:bg-nix-blue peer-checked:text-white peer-checked:fill-white hover:peer-checked:border-nix-blue-darker hover:peer-checked:bg-nix-blue-darker peer-focus:ring-2 peer-focus:ring-black peer-focus:ring-offset-2"
>
<a href={"/blog/" + e.id + "-rss.xml"}>
<InlineSVG
src="/src/assets/image/blog-menu/rss.svg"
class="inline-block w-12 h-12"
/>
</a>
</label>
</div>
<div
class="hidden md:flex flex-row rss-small"
style="justify-content: center"
>
<a href={"/blog/" + e.id + "-rss.xml"}><InlineSVG src="/src/assets/image/blog-menu/rss.svg" class="inline-block w-12 h-12" /></a>
</label>
</div>
<div class="hidden md:flex flex-row rss-small" style="justify-content: center">
<a href={"/blog/" + e.id + "-rss.xml"}><InlineSVG src="/src/assets/image/blog-menu/rss.svg" class="inline-block w-4 h-4" />rss</a>
</div>
</div>
<a href={"/blog/" + e.id + "-rss.xml"}>
<InlineSVG
src="/src/assets/image/blog-menu/rss.svg"
class="inline-block w-4 h-4"
/>
rss
</a>
</div>
</div>
))
}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/blog/[id]-rss.xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function GET(context) {
title: `NixOS ${title}`,
site: `${context.site}/blog`,
description: `${title} on NixOS, the purely functional Linux distribution.`,
items: posts.slice(0,numOfPosts).map((post) => ({
items: posts.slice(0, numOfPosts).map((post) => ({
title: post.data.title ?? "Untitled",
pubDate: post.data.date ?? new Date().toISOString(),
content: sanitizeHtml(parser.render(post.body)),
Expand Down

0 comments on commit c56b138

Please sign in to comment.