Skip to content

Commit

Permalink
Single page for everything.
Browse files Browse the repository at this point in the history
  • Loading branch information
wzgliniecki committed Jan 21, 2025
1 parent 3a0eafd commit 8e87944
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/ProjectsSection.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const cardStyles = [
'col-span-3 row-span-2'
];
---
<div class="flex items-center justify-center w-full h-full">
<div class="flex items-center justify-center w-full h-full snap-center">
<div
class="grid grid-cols-4 grid-rows-4 gap-4 p-2 rounded-lg shadow-lg max-h-full" id="projects"
>
Expand Down
9 changes: 1 addition & 8 deletions src/layouts/MainLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,8 @@ import { SEO } from "astro-seo";
Skip to main content
</a>
<Header />
<main id="main" class="max-w-7xl mx-auto px-6 py-12">
<h1
class="text-3xl font-extrabold text-center text-primary mb-6"
>
{pageTitle}
</h1>
<div class="max-w-full">
<main id="main" class="min-w-100 mx-auto px-6 py-12 overflow-y-scroll h-screen snap-y snap-mandatory">
<slot />
</div>
</main>
</body>
</html>
24 changes: 21 additions & 3 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
import MainLayout from "../layouts/MainLayout.astro";
import ProjectsSection from "../components/ProjectsSection.astro"
import SkillSection from "../components/SkillSection.astro";
import ProjectCard from "../components/ProjectCard.astro";
const allProjects = await Astro.glob("../pages/projects/*.mdx");
const pageTitle = "WELCOME TO MY PORTFOLIO!";
---

<MainLayout pageTitle={pageTitle}>
<div class="min-h-screen" id="about">
<div class="min-h-screen snap-center" id="about">
<h2 class="text-2xl font-extrabold text-center text-primary text-text dark:text-darkText mb-6">Software Developer</h2>
<h2 class="text-2xl font-extrabold text-center text-primary text-text dark:text-darkText mb-6">Economist</h2>
<h2 class="text-2xl font-extrabold text-center text-primary text-text dark:text-darkText mb-6">Engineer</h2>
Expand All @@ -17,5 +18,22 @@ const pageTitle = "WELCOME TO MY PORTFOLIO!";
<SkillSection stackPart={"other"} sectionTitle={"OTHER"} />
</div>
</div>
<ProjectsSection/>
{
allProjects
.filter((project) => project.frontmatter.isPrivate === false)
.map((project) => {
const projectSlug = project.url.split("/").pop().replace(".md", "");
return (
<div class="min-h-screen snap-center">
<ProjectCard
projectTitle={project.frontmatter.projectTitle}
projectLogo={project.frontmatter.projectLogo}
repositoryLinks={project.frontmatter.repositoryLinks}
projectSlug={projectSlug}
technologiesList={project.frontmatter.technologiesList}
/>
</div>
);
})
}
</MainLayout>

0 comments on commit 8e87944

Please sign in to comment.