Skip to content

Commit 17986be

Browse files
committed
feat: add qiita icon link
1 parent a4d234e commit 17986be

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
- Svelte
88
- unified, remark, rehype ...
99
- @octokit/graphql
10-
- algoliasearch
1110
- devDependencies
1211
- husky
1312
- biomejs

public/assets/qiita-icon.png

8.94 KB
Loading

site.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ export default {
77
docsGitHubRepositoryExpression: "HEAD:cv/index.md",
88
zenn: 'oriverk',
99
x: 'not_you_die',
10+
qiita: 'OriverK'
1011
}

src/components/Hero.svelte

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import siteConfig from "../../site.config";
55
import type IconType from "./ui/Icon.svelte";
66
import Icon from "./ui/Icon.svelte";
77
8-
const { github, zenn, x } = siteConfig;
8+
const { github, zenn, x, qiita } = siteConfig;
99
10+
// @ts-ignore
1011
type Link = Pick<ComponentProps<IconType>, "type" | "size"> & {
1112
href: string;
1213
title: string;
@@ -67,6 +68,16 @@ const links: Link[] = [
6768
{#each links as args}
6869
{@render link(args)}
6970
{/each}
71+
<a
72+
class="hero-link qiita"
73+
href={urlJoin("https://qiita.com", qiita)}
74+
target="_blank"
75+
rel="noopener noreferrer"
76+
title="Qiita"
77+
>
78+
<img src="/assets/qiita-icon.png" alt="logo" />
79+
<span class="sr-only">Qiita link</span>
80+
</a>
7081
</div>
7182
</div>
7283

@@ -119,6 +130,9 @@ const links: Link[] = [
119130
&:hover {
120131
background-color: rgba(0 0 0 / 0.3);
121132
}
122-
}
123133
134+
&.qiita > img {
135+
width: 2rem;
136+
}
137+
}
124138
</style>

src/components/ui/Icon.svelte

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ type Props = {
88
| "github"
99
| "zenn"
1010
| "x"
11-
| "algolia"
1211
| "pencil"
1312
| "magnifyingGlass"
1413
| "repository"
@@ -97,11 +96,6 @@ const { type, size, color, style }: Props = $props();
9796
mask-image: url('/assets/x.svg');
9897
}
9998
100-
.algolia::before {
101-
mask-image: url('/assets/algolia.svg');
102-
aspect-ratio: 572 / 64;
103-
}
104-
10599
/* general icon */
106100
.pencil::before {
107101
mask-image: url('/assets/pencil.svg');

0 commit comments

Comments
 (0)