diff --git a/public/favicon.svg b/public/favicon.svg deleted file mode 100644 index f4e1ad5..0000000 --- a/public/favicon.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/public/hero.jpg b/public/hero.jpg deleted file mode 100644 index a42ffcb..0000000 Binary files a/public/hero.jpg and /dev/null differ diff --git a/public/lighthouse.jpg b/public/lighthouse.jpg deleted file mode 100644 index 4a77514..0000000 Binary files a/public/lighthouse.jpg and /dev/null differ diff --git a/public/preview.jpg b/public/preview.jpg deleted file mode 100644 index 46312cb..0000000 Binary files a/public/preview.jpg and /dev/null differ diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro index 67ff8d2..7a09621 100644 --- a/src/components/BaseHead.astro +++ b/src/components/BaseHead.astro @@ -1,8 +1,10 @@ --- import siteConfig from '@/site-config' +import { getImage } from 'astro:assets' import '@/styles/global.css' import '@/styles/prose.css' import '@/styles/dot.css' +import faviconSrc from '../images/favicon.png' interface Props { title?: string @@ -26,6 +28,14 @@ const resolvedImage = image?.src } : undefined +const appleTouchIcon = await getImage({ + src: faviconSrc, + width: 180, + height: 180, + format: 'png' +}) +const faviconx = await getImage({ src: faviconSrc, format: 'png' }) + const canonicalURL = new URL(Astro.request.url, Astro.site) function formatCanonicalURL(url: string | URL) { @@ -41,9 +51,14 @@ function formatCanonicalURL(url: string | URL) { {title} + - + + + + + diff --git a/src/components/Header.vue b/src/components/Header.vue index 4d16806..25d14d7 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -4,6 +4,8 @@ import { computed, onMounted, ref, unref } from 'vue' import ThemeToggle from './ThemeToggle.vue' import siteConfig from '@/site-config' import { getLinkTarget } from '@/utils/link' +import { getImage } from 'astro:assets' +import faviconSrc from '../images/favicon.png' const navLinks = siteConfig.header.navLinks || [] @@ -26,6 +28,8 @@ const { y: scroll } = useWindowScroll() const oldScroll = ref(unref(scroll)) +const faviconx = await getImage({ src: faviconSrc, format: 'png' }) + onMounted(() => { const navMask = document.querySelector('.nav-drawer-mask') as HTMLElement @@ -81,7 +85,7 @@ function toggleNavDrawer() { >
- +
- -
diff --git a/src/components/ListPosts.vue b/src/components/ListPosts.vue index 66d3ae2..39474e5 100644 --- a/src/components/ListPosts.vue +++ b/src/components/ListPosts.vue @@ -61,7 +61,6 @@ function getYear(date: Date | string | number) { ยท {{ post.tags[0].name }} -
{{ post.excerpt }}
diff --git a/src/images/favicon.png b/src/images/favicon.png new file mode 100755 index 0000000..e968161 Binary files /dev/null and b/src/images/favicon.png differ diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 6d648e9..5d9ae61 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -12,7 +12,6 @@ const { ...head } = Astro.props - diff --git a/src/pages/manifest.json.astro b/src/pages/manifest.json.astro new file mode 100644 index 0000000..c07ecb7 --- /dev/null +++ b/src/pages/manifest.json.astro @@ -0,0 +1,45 @@ +--- +import type { APIRoute } from 'astro' +import { getImage } from 'astro:assets' +import favicon from '../images/favicon.png' +import siteConfig from '@/site-config' + +const faviconPngSizes = [192, 512] + +export const GET: APIRoute = async () => { + const icons = await Promise.all( + faviconPngSizes.map(async (size) => { + const image = await getImage({ + src: favicon, + width: size, + height: size, + format: 'png' + }) + return { + src: image.src, + type: `image/${image.options.format}`, + sizes: `${image.options.width}x${image.options.height}` + } + }) + ) + + const manifest = { + name: siteConfig.title, + short_name: siteConfig.title.split(' ')[0], + description: siteConfig.description, + start_url: '/', + display: 'standalone', + background_color: '#ffffff', + theme_color: '#000000', + id: "https://baalajimaestro.ptr.moe/", + icons + } + + return new Response(JSON.stringify(manifest), { + status: 200, + headers: { + 'Content-Type': 'application/json' + } + }) +} +--- diff --git a/src/pages/projects/data.ts b/src/pages/projects/data.ts deleted file mode 100644 index 37e4a6e..0000000 --- a/src/pages/projects/data.ts +++ /dev/null @@ -1,88 +0,0 @@ -import type { ProjectData } from '@/types' - -export const projectData: ProjectData = [ - { - title: 'Projects Group', - projects: [ - { - text: 'Project Name', - description: 'Your project description information is a long piece of text.', - icon: 'i-carbon-campsite', - href: '/', - }, - { - text: 'Project Name', - description: 'Your project description information is a long piece of text.', - icon: 'i-carbon-campsite', - href: '/', - }, - ], - }, - { - title: 'Projects Group', - projects: [ - { - text: 'Project Name', - description: 'Your project description information is a long piece of text.', - icon: 'i-carbon-campsite', - href: '/', - }, - { - text: 'Project Name', - description: 'Your project description information is a long piece of text.', - icon: 'i-carbon-campsite', - href: '/', - }, - { - text: 'Project Name', - description: 'Your project description information is a long piece of text.', - icon: 'i-carbon-campsite', - href: '/', - }, - ], - }, - { - title: 'Project Name', - projects: [], - }, - { - title: 'Projects Group', - projects: [ - { - text: 'Project Name', - description: 'Your project description information is a long piece of text.', - icon: 'i-carbon-campsite', - href: '/', - }, - { - text: 'Project Name', - description: 'Your project description information is a long piece of text.', - icon: 'i-carbon-campsite', - href: '/', - }, - { - text: 'Project Name', - description: 'Your project description information is a long piece of text.', - icon: 'i-carbon-campsite', - href: '/', - }, - { - text: 'Project Name', - description: 'Your project description information is a long piece of text.', - icon: 'i-carbon-campsite', - href: '/', - }, - ], - }, - { - title: 'Projects Group', - projects: [ - { - text: 'Project Name', - description: 'Your project description information is a long piece of text.', - icon: 'i-carbon-campsite', - href: '/', - }, - ], - }, -] diff --git a/src/pages/projects/index.astro b/src/pages/projects/index.astro deleted file mode 100644 index c848955..0000000 --- a/src/pages/projects/index.astro +++ /dev/null @@ -1,27 +0,0 @@ ---- -import { projectData } from './data' -import BaseLayout from '@/layouts/BaseLayout.astro' -import ListProjects from '@/components/ListProjects.vue' ---- - - -

Projects

-
- { - projectData.length > 0 && ( -
- {projectData.map((i) => ( -
-

- - {i.title} - -

- -
- ))} -
- ) - } -
-
diff --git a/src/site-config.ts b/src/site-config.ts index f16db26..1bb3eed 100644 --- a/src/site-config.ts +++ b/src/site-config.ts @@ -1,56 +1,19 @@ export const siteConfig = { author: 'baalajimaestro', title: 'baalajimaestro', - subtitle: 'Personal Website & Blog for baalajimaestro', - description: 'DevOps Engineer and Networking Enthusiast.', - image: { - src: '/hero.jpg', - alt: 'Website Main Image', - }, + subtitle: 'DevOps Engineer and Networking Enthusiast.', + description: 'Personal Website & Blog for baalajimaestro', email: 'baalajimaestro@ptr.moe', - socialLinks: [ - { - text: 'GitHub', - href: '', - icon: 'i-simple-icons-github', - header: 'i-ri-github-line', - }, - { - text: 'Twitter', - href: '', - icon: 'i-simple-icons-x', - header: 'i-ri-twitter-x-line', - }, - { - text: 'Linkedin', - href: '', - icon: 'i-simple-icons-linkedin', - }, - { - text: 'Instagram', - href: '', - icon: 'i-simple-icons-instagram', - }, - { - text: 'Youtube', - href: '', - icon: 'i-simple-icons-youtube', - }, - ], header: { logo: { - src: '/favicon.svg', + src: '/images/favicon.png', alt: 'Logo Image', }, navLinks: [ { text: 'Blog', href: '/blog', - }, - { - text: 'Projects', - href: '/projects', - }, + } ], }, page: {