diff --git a/.gitea/disabled_workflows/playwright.yml b/.gitea/disabled_workflows/playwright.yml deleted file mode 100644 index 2812391..0000000 --- a/.gitea/disabled_workflows/playwright.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Playwright Tests -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] -jobs: - test: - timeout-minutes: 60 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: lts/* - - name: Install dependencies - run: npm ci - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - run: npx playwright test - - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 diff --git a/src/components/CustomHtmlWrappers/H2.astro b/src/components/CustomHtmlWrappers/H2.astro deleted file mode 100644 index 5b2688e..0000000 --- a/src/components/CustomHtmlWrappers/H2.astro +++ /dev/null @@ -1,5 +0,0 @@ ---- - ---- - -

{Astro.props.text}

diff --git a/src/components/CustomHtmlWrappers/H3.astro b/src/components/CustomHtmlWrappers/H3.astro deleted file mode 100644 index 49affef..0000000 --- a/src/components/CustomHtmlWrappers/H3.astro +++ /dev/null @@ -1,5 +0,0 @@ ---- - ---- - -

{Astro.props.text}

diff --git a/src/components/H1.astro b/src/components/H1.astro new file mode 100644 index 0000000..6778a2c --- /dev/null +++ b/src/components/H1.astro @@ -0,0 +1,5 @@ +--- + +--- + +

diff --git a/src/components/H2.astro b/src/components/H2.astro new file mode 100644 index 0000000..d31b002 --- /dev/null +++ b/src/components/H2.astro @@ -0,0 +1,5 @@ +--- + +--- + +

diff --git a/src/components/H3.astro b/src/components/H3.astro new file mode 100644 index 0000000..5933837 --- /dev/null +++ b/src/components/H3.astro @@ -0,0 +1,5 @@ +--- + +--- + +

diff --git a/src/components/InlineLink.astro b/src/components/InlineLink.astro index c3cc47b..a302e00 100644 --- a/src/components/InlineLink.astro +++ b/src/components/InlineLink.astro @@ -1,14 +1,30 @@ --- -interface Props { +import type { ComponentPropsBase } from "@interfaces/components.ts"; + +interface Props extends ComponentPropsBase { href: string; target?: string; } -const { href, target = "_blank" } = Astro.props; +const { class: className, href, target } = Astro.props; + +let finalTarget: string | undefined = target; + +if (target === undefined) { + if (href.startsWith("/")) { + finalTarget = ""; + } else { + finalTarget = "_blank"; + } +} --- <> - + diff --git a/src/components/NestedNavbarEntries.astro b/src/components/NestedNavbarEntries.astro index dac0cae..300370b 100644 --- a/src/components/NestedNavbarEntries.astro +++ b/src/components/NestedNavbarEntries.astro @@ -14,6 +14,8 @@ const getHrefPath = (entry: navLink): string => { : "/" + (paths && paths.length ? [...paths, entry.path].join("/") : entry.path); }; + +const { pathname } = Astro.url; ---