diff --git a/.prettierignore b/.prettierignore index a37bf70..60428be 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,4 @@ -src/components/AutoDarkMode.astro +src/components/AgeRestrictedScriptInline.astro +src/components/DarkModeScriptInline.astro .astro/ dist/ diff --git a/README.md b/README.md index 6492680..8e6719f 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,10 @@ npm run prettier # Prettier formatting The following optional environment variable can be set within a `.env` file: -| Name | Type | Description | -| --------------- | ------- | ------------------------------------------------------------------------------------------------ | -| `APACHE_CONFIG` | boolean | If set to true, generates an `.htaccess` Apache config file at the root of the output directory. | +| Name | Type | Description | +| ------------------------- | ------- | ------------------------------------------------------------------------------------------------ | +| `APACHE_CONFIG` | boolean | If set to true, generates an `.htaccess` Apache config file at the root of the output directory. | +| `ENABLE_VIEW_TRANSITIONS` | boolean | If set to true, enables Astro's View Transitions API (i.e. Single-Page App mode). | ### Build and deploy to remote diff --git a/astro.config.mjs b/astro.config.mjs index 9a3d231..987cf22 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -15,11 +15,13 @@ export default defineConfig({ outDir: "./dist", redirects: { "/tos": "/terms_of_service", + "/contact": "/", }, experimental: { env: { schema: { APACHE_CONFIG: envField.boolean({ context: "server", access: "public", default: false }), + ENABLE_VIEW_TRANSITIONS: envField.boolean({ context: "client", access: "public", default: false }), }, }, }, diff --git a/package-lock.json b/package-lock.json index da02835..875f3d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "badmanners.xyz", - "version": "2.0.4", + "version": "2.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "badmanners.xyz", - "version": "2.0.4", + "version": "2.1.0", "hasInstallScript": true, "dependencies": { "@astrojs/check": "^0.9.2", diff --git a/package.json b/package.json index 809e450..d962a26 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "badmanners.xyz", "type": "module", - "version": "2.0.4", + "version": "2.1.0", "scripts": { "postinstall": "astro sync", "dev": "astro dev", diff --git a/public/licenses.txt b/public/licenses.txt index 1e6c3bd..9019f16 100644 --- a/public/licenses.txt +++ b/public/licenses.txt @@ -8,7 +8,7 @@ The Jost* typeface is copyrighted by indestructible type* and is distributed und The SVG icons for Bluesky, Codeberg, Discord, Itch.io, Keybase, GitHub, GitLab, Mastodon, Picarto, Signal, Steam, Telegram, Twitch, Weasyl, and X were created for the Simple Icons project and are distributed under the Creative Commons Zero v1.0 Universal license: https://creativecommons.org/publicdomain/zero/1.0/ -The SVG icons for Eka's Portal, Fur Affinity, Inkbunny, Itaku, Neocities, SoFurry, and SubscribeStar were created by me (Bad Manners) from their respective logos. They are available for free use under the Creative Commons Zero v1.0 Universal license: https://creativecommons.org/publicdomain/zero/1.0/ +The SVG icons for Cohost, Eka's Portal, Fur Affinity, Inkbunny, Itaku, Neocities, SoFurry, and SubscribeStar were edited by me (Bad Manners) from their respective logos, for personal use. The generic SVG icons were created by Font Awesome and are distributed under CC-BY-4.0: https://creativecommons.org/licenses/by/4.0/ diff --git a/src/components/AgeRestrictedModal.astro b/src/components/AgeRestrictedModal.astro index c74293c..582f34b 100644 --- a/src/components/AgeRestrictedModal.astro +++ b/src/components/AgeRestrictedModal.astro @@ -1,82 +1,87 @@ --- +import AgeRestrictedScriptInline from "./AgeRestrictedScriptInline.astro"; import IconTriangleExclamation from "./icons/IconTriangleExclamation.astro"; --- - + + + diff --git a/src/components/AgeRestrictedScriptInline.astro b/src/components/AgeRestrictedScriptInline.astro new file mode 100644 index 0000000..8f3f72f --- /dev/null +++ b/src/components/AgeRestrictedScriptInline.astro @@ -0,0 +1,4 @@ +--- +--- + + diff --git a/src/components/AutoDarkMode.astro b/src/components/AutoDarkMode.astro deleted file mode 100644 index 67423e2..0000000 --- a/src/components/AutoDarkMode.astro +++ /dev/null @@ -1,4 +0,0 @@ ---- ---- - - diff --git a/src/components/DarkModeScript.astro b/src/components/DarkModeScript.astro index 16645fc..822b67a 100644 --- a/src/components/DarkModeScript.astro +++ b/src/components/DarkModeScript.astro @@ -1,13 +1,15 @@ --- -import DarkModeInline from "./AutoDarkMode.astro"; +import DarkModeScriptInline from "./DarkModeScriptInline.astro"; --- - + diff --git a/src/components/DarkModeScriptInline.astro b/src/components/DarkModeScriptInline.astro new file mode 100644 index 0000000..bef932d --- /dev/null +++ b/src/components/DarkModeScriptInline.astro @@ -0,0 +1,4 @@ +--- +--- + + diff --git a/src/components/NavHeader.astro b/src/components/NavHeader.astro index fc29e14..aad9cd0 100644 --- a/src/components/NavHeader.astro +++ b/src/components/NavHeader.astro @@ -8,7 +8,6 @@ const navRoutes: NavRoute[] = [ { path: "/", name: "Home" }, { path: "/about", name: "About me" }, { path: "/work", name: "My work" }, - { path: "/contact", name: "Contact" }, ]; const isCurrentRoute = (navRoute: NavRoute) => Astro.url.pathname == navRoute.path; diff --git a/src/components/icons/IconClone.astro b/src/components/icons/IconClone.astro deleted file mode 100644 index 0f5a17c..0000000 --- a/src/components/icons/IconClone.astro +++ /dev/null @@ -1,15 +0,0 @@ ---- -import SVGIcon from "./SVGIcon.astro"; - -type Props = { - width: string; - height: string; - class?: string; -}; ---- - - - - diff --git a/src/components/icons/IconEllipsis.astro b/src/components/icons/IconEllipsis.astro deleted file mode 100644 index 6163b0e..0000000 --- a/src/components/icons/IconEllipsis.astro +++ /dev/null @@ -1,15 +0,0 @@ ---- -import SVGIcon from "./SVGIcon.astro"; - -type Props = { - width: string; - height: string; - class?: string; -}; ---- - - - - diff --git a/src/components/icons/brands/IconCohost.astro b/src/components/icons/brands/IconCohost.astro new file mode 100644 index 0000000..3583cce --- /dev/null +++ b/src/components/icons/brands/IconCohost.astro @@ -0,0 +1,15 @@ +--- +import SVGIcon from "../SVGIcon.astro"; + +type Props = { + width: string; + height: string; + class?: string; +}; +--- + + + + diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 5210603..9e2483d 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -1,11 +1,13 @@ --- +import { ViewTransitions } from "astro:transitions"; +import { ENABLE_VIEW_TRANSITIONS } from "astro:env/client"; import "../styles/base.css"; import "../styles/fonts.css"; import DarkModeScript from "../components/DarkModeScript.astro"; -import AgeRestrictedModal from "../components/AgeRestrictedModal.astro"; import NavHeader from "../components/NavHeader.astro"; import IconSun from "../components/icons/IconSun.astro"; import IconMoon from "../components/icons/IconMoon.astro"; +import AgeRestrictedModal from "../components/AgeRestrictedModal.astro"; type Props = { pageTitle?: string; @@ -44,6 +46,7 @@ const title = pageTitle ? `${pageTitle} | Bad Manners` : "Bad Manners"; + {ENABLE_VIEW_TRANSITIONS ? : null}
@@ -55,13 +58,13 @@ const title = pageTitle ? `${pageTitle} | Bad Manners` : "Bad Manners";