Skip to content

Commit

Permalink
added options if images dont exist, added some titles to every page
Browse files Browse the repository at this point in the history
  • Loading branch information
UltraSive committed Oct 19, 2023
1 parent 78072ab commit d0d3b25
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 14 deletions.
4 changes: 4 additions & 0 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
<svelte:head>
<title>Aidan Perry</title>
</svelte:head>

<h1 class="flex justify-center text-3xl font-bold underline">Hello, world!</h1>
18 changes: 12 additions & 6 deletions src/routes/blog/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,27 @@
}
</script>

<svelte:head>
<title>Aidan Perry's Blog</title>
</svelte:head>

<div class="flex justify-center">
<div class="px-4">
{#each posts as post}
<a href="/blog/{post.attributes.slug}" class="block no-underline ">
<a href="/blog/{post.attributes.slug}" class="block no-underline">
<div
class="max-w-4xl my-4 hover:bg-gray-50 bg-white border rounded-xl shadow-sm sm:flex dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]"
>
<div
class="flex-shrink-0 relative w-full rounded-t-xl overflow-hidden pt-[40%] sm:rounded-l-xl sm:max-w-[15rem] md:rounded-tr-none md:max-w-xs"
>
<img
class="w-full h-full absolute top-0 left-0 object-cove"
src="https://cms.anchored.host{post.attributes.image.data.attributes.url}"
alt="Image Description"
/>
{#if post.attributes.image.data != null}
<img
class="w-full h-full absolute top-0 left-0 object-cove"
src="https://cms.anchored.host{post.attributes.image.data.attributes.url}"
alt="Article Preview Image"
/>
{/if}
</div>
<div class="p-4 flex flex-col h-full sm:p-7">
<h3 class="text-lg font-bold text-gray-800 dark:text-white">
Expand Down
22 changes: 14 additions & 8 deletions src/routes/blog/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,42 @@
<meta name="description" content={post.attributes.description} />
<meta name="og:title" content={post.attributes.title} />
<meta name="og:description" content={post.attributes.description} />
<meta
name="og:image"
content="https://cms.anchored.host{post.attributes.image.data.attributes.url}"
/>
<meta name="og:type" content="article" />
<meta name="og:url" content="https://anchored.host/blog/{post.attributes.slug}" />
<meta name="og:site_name" content="Aidan Perry" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@ultrasive" />
<meta name="twitter:title" content={post.attributes.title} />
<meta name="twitter:description" content={post.attributes.description} />
<meta
name="twitter:image"
content="https://cms.anchored.host{post.attributes.image.data.attributes.url}"
/>

<meta name="twitter:creator" content="@ultrasive" />
<meta name="twitter:label1" content="Written by" />
<meta name="twitter:data1" content="Aidan Perry" />
<meta name="twitter:label2" content="Published on" />
<meta name="twitter:data2" content={formatDate(post.attributes.createdAt)} />
{#if post.attributes.image.data != null}
<meta
name="og:image"
content="https://cms.anchored.host{post.attributes.image.data.attributes.url}"
/>
<meta
name="twitter:image"
content="https://cms.anchored.host{post.attributes.image.data.attributes.url}"
/>
{/if}
</svelte:head>

<div class="flex justify-center">
<article class="px-2 prose lg:prose-xl">
<h1>{post.attributes.title}</h1>
<div class="flex justify-center">
{#if post.attributes.image.data != null}
<img
class="max-h-72"
src="https://cms.anchored.host{post.attributes.image.data.attributes.url}"
alt="Image Description"
/>
{/if}
</div>
{@html body}
</article>
Expand Down
3 changes: 3 additions & 0 deletions src/routes/experience/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<svelte:head>
<title>Aidan Perry's Experience</title>
</svelte:head>
4 changes: 4 additions & 0 deletions src/routes/projects/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
$: open = 'XDP Firewall';
</script>

<svelte:head>
<title>Aidan Perry's Projects</title>
</svelte:head>

<div class="container mx-auto p-2">
{#each projects as project}
<!-- Accordion Item -->
Expand Down

1 comment on commit d0d3b25

@vercel
Copy link

@vercel vercel bot commented on d0d3b25 Oct 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.