From d9430335d52438ea6515be24c9527eededce1b17 Mon Sep 17 00:00:00 2001 From: itsfinniii <102350242+itsfinniii@users.noreply.github.com> Date: Mon, 27 Apr 2026 21:15:32 +0200 Subject: [PATCH] Clean up the project a bit Fix imports, remove unnecessary imports, and replace all single apostrophe to double apostrophes --- astro/src/components/blogs/BlogIndex.astro | 14 ++-- astro/src/components/blogs/BlogPost.astro | 10 +-- astro/src/components/photos/Album.astro | 10 +-- astro/src/components/photos/Album.tsx | 2 +- .../src/components/photos/CategoryIndex.astro | 1 - astro/src/components/photos/Photo.astro | 20 ++--- .../components/projects/ProjectIndex.astro | 15 ++-- .../src/components/projects/ProjectPost.astro | 10 +-- astro/src/components/web/Contact.astro | 4 +- astro/src/components/web/EquipmentTable.astro | 4 +- .../web/FrequentlyAskedQuestions.astro | 4 +- astro/src/components/web/Hero.astro | 2 +- astro/src/components/web/LastBlogs.astro | 12 +-- astro/src/components/web/LastProjects.astro | 12 +-- astro/src/components/web/Reviews.astro | 4 +- astro/src/components/web/TextWithImage.astro | 4 +- astro/src/components/web/UpcomingEvents.astro | 8 +- astro/src/components/webpage/Webpage.astro | 22 ++--- astro/src/content/blogs/blogs.ts | 10 +-- astro/src/content/footer/footer.ts | 80 +++++++++---------- astro/src/content/menu/menu.ts | 20 ++--- astro/src/content/pages/pages.ts | 2 +- astro/src/content/photos/albums.ts | 8 +- astro/src/content/photos/categories.ts | 4 +- astro/src/content/photos/photos.ts | 4 +- astro/src/content/projects/projects.ts | 6 +- astro/src/content/settings/robots.ts | 4 +- astro/src/content/settings/settings.ts | 4 +- astro/src/layouts/BlogLayout.astro | 10 +-- astro/src/layouts/PhotoLayout.astro | 1 - astro/src/layouts/ProjectLayout.astro | 10 +-- astro/src/layouts/WebpageLayout.astro | 6 +- astro/src/lib/colors.ts | 4 +- astro/src/lib/dates.ts | 4 +- astro/src/lib/pages.ts | 2 +- astro/src/lib/routing.ts | 28 +++---- astro/src/pages/[...route].astro | 2 +- astro/src/pages/robots.txt.ts | 4 +- astro/src/pages/sitemap/albums-[page].xml.ts | 2 +- astro/src/pages/sitemap/albums.xml.ts | 2 +- astro/src/pages/sitemap/blogs-[page].xml.ts | 2 +- astro/src/pages/sitemap/blogs.xml.ts | 2 +- astro/src/pages/sitemap/index.xml.ts | 2 +- astro/src/pages/sitemap/pages-[page].xml.ts | 2 +- astro/src/pages/sitemap/pages.xml.ts | 2 +- .../src/pages/sitemap/projects-[page].xml.ts | 2 +- astro/src/pages/sitemap/projects.xml.ts | 2 +- 47 files changed, 192 insertions(+), 197 deletions(-) diff --git a/astro/src/components/blogs/BlogIndex.astro b/astro/src/components/blogs/BlogIndex.astro index ca500cd..35d7240 100644 --- a/astro/src/components/blogs/BlogIndex.astro +++ b/astro/src/components/blogs/BlogIndex.astro @@ -1,11 +1,11 @@ --- -import { getAllPaginatedBlogs } from '@/content/blogs/blogs'; -import { getSettings } from '@/content/settings/settings'; -import CalendarIcon from '@/icons/CalendarIcon.astro'; -import { getImageSize, getImageUrl } from '@/lib/images'; -import { markdownToHtml } from '@/lib/markdown'; -import { getBlogRoute } from '@/lib/routing'; -import { Image } from 'astro:assets'; +import { getAllPaginatedBlogs } from "@/content/blogs/blogs"; +import { getSettings } from "@/content/settings/settings"; +import CalendarIcon from "@/icons/CalendarIcon.astro"; +import { getImageSize, getImageUrl } from "@/lib/images"; +import { markdownToHtml } from "@/lib/markdown"; +import { getBlogRoute } from "@/lib/routing"; +import { Image } from "astro:assets"; interface Props { page: BlogIndex; diff --git a/astro/src/components/blogs/BlogPost.astro b/astro/src/components/blogs/BlogPost.astro index a7865e7..ef24d87 100644 --- a/astro/src/components/blogs/BlogPost.astro +++ b/astro/src/components/blogs/BlogPost.astro @@ -1,10 +1,8 @@ --- -import CalendarIcon from '@/icons/CalendarIcon.astro'; -import { getImageSize, getImageUrl } from '@/lib/images'; -import { markdownToHtml } from '@/lib/markdown'; -import { getTypographyClasses } from '@/styles/markdownClasses'; -import { Image } from 'astro:assets'; -import LastBlogs from '../web/LastBlogs.astro'; +import CalendarIcon from "@/icons/CalendarIcon.astro"; +import { markdownToHtml } from "@/lib/markdown"; +import { getTypographyClasses } from "@/styles/markdownClasses"; +import { Image } from "astro:assets"; interface Props { blog: BlogPost; diff --git a/astro/src/components/photos/Album.astro b/astro/src/components/photos/Album.astro index 594f392..4567b71 100644 --- a/astro/src/components/photos/Album.astro +++ b/astro/src/components/photos/Album.astro @@ -1,9 +1,9 @@ --- -import { getAlbumRoute, getPhotoRoute } from '@/lib/routing'; -import { AlbumPhotos } from './Album.tsx'; -import { getImageSize, getImageUrl } from '@/lib/images'; -import { getSettings } from '@/content/settings/settings'; -import Pagination from '../common/Pagination.astro'; +import { getAlbumRoute, getPhotoRoute } from "@/lib/routing"; +import { AlbumPhotos } from "./Album.tsx"; +import { getImageSize, getImageUrl } from "@/lib/images"; +import { getSettings } from "@/content/settings/settings"; +import Pagination from "@/components/common/Pagination.astro"; interface Props { page: PhotoAlbumPage; diff --git a/astro/src/components/photos/Album.tsx b/astro/src/components/photos/Album.tsx index dbea3fa..d25c3f2 100644 --- a/astro/src/components/photos/Album.tsx +++ b/astro/src/components/photos/Album.tsx @@ -1,5 +1,5 @@ import { useEffect, useLayoutEffect, useRef, useState } from "preact/hooks"; -import { JustifiedLayout } from '@immich/justified-layout-wasm'; +import { JustifiedLayout } from "@immich/justified-layout-wasm"; import { LoadingSpinner } from "@/icons/jsx/loadingSpinner"; export function AlbumPhotos(props: { photos: PhotoAlbumGalleryItem[] }) { diff --git a/astro/src/components/photos/CategoryIndex.astro b/astro/src/components/photos/CategoryIndex.astro index f78a6e1..199baef 100644 --- a/astro/src/components/photos/CategoryIndex.astro +++ b/astro/src/components/photos/CategoryIndex.astro @@ -1,7 +1,6 @@ --- import { getAllCategories } from "@/content/photos/categories"; import { getSettings } from "@/content/settings/settings" -import { getImageUrl } from "@/lib/images"; import { getCategoryRoute } from "@/lib/routing"; import { Image } from "astro:assets"; diff --git a/astro/src/components/photos/Photo.astro b/astro/src/components/photos/Photo.astro index 89d660c..4769d28 100644 --- a/astro/src/components/photos/Photo.astro +++ b/astro/src/components/photos/Photo.astro @@ -1,14 +1,14 @@ --- -import { getAlbum } from '@/content/photos/albums'; -import { getSettings } from '@/content/settings/settings'; -import ChevronUp from '@/icons/ChevronUp.astro'; -import Download from '@/icons/Download.astro'; -import Close from '@/icons/Close.astro'; -import { getImageSize, getImageUrl } from '@/lib/images'; -import { getAlbumRoute, getPhotoRoute } from '@/lib/routing'; -import { getImage } from 'astro:assets'; -import { Image } from 'astro:assets'; -import { getPhotoHash } from '@/lib/hash'; +import { getAlbum } from "@/content/photos/albums"; +import { getSettings } from "@/content/settings/settings"; +import ChevronUp from "@/icons/ChevronUp.astro"; +import Download from "@/icons/Download.astro"; +import Close from "@/icons/Close.astro"; +import { getImageSize, getImageUrl } from "@/lib/images"; +import { getAlbumRoute, getPhotoRoute } from "@/lib/routing"; +import { getImage } from "astro:assets"; +import { Image } from "astro:assets"; +import { getPhotoHash } from "@/lib/hash"; interface Props { page: PhotoPage; diff --git a/astro/src/components/projects/ProjectIndex.astro b/astro/src/components/projects/ProjectIndex.astro index 421c4f2..e80c696 100644 --- a/astro/src/components/projects/ProjectIndex.astro +++ b/astro/src/components/projects/ProjectIndex.astro @@ -1,12 +1,11 @@ --- -import { getSettings } from '@/content/settings/settings'; -import { getAllPaginatedProjects } from '@/content/projects/projects'; -import { markdownToHtml } from '@/lib/markdown'; -import { Image } from 'astro:assets'; -import { getProjectRoute } from '@/lib/routing'; -import CalendarIcon from '@/icons/CalendarIcon.astro'; -import { getImageSize, getImageUrl } from '@/lib/images'; -import { promise } from 'astro:schema'; +import { getSettings } from "@/content/settings/settings"; +import { getAllPaginatedProjects } from "@/content/projects/projects"; +import { markdownToHtml } from "@/lib/markdown"; +import { Image } from "astro:assets"; +import { getProjectRoute } from "@/lib/routing"; +import CalendarIcon from "@/icons/CalendarIcon.astro"; +import { getImageSize, getImageUrl } from "@/lib/images"; interface Props { page: ProjectIndex; diff --git a/astro/src/components/projects/ProjectPost.astro b/astro/src/components/projects/ProjectPost.astro index b315a0c..5fbf627 100644 --- a/astro/src/components/projects/ProjectPost.astro +++ b/astro/src/components/projects/ProjectPost.astro @@ -1,9 +1,9 @@ --- -import CalendarIcon from '@/icons/CalendarIcon.astro'; -import { getImageSize, getImageUrl } from '@/lib/images'; -import { markdownToHtml } from '@/lib/markdown'; -import { getTypographyClasses } from '@/styles/markdownClasses'; -import { Image } from 'astro:assets'; +import CalendarIcon from "@/icons/CalendarIcon.astro"; +import { getImageSize } from "@/lib/images"; +import { markdownToHtml } from "@/lib/markdown"; +import { getTypographyClasses } from "@/styles/markdownClasses"; +import { Image } from "astro:assets"; interface Props { project: ProjectPost; diff --git a/astro/src/components/web/Contact.astro b/astro/src/components/web/Contact.astro index 95992f9..69cd2c4 100644 --- a/astro/src/components/web/Contact.astro +++ b/astro/src/components/web/Contact.astro @@ -1,6 +1,6 @@ --- -import { markdownToHtml } from '@/lib/markdown'; -import { Image } from 'astro:assets'; +import { markdownToHtml } from "@/lib/markdown"; +import { Image } from "astro:assets"; interface Props { contact: ContactComponent; diff --git a/astro/src/components/web/EquipmentTable.astro b/astro/src/components/web/EquipmentTable.astro index 3ed3717..7923c16 100644 --- a/astro/src/components/web/EquipmentTable.astro +++ b/astro/src/components/web/EquipmentTable.astro @@ -1,6 +1,6 @@ --- -import { markdownToHtml } from '@/lib/markdown'; -import { Image } from 'astro:assets'; +import { markdownToHtml } from "@/lib/markdown"; +import { Image } from "astro:assets"; interface Props { equipment: EquipmentTableComponent; diff --git a/astro/src/components/web/FrequentlyAskedQuestions.astro b/astro/src/components/web/FrequentlyAskedQuestions.astro index 5bd43f3..abbf378 100644 --- a/astro/src/components/web/FrequentlyAskedQuestions.astro +++ b/astro/src/components/web/FrequentlyAskedQuestions.astro @@ -1,6 +1,6 @@ --- -import { markdownToHtml } from '@/lib/markdown'; -import { QuestionList } from '@/components/web/subcomponents/QuestionList.tsx'; +import { markdownToHtml } from "@/lib/markdown"; +import { QuestionList } from "@/components/web/subcomponents/QuestionList.tsx"; interface Props { faq: FrequentlyAskedQuestionsComponent; diff --git a/astro/src/components/web/Hero.astro b/astro/src/components/web/Hero.astro index ef2d2e1..416ff78 100644 --- a/astro/src/components/web/Hero.astro +++ b/astro/src/components/web/Hero.astro @@ -1,5 +1,5 @@ --- -import { Image } from 'astro:assets'; +import { Image } from "astro:assets"; interface Props { hero: HeroComponent; diff --git a/astro/src/components/web/LastBlogs.astro b/astro/src/components/web/LastBlogs.astro index bbc1e8b..311b504 100644 --- a/astro/src/components/web/LastBlogs.astro +++ b/astro/src/components/web/LastBlogs.astro @@ -1,10 +1,10 @@ --- -import { getLastBlogs } from '@/content/blogs/blogs'; -import { getSettings } from '@/content/settings/settings'; -import CalendarIcon from '@/icons/CalendarIcon.astro'; -import { getImageSize, getImageUrl } from '@/lib/images'; -import { getBlogRoute } from '@/lib/routing'; -import { Image } from 'astro:assets'; +import { getLastBlogs } from "@/content/blogs/blogs"; +import { getSettings } from "@/content/settings/settings"; +import CalendarIcon from "@/icons/CalendarIcon.astro"; +import { getImageSize, getImageUrl } from "@/lib/images"; +import { getBlogRoute } from "@/lib/routing"; +import { Image } from "astro:assets"; interface Props { blogs: LastBlogsComponent; diff --git a/astro/src/components/web/LastProjects.astro b/astro/src/components/web/LastProjects.astro index 82aa246..2f991d8 100644 --- a/astro/src/components/web/LastProjects.astro +++ b/astro/src/components/web/LastProjects.astro @@ -1,10 +1,10 @@ --- -import { getLastProjects } from '@/content/projects/projects'; -import { getSettings } from '@/content/settings/settings'; -import CalendarIcon from '@/icons/CalendarIcon.astro'; -import { getImageSize, getImageUrl } from '@/lib/images'; -import { getProjectRoute } from '@/lib/routing'; -import { Image } from 'astro:assets'; +import { getLastProjects } from "@/content/projects/projects"; +import { getSettings } from "@/content/settings/settings"; +import CalendarIcon from "@/icons/CalendarIcon.astro"; +import { getImageSize, getImageUrl } from "@/lib/images"; +import { getProjectRoute } from "@/lib/routing"; +import { Image } from "astro:assets"; interface Props { projects: LastProjectsComponent; diff --git a/astro/src/components/web/Reviews.astro b/astro/src/components/web/Reviews.astro index 12e26cf..aacb924 100644 --- a/astro/src/components/web/Reviews.astro +++ b/astro/src/components/web/Reviews.astro @@ -1,6 +1,6 @@ --- -import { markdownToHtml } from '@/lib/markdown'; -import StarRating from './subcomponents/StarRating.astro'; +import { markdownToHtml } from "@/lib/markdown"; +import StarRating from "./subcomponents/StarRating.astro"; interface Props { reviews: ReviewListComponent; diff --git a/astro/src/components/web/TextWithImage.astro b/astro/src/components/web/TextWithImage.astro index d56b4dd..92d8464 100644 --- a/astro/src/components/web/TextWithImage.astro +++ b/astro/src/components/web/TextWithImage.astro @@ -1,6 +1,6 @@ --- -import { markdownToHtml } from '@/lib/markdown'; -import { Image } from 'astro:assets'; +import { markdownToHtml } from "@/lib/markdown"; +import { Image } from "astro:assets"; interface Props { textWithImage: TextWithImageComponent; diff --git a/astro/src/components/web/UpcomingEvents.astro b/astro/src/components/web/UpcomingEvents.astro index 2dbcf4c..c6b663b 100644 --- a/astro/src/components/web/UpcomingEvents.astro +++ b/astro/src/components/web/UpcomingEvents.astro @@ -1,8 +1,8 @@ --- -import CalendarIcon from '@/icons/CalendarIcon.astro'; -import { Image } from 'astro:assets'; -import { upcomingEvent as UpcomingEvent } from './subcomponents/UpcomingEvent'; -import { markdownToHtml } from '@/lib/markdown'; +import CalendarIcon from "@/icons/CalendarIcon.astro"; +import { Image } from "astro:assets"; +import { upcomingEvent as UpcomingEvent } from "./subcomponents/UpcomingEvent"; +import { markdownToHtml } from "@/lib/markdown"; interface Props { upcomingEvents: UpcomingEventsComponent; diff --git a/astro/src/components/webpage/Webpage.astro b/astro/src/components/webpage/Webpage.astro index cea7ed7..de4d8de 100644 --- a/astro/src/components/webpage/Webpage.astro +++ b/astro/src/components/webpage/Webpage.astro @@ -1,15 +1,15 @@ --- -import FrequentlyAskedQuestions from '../web/FrequentlyAskedQuestions.astro'; -import Hero from '../web/Hero.astro'; -import TextWithImage from '../web/TextWithImage.astro'; -import UpcomingEvents from '../web/UpcomingEvents.astro'; -import WallOfText from '../web/WallOfText.astro'; -import EquipmentTable from '../web/EquipmentTable.astro'; -import Reviews from '../web/Reviews.astro'; -import LastBlogs from '../web/LastBlogs.astro'; -import LastProjects from '../web/LastProjects.astro'; -import LastAlbums from '../web/LastAlbums.astro'; -import Contact from '../web/Contact.astro'; +import FrequentlyAskedQuestions from '@/components/web/FrequentlyAskedQuestions.astro'; +import Hero from '@/components/web/Hero.astro'; +import TextWithImage from '@/components/web/TextWithImage.astro'; +import UpcomingEvents from '@/components/web/UpcomingEvents.astro'; +import WallOfText from '@/components/web/WallOfText.astro'; +import EquipmentTable from '@/components/web/EquipmentTable.astro'; +import Reviews from '@/components/web/Reviews.astro'; +import LastBlogs from '@/components/web/LastBlogs.astro'; +import LastProjects from '@/components/web/LastProjects.astro'; +import LastAlbums from '@/components/web/LastAlbums.astro'; +import Contact from '@/components/web/Contact.astro'; interface Props { webpage: WebpageComponent[]; diff --git a/astro/src/content/blogs/blogs.ts b/astro/src/content/blogs/blogs.ts index 49b1e32..8be1d61 100644 --- a/astro/src/content/blogs/blogs.ts +++ b/astro/src/content/blogs/blogs.ts @@ -1,9 +1,9 @@ import { createDirectusConnection } from "@/lib/directus"; -import { print } from 'graphql'; -import getBlogs from '@/graphql/blogs/getBlogs.graphql'; -import getBlogPost from '@/graphql/blogs/getBlog.graphql'; -import getLastBlogPosts from '@/graphql/blogs/getLastBlogPosts.graphql'; -import getPaginatedBlogs from '@/graphql/blogs/getPaginatedBlogs.graphql'; +import { print } from "graphql"; +import getBlogs from "@/graphql/blogs/getBlogs.graphql"; +import getBlogPost from "@/graphql/blogs/getBlog.graphql"; +import getLastBlogPosts from "@/graphql/blogs/getLastBlogPosts.graphql"; +import getPaginatedBlogs from "@/graphql/blogs/getPaginatedBlogs.graphql"; import { formatDate } from "@/lib/dates"; import { getImageSize, getImageUrl } from "@/lib/images"; import { getImage } from "astro:assets"; diff --git a/astro/src/content/footer/footer.ts b/astro/src/content/footer/footer.ts index cfe5e95..6322721 100644 --- a/astro/src/content/footer/footer.ts +++ b/astro/src/content/footer/footer.ts @@ -1,95 +1,95 @@ import { createDirectusConnection } from "@/lib/directus"; -import { print } from 'graphql'; +import { print } from "graphql"; import type { Footer, FooterColumn, FooterSecondaryLink, FooterSocial } from "@/types/footers/footer"; -import getFooterQuery from '@/graphql/footer/getFooter.graphql'; +import getFooterQuery from "@/graphql/footer/getFooter.graphql"; import { getImageUrl } from "@/lib/images"; export async function getFooter(): Promise