Skip to content

Commit 65403e8

Browse files
committed
refactor: コンポーネントの命名規則を変更
- ついでにロゴタイプのフォントスタイルを変更
1 parent 2650c40 commit 65403e8

11 files changed

+33
-49
lines changed

components/cards/card.tsx components/Card.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { CardDetail } from "@interfaces/card.ts";
22

3-
/**
4-
* @params CardDetail カードの詳細
5-
*/
63
export default function Card({ title, count, icon }: CardDetail) {
74
return (
85
<div class="px-8 py-4 w-80 md:w-96 h-32 flex flex-row justify-between items-center bg-card rounded-md shadow-sm">

components/cards/index.tsx components/Cards.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Card from "@components/cards/card.tsx";
1+
import Card from "@components/Card.tsx";
22

33
import { CardDetail } from "@interfaces/card.ts";
44

File renamed without changes.

components/footer/index.tsx components/Footer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Link from "@components/common/link.tsx";
1+
import Link from "@components/Link.tsx";
22

33
export default function Footer() {
44
return (

components/Header.tsx

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import LinkButton from "@components/LinkButton.tsx";
2+
3+
export default function Header() {
4+
return (
5+
<div class="w-full px-4 py-10 flex flex-row justify-between items-center">
6+
<div class="flex items-center">
7+
<i class="ti ti-at text-3xl md:text-4xl" />
8+
<span class="ml-3 font-medium text-md md:text-lg">
9+
<p>im@sparql</p>
10+
<p>Data Dashboard</p>
11+
</span>
12+
</div>
13+
<div class="space-x-2 md:space-x-4">
14+
<LinkButton title="im@sparql" href="https://sparql.crssnky.xyz/imas/">
15+
<i class="ti ti-database text-xl md:text-2xl" />
16+
</LinkButton>
17+
<LinkButton
18+
title="GitHub"
19+
href="https://github.com/arrow2nd/imasparql-data-dashboard"
20+
>
21+
<i class="ti ti-brand-github text-xl md:text-2xl" />
22+
</LinkButton>
23+
</div>
24+
</div>
25+
);
26+
}
File renamed without changes.

components/common/linkButton.tsx components/LinkButton.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Link from "@components/common/link.tsx";
21
import { JSX } from "preact";
2+
import Link from "@components/Link.tsx";
33

44
export default function LinkButton(
55
props: JSX.HTMLAttributes<HTMLAnchorElement>

components/header/index.tsx

-11
This file was deleted.

components/header/links.tsx

-17
This file was deleted.

components/header/logo.tsx

-11
This file was deleted.

routes/index.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Handlers, PageProps } from "$fresh/server.ts";
22

3-
import Cards from "@components/cards/index.tsx";
4-
import Err from "@components/error/index.tsx";
5-
import Header from "@components/header/index.tsx";
6-
import Footer from "@components/footer/index.tsx";
3+
import Cards from "@components/Cards.tsx";
4+
import Err from "@components/Error.tsx";
5+
import Header from "@components/Header.tsx";
6+
import Footer from "@components/Footer.tsx";
77

88
import { fetchCardDetails } from "@libs/fetch.ts";
99

0 commit comments

Comments
 (0)