Skip to content

Commit

Permalink
[demo]Fix next url
Browse files Browse the repository at this point in the history
  • Loading branch information
dufu1991 committed Dec 13, 2024
1 parent 3949b18 commit dc8bc37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion packages/stdf/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
};
</script>

{$page.url.pathname}
<div class="sticky top-0 z-[100]">
<NavBar
title={$page.url.pathname === '/'
Expand All @@ -152,8 +153,9 @@
</a>
</div>
<div class="h-12 w-10">
<!-- main -> next -->
<a
href={`https://stdf.design${$page.url.pathname === '/' ? '' : `/#/components?nav=${$page.url.pathname.substring(7)}&tab=0`}`}
href={`https://next.stdf.design${$page.url.pathname === '/' ? '' : `/components?nav=${$page.url.pathname.split('/')[1]}&tab=0`}`}
target="_blank"
rel="noreferrer"
>
Expand Down
7 changes: 4 additions & 3 deletions packages/stdf/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
<path class="fill-dark dark:fill-primary" d="M20 30V0L0 50H20V80L40 30H20Z" />
</svg>
</div>
<a href="https://stdf.design" target="_blank" rel="noreferrer">
<div class="text-center text-lg underline">stdf.design</div>
<!-- main -> next -->
<a href="https://next.stdf.design" target="_blank" rel="noreferrer">
<div class="text-center text-lg underline">next.stdf.design</div>
</a>
<div class="flex flex-col py-4">
<div>
Expand All @@ -48,7 +49,7 @@
{/each}
</div>
<div class="p-4">{isZh ? '当前组件总数:' : 'Current number of components: '}{menuListArr.length}</div>
<div class="flex justify-around p-4 text-xs text-primary underline dark:text-dark">
<div class="text-primary dark:text-dark flex justify-around p-4 text-xs underline">
<button on:click={changeLangFunc} class="text-primary dark:text-dark">{isZh ? 'English' : '简体中文'}</button>
</div>
</div>

0 comments on commit dc8bc37

Please sign in to comment.