Skip to content

Commit

Permalink
Minor layout fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jackreimers committed Jan 20, 2024
1 parent 4898350 commit 535c451
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/lib/components/layout/blog-card.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
>
<span class="mb-2.5 block font-bold sm:text-2xl">{data.metadata.title}</span>
<span class="block max-w-prose">
{data.intro.substring(0, 100)}
<span class="bg-gradient-to-r from-gray-700 to-white bg-clip-text text-transparent"
{data.intro.substring(0, 100)}<span
class="bg-gradient-to-r from-gray-700 to-white bg-clip-text text-transparent"
>{data.intro.substring(100, 110)}</span
>
</span>
Expand Down
21 changes: 9 additions & 12 deletions src/lib/components/layout/blog-header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,16 @@

<div class="mb-3 mt-3 h-[2px] w-full rounded-full bg-gray-200" />

<div class="mx-auto flex flex-col gap-2.5">
<div class="flex gap-2">
{#each data.metadata.categories as category}
<Button
onClick={() => {}}
classes="bg-gray-100 px-3 py-1.5 text-sm hover:bg-gray-200 sm:px-4 sm:py-2.5 sm:text-base"
>
<p class="font-semibold">{category.name}</p>
</Button>
{/each}
</div>
<div class="mx-auto flex flex-wrap justify-center gap-2">
{#each data.metadata.categories as category}
<Button
onClick={() => {}}
classes="bg-gray-100 px-3 py-1.5 text-sm hover:bg-gray-200 sm:px-4 sm:py-2.5 sm:text-base"
>
<p class="font-semibold">{category.name}</p>
</Button>
{/each}
</div>

<div class="mb-3 mt-3 h-[2px] w-full rounded-full bg-gray-200" />
</div>
</div>
3 changes: 3 additions & 0 deletions src/lib/objects/objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ export const categoryMappings: Category[] = [
{ slug: 'csharp', name: 'C#' },
{ slug: 'dotnet', name: '.NET' },
{ slug: 'aspnetcore', name: 'ASP.NET Core' },
{ slug: 'javascript', name: 'JavaScript' },
{ slug: 'typescript', name: 'TypeScript' },
{ slug: 'svelte', name: 'Svelte' },
{ slug: 'unity', name: 'Unity' },
{ slug: 'godot', name: 'Godot' },
{ slug: 'game-dev', name: 'Game Development' }
Expand Down
3 changes: 3 additions & 0 deletions static/data/categories.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"csharp": "C#",
"dotnet": ".NET",
"javascript": "JavaScript",
"typescript": "TypeScript",
"svelte": "Svelte",
"godot": "Godot",
"game-dev": "Game Development"
}
11 changes: 5 additions & 6 deletions static/posts/test.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
date: 2023-11-06T19:41:00.000+10:00
title: Writing Game Engine Agnostic Code
date: 2024-01-20T19:41:00.000+10:00
title: 10 Interesting Svelte Features
slug: test
categories: [ "dotnet", "csharp", "godot" ]
categories: [ "svelte", "javascript", "typescript" ]
---

Fermentum dui faucibus in ornare quam viverra orci. Non diam phasellus vestibulum lorem sed risus ultricies tristique
nulla. Malesuada proin libero nunc consequat interdum varius sit amet. Pharetra pharetra massa massa ultricies mi. Est
velit egestas dui id ornare arcu odio ut sem.
Aliquam purus sit amet luctus venenatis lectus magna. Nisi vitae suscipit tellus mauris a diam. Eu facilisis sed odio
morbi quis. Iaculis at erat pellentesque adipiscing commodo.

<!--endintro-->

Expand Down

0 comments on commit 535c451

Please sign in to comment.