fix: correct cv mobile layout

This commit is contained in:
Troy 2025-02-12 16:59:30 +00:00
parent 2a8bffcb8b
commit 3d6da4d63b
Signed by: troy
GPG key ID: DFC06C02ED3B4711
6 changed files with 234 additions and 360 deletions

View file

@ -15,7 +15,7 @@
"@tailwindcss/vite": "^4.0.6", "@tailwindcss/vite": "^4.0.6",
"@types/alpinejs": "^3.13.11", "@types/alpinejs": "^3.13.11",
"alpinejs": "^3.14.8", "alpinejs": "^3.14.8",
"astro": "^5.2.5", "astro": "^5.2.6",
"astro-icon": "^1.1.5", "astro-icon": "^1.1.5",
"rehype-external-links": "^3.0.0", "rehype-external-links": "^3.0.0",
"tailwindcss": "^4.0.6", "tailwindcss": "^4.0.6",

View file

@ -1,30 +0,0 @@
---
import { getCollection } from "astro:content";
import { dateRange } from "@lib/utils";
import Accordion from "@components/Accordion.astro";
const collection = (await getCollection("education")).sort(
(a, b) =>
new Date(b.data.dateStart).valueOf() - new Date(a.data.dateStart).valueOf(),
);
const education = await Promise.all(
collection.map(async (item) => {
const { Content } = await item.render();
return { ...item, Content };
}),
);
---
<div>
{
education.map((entry) => (
<Accordion
institution={`${entry.data.institution} (${dateRange(entry.data.dateStart, entry.data.dateEnd)})`}
qualification={entry.data.qualification}
grades={entry.data.grades}
isOpen={entry.data.isOpen}
/>
))
}
</div>

View file

@ -1,27 +0,0 @@
---
import { getCollection } from "astro:content";
import { Icon } from "astro-icon/components";
const collection = await getCollection("skills");
const skills = await Promise.all(
collection.map(async (item) => {
const { Content } = await item.render();
return { ...item, Content };
}),
);
---
<ul class="flex max-w-full list-none flex-wrap gap-4 px-0">
{
skills.map((entry) => (
<li class="group border-tertiary text-tertiary hover:border-accent hover:text-accent flex items-center gap-2 rounded border p-2 transition-colors">
<Icon
name={entry.data.icon}
class="text-tertiary group-hover:text-accent h-5 w-auto transition-colors"
/>
<p class="m-0 cursor-default">{entry.data.title}</p>
</li>
))
}
</ul>

View file

@ -1,41 +0,0 @@
---
import { getCollection } from "astro:content";
import { dateRange } from "@lib/utils";
import Button from "./Button.astro";
const collection = (await getCollection("work")).sort(
(a, b) =>
new Date(b.data.dateStart).valueOf() - new Date(a.data.dateStart).valueOf(),
);
const work = await Promise.all(
collection.map(async (item) => {
const { Content } = await item.render();
return { ...item, Content };
}),
);
---
<ul class="list-none pl-0">
{
work.map((entry) => (
<li class="pb-4 pl-0 last:pb-0">
<h3 class="text-secondary mt-4 mb-1 font-semibold text-balance">
<span class="text-tertiary">{entry.data.role} at</span>
{entry.data.company}
</h3>
<time class="text-accent block">
{dateRange(entry.data.dateStart, entry.data.dateEnd)}
</time>
<article class="text-secondary prose-a:underline prose-a:decoration-tertiary prose-a:decoration-wavy mt-2">
<entry.Content />
</article>
{entry.data.article ? (
<div class="flex justify-center">
<Button href={entry.data.article} link="View more" />
</div>
) : null}
</li>
))
}
</ul>

View file

@ -46,36 +46,4 @@ const projects = defineCollection({
.merge(rssSchema), .merge(rssSchema),
}); });
const work = defineCollection({ export const collections = { posts, projects };
type: "content",
schema: z.object({
company: z.string(),
role: z.string(),
dateStart: z.coerce.date(),
dateEnd: z.union([z.coerce.date(), z.string()]),
article: z.string().optional(),
}),
});
const education = defineCollection({
type: "content",
schema: z.object({
institution: z.string(),
qualification: z.string(),
grades: z.array(z.string()),
dateStart: z.coerce.date(),
dateEnd: z.union([z.coerce.date(), z.string()]),
isOpen: z.boolean().optional(),
}),
});
const skills = defineCollection({
type: "content",
schema: z.object({
type: z.string(),
title: z.string(),
icon: z.string(),
}),
});
export const collections = { posts, projects, work, education, skills };

View file

@ -13,20 +13,47 @@ import icon from "public/assets/icon.png";
<Head title={CV.TITLE} description={CV.DESCRIPTION} /> <Head title={CV.TITLE} description={CV.DESCRIPTION} />
<body class="w-full font-sans antialiased"> <body class="w-full font-sans antialiased">
<div class="container mx-auto max-w-screen-xl"> <div class="container mx-auto max-w-screen-xl">
<main <main class="flex flex-col rounded-md shadow-2xl sm:m-12">
id="wrapper" <div
class="flex flex-col rounded-md shadow-2xl sm:m-12 sm:flex-row-reverse" class="flex flex-col items-center justify-between p-12 sm:flex-row-reverse"
> >
<div id="sidebar" class="w-full rounded-r-md p-8 sm:max-w-sm"> <div>
<div class="mb-12 px-2">
<Image <Image
src={icon} src={icon}
alt="Troy Lusty" alt="Troy Lusty"
class="mx-auto mb-2 w-48 rounded-full" class="mx-auto mb-2 w-32 rounded-full"
loading="eager" loading="eager"
/> />
</div> </div>
<div>
<h1 class="mb-2 text-5xl font-bold">{SITE.AUTHOR}</h1>
<h2 class="mb-2 text-xl italic">Digital Designer</h2>
<div
class="social-links grid grid-cols-1 gap-1 py-4 font-medium md:grid-cols-2"
>
<div class="flex items-center">
<Icon name="mdi:house" class="mr-2 inline w-6" />
Devon, United Kingdom
</div>
<div class="flex items-center">
<Icon name="mdi:globe" class="mr-2 inline w-6" />
<a href="/">troylusty.com</a>
</div>
<div class="flex items-center">
<Icon name="mdi:email" class="mr-2 inline w-6" />
<a href={`mailto:${SITE.EMAIL}`}>hello@troylusty.com</a>
</div>
<div class="flex items-center">
<Icon name="mdi:house" class="mr-2 inline w-6" />
<Link href="https://github.com/troylusty"
>github.com/troylusty</Link
>
</div>
</div>
</div>
</div>
<div class="flex flex-col sm:flex-row-reverse">
<div class="w-full rounded-r-md p-8 sm:max-w-sm">
<div class="mb-12 px-2 text-lg font-light"> <div class="mb-12 px-2 text-lg font-light">
<div class="mb-4 flex items-center"> <div class="mb-4 flex items-center">
<Icon name="mdi:cogs" class="mr-2" /> <Icon name="mdi:cogs" class="mr-2" />
@ -66,7 +93,6 @@ import icon from "public/assets/icon.png";
<span class="box">Full drivers licence (A & B)</span> <span class="box">Full drivers licence (A & B)</span>
</p> </p>
</div> </div>
<div class="mb-12 px-2 text-lg font-light"> <div class="mb-12 px-2 text-lg font-light">
<div class="mb-4 flex items-center"> <div class="mb-4 flex items-center">
<Icon name="mdi:chart-timeline-variant-shimmer" class="mr-2" /> <Icon name="mdi:chart-timeline-variant-shimmer" class="mr-2" />
@ -84,7 +110,6 @@ import icon from "public/assets/icon.png";
<li><small>1st year: 69.43% State Aggregate Mark</small></li> <li><small>1st year: 69.43% State Aggregate Mark</small></li>
</ol> </ol>
</div> </div>
<div class="mb-12 px-2 text-lg font-light"> <div class="mb-12 px-2 text-lg font-light">
<div class="mb-4 flex items-center"> <div class="mb-4 flex items-center">
<Icon name="mdi:wrench" class="mr-2" /> <Icon name="mdi:wrench" class="mr-2" />
@ -95,7 +120,6 @@ import icon from "public/assets/icon.png";
<h3 class="font-semibold">Photogrammetrist</h3> <h3 class="font-semibold">Photogrammetrist</h3>
<p>2023 Paignton Picture House</p> <p>2023 Paignton Picture House</p>
</div> </div>
<div class="mb-12 px-2 text-lg font-light"> <div class="mb-12 px-2 text-lg font-light">
<div class="mb-4 flex items-center"> <div class="mb-4 flex items-center">
<Icon name="mdi:plane-train" class="mr-2" /> <Icon name="mdi:plane-train" class="mr-2" />
@ -106,36 +130,14 @@ import icon from "public/assets/icon.png";
</div> </div>
</div> </div>
<div class="content w-full p-12"> <div class="content w-full p-12">
<h1 class="mb-2 text-5xl font-bold">{SITE.AUTHOR}</h1> <div class="prose">
<h2 class="mb-2 text-xl italic">Digital Designer</h2>
<div class="social-links grid grid-cols-2 gap-1 py-4 font-medium">
<div class="flex items-center">
<Icon name="mdi:house" class="mr-2 inline w-6" />
Devon, United Kingdom
</div>
<div class="flex items-center">
<Icon name="mdi:globe" class="mr-2 inline w-6" />
<a href="/">troylusty.com</a>
</div>
<div class="flex items-center">
<Icon name="mdi:email" class="mr-2 inline w-6" />
<a href={`mailto:${SITE.EMAIL}`}>hello@troylusty.com</a>
</div>
<div class="flex items-center">
<Icon name="mdi:house" class="mr-2 inline w-6" />
<Link href="https://github.com/troylusty"
>github.com/troylusty</Link
>
</div>
</div>
<div id="profile" class="prose">
<h2>Summary</h2> <h2>Summary</h2>
<p> <p>
My specific chosen area of focus is design, lighting, and My specific chosen area of focus is design, lighting, and
rendering focusing on 3D environments within software such as rendering focusing on 3D environments within software such as
Blender and Unreal Engine. Using either real-time or offline Blender and Unreal Engine. Using either real-time or offline
rendering techniques. In addition to this I also have interests in rendering techniques. In addition to this I also have interests
web development and cyber security. in web development and cyber security.
</p> </p>
<p> <p>
My portfolio of work can be found on my website at <a My portfolio of work can be found on my website at <a
@ -144,7 +146,7 @@ import icon from "public/assets/icon.png";
</p> </p>
</div> </div>
<hr class="mt-8 mb-12" /> <hr class="mt-8 mb-12" />
<div id="experience" class="prose"> <div class="prose">
<h2>Experience</h2> <h2>Experience</h2>
<div> <div>
<h3>Camouflage Store</h3> <h3>Camouflage Store</h3>
@ -172,10 +174,10 @@ import icon from "public/assets/icon.png";
<p> <p>
My role has me in charge of managing an online e-commerce My role has me in charge of managing an online e-commerce
store in addition to creating, editing, and publishing store in addition to creating, editing, and publishing
informational YouTube and social media content for a family informational YouTube and social media content for a
run outdoors store. This includes the recent redesign and family run outdoors store. This includes the recent
also any maintenance and general upkeep of the site with all redesign and also any maintenance and general upkeep of
its related systems. the site with all its related systems.
</p> </p>
<ul> <ul>
<li>Migration of content to Shopify</li> <li>Migration of content to Shopify</li>
@ -185,7 +187,9 @@ import icon from "public/assets/icon.png";
</div> </div>
</section> </section>
<section class="mb-6"> <section class="mb-6">
<div class="mb-2 italic lg:inline-block lg:w-3/12 lg:align-top"> <div
class="mb-2 italic lg:inline-block lg:w-3/12 lg:align-top"
>
Tools: Tools:
</div> </div>
<div class="w-full lg:inline-block lg:w-8/12"> <div class="w-full lg:inline-block lg:w-8/12">
@ -200,7 +204,7 @@ import icon from "public/assets/icon.png";
</div> </div>
</div> </div>
<hr class="mt-8 mb-12" /> <hr class="mt-8 mb-12" />
<div id="projects" class="prose"> <div class="prose">
<h2>Projects</h2> <h2>Projects</h2>
<div class="mb-16"> <div class="mb-16">
<h3>troylusty.com</h3> <h3>troylusty.com</h3>
@ -210,8 +214,8 @@ import icon from "public/assets/icon.png";
</p> </p>
<p class="w-full lg:inline-block lg:w-8/12"> <p class="w-full lg:inline-block lg:w-8/12">
My blog is the center of my online presence. Here, I share My blog is the center of my online presence. Here, I share
posts about what I've learnt, tutorials and my thoughts on web posts about what I've learnt, tutorials and my thoughts on
development in general. web development in general.
</p> </p>
</section> </section>
<section class="mb-6"> <section class="mb-6">
@ -244,7 +248,6 @@ import icon from "public/assets/icon.png";
</ul> </ul>
</div> </div>
</section> </section>
<section class="mb-6"> <section class="mb-6">
<p class="mb-2 italic lg:inline-block lg:w-3/12 lg:align-top"> <p class="mb-2 italic lg:inline-block lg:w-3/12 lg:align-top">
Built with: Built with:
@ -260,6 +263,7 @@ import icon from "public/assets/icon.png";
</div> </div>
</div> </div>
</div> </div>
</div>
</main> </main>
</div> </div>
</body> </body>