Skip to content

Commit

Permalink
🧑‍💻 [deploy] 添加 GitHub 链接
Browse files Browse the repository at this point in the history
  • Loading branch information
pecasha committed Jul 8, 2024
1 parent 452449f commit e716278
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,14 @@
</Dropdown>
</Dropdown>
<div class="menu-button">
<div class="sort-filter"><FilterOutline size="lg" />排序 / 筛选</div>
<a class="github"
href="https://github.com/pecasha/china-stamp-large-denomination"
target={urlTarget}>
<GithubSolid size="lg" />
</a>
<div class="sort-filter">
<FilterOutline size="lg" />
</div>
</div>
</div>
</header>
Expand Down Expand Up @@ -121,13 +128,18 @@
ChevronLeftOutline,
ArrowUpOutline,
ArrowDownOutline,
FilterOutline
FilterOutline,
GithubSolid
} from "flowbite-svelte-icons";
import { dateParse } from "@pecasha/util";
import {
dateParse,
browserVersion
} from "@pecasha/util";
const stampImageUrlPrefix = dev ? "/images/" : "https://assets.stamp.pecasha.com/images/stamps/";
const imgEls: HTMLImageElement[] = [];
const stamp = new Stamp();
Expand All @@ -136,6 +148,7 @@
let listEl: HTMLUListElement;
let sort = 0;
let urlTarget = "_blank";
let filterValueMap: number[] = Object.keys(stamp.dataByValue).map(Number).sort((a, b) => a - b);
let filterValue: number[] = [];
Expand Down Expand Up @@ -201,6 +214,9 @@
}
onMount(() => {
if(browserVersion().mobile) {
urlTarget = "_self";
}
for(const img of imgEls) {
if(img.complete) {
img.classList.add("loaded");
Expand Down Expand Up @@ -326,7 +342,7 @@
.menu-button {
.align(center);
height: 100%;
gap: 20px;
gap: 10px;
> * {
.align(v-center, inline-flex);
height: 100%;
Expand Down

0 comments on commit e716278

Please sign in to comment.