feat: add browser AI connection guide and calculator instructions
Publish GitHub Pages output / publish (push) Successful in 43s
Publish GitHub Pages output / publish (push) Successful in 43s
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import AnalyticsConsent from '../src/lib/components/AnalyticsConsent.svelte';
|
||||
import AssistantConnection from '../src/lib/components/AssistantConnection.svelte';
|
||||
import AiPage from '../src/routes/tools/ai/+page.svelte';
|
||||
import HomePage from '../src/routes/+page.svelte';
|
||||
import CardsPage from '../src/routes/cards/+page.svelte';
|
||||
import AnalysisPage from '../src/routes/analysis/+page.svelte';
|
||||
@@ -26,6 +28,7 @@
|
||||
['/rating', RatingPage],
|
||||
['/combination', CombinationPage],
|
||||
['/tools', ToolsPage],
|
||||
['/tools/ai', AiPage],
|
||||
['/compare', ComparePage],
|
||||
['/tools/random', ToolsPage],
|
||||
['/tools/holo-work', HoloWorkPage],
|
||||
@@ -63,13 +66,14 @@
|
||||
const eventTimer = window.setInterval(() => eventNow = Date.now(), 1_000);
|
||||
const rewriteInternalLinks = () => {
|
||||
for (const anchor of document.querySelectorAll<HTMLAnchorElement>('a[href^="/"]')) {
|
||||
if (anchor.hasAttribute('download') || anchor.target === '_blank') continue;
|
||||
anchor.href = `#${anchor.getAttribute('href')}`;
|
||||
}
|
||||
};
|
||||
const handleClick = (event: MouseEvent) => {
|
||||
const target = event.target instanceof Element ? event.target.closest<HTMLAnchorElement>('a[href]') : null;
|
||||
const href = target?.getAttribute('href');
|
||||
if (!href?.startsWith('/') || target?.target === '_blank') return;
|
||||
if (!href?.startsWith('/') || target?.target === '_blank' || target?.hasAttribute('download')) return;
|
||||
event.preventDefault();
|
||||
window.location.hash = `#${href}`;
|
||||
};
|
||||
@@ -119,6 +123,7 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<AssistantConnection />
|
||||
<svelte:component this={CurrentPage} />
|
||||
|
||||
<AnalyticsConsent pagePath={currentPath} />
|
||||
|
||||
Reference in New Issue
Block a user