Skip to content

Commit

Permalink
fix: history and common css naming
Browse files Browse the repository at this point in the history
  • Loading branch information
taga3s committed Aug 7, 2024
1 parent 1b83cf0 commit 59951c0
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 47 deletions.
6 changes: 3 additions & 3 deletions app/components/Footer.css.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { css } from "hono/css";

const Layout = css`
const footerLayout = css`
margin-top: 80px;
`;

const Content = css`
const footerContent = css`
padding: 20px 0;
`;

export { Layout, Content };
export { footerLayout, footerContent };
6 changes: 3 additions & 3 deletions app/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Content, Layout } from "./Footer.css";
import { footerContent, footerLayout } from "./Footer.css";

const Footer = () => {
return (
<footer class={Layout}>
<div class={Content}>
<footer class={footerLayout}>
<div class={footerContent}>
<small>&copy; 2024 taga3s</small>
</div>
</footer>
Expand Down
6 changes: 3 additions & 3 deletions app/components/Header.css.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { css } from "hono/css";

const Layout = css`
const headerContent = css`
padding: 32px 20px;
display: flex;
justify-content: end;
`;

const Links = css`
const headerNav = css`
display: flex;
gap: 24px;
`;

export { Layout, Links };
export { headerContent, headerNav };
16 changes: 6 additions & 10 deletions app/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import { Layout, Links } from "./Header.css";
import { headerContent, headerNav } from "./Header.css";

const Header = () => {
return (
<header class={Layout}>
<ul class={Links}>
<li>
<header>
<div class={headerContent}>
<nav class={headerNav}>
<a href="/">about me</a>
</li>
<li>
<a href="/history">history</a>
</li>
<li>
<a href="/works">works</a>
</li>
</ul>
</nav>
</div>
</header>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { css } from "hono/css";

const Layout = css``;

const Header = css`
const sectionHeader = css`
font-size: 24px;
font-weight: bold;
`;

export { Layout, Header };
export { sectionHeader };
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FC, JSX } from "hono/jsx";
import { Header, Layout } from "./Section.css";
import { sectionHeader } from "./Section.css";

type Props = {
title: string;
Expand All @@ -10,8 +10,8 @@ const Section: FC<Props> = (props) => {
const { title, children } = props;

return (
<section class={Layout}>
<h2 class={Header}>{title}</h2>
<section>
<h2 class={sectionHeader}>{title}</h2>
{children}
</section>
);
Expand Down
6 changes: 3 additions & 3 deletions app/components/history/HistoryEducationalBackground.css.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { css } from "hono/css";

const list = css`
const educationalBackgroundList = css`
display: flex;
flex-direction: column;
gap: 16px;
margin-top: 32px;
`;

const listItem = css`
const educationalBackgroundListItem = css`
display: flex;
gap: 16px;
`;

export { list, listItem };
export { educationalBackgroundList, educationalBackgroundListItem };
8 changes: 4 additions & 4 deletions app/components/history/HistoryEducationalBackground.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Section } from "../layout/Section";
import { list, listItem } from "./HistoryEducationalBackground.css";
import { Section } from "../Section";
import { educationalBackgroundList, educationalBackgroundListItem } from "./HistoryEducationalBackground.css";

const HistoryEducationalBackground = () => {
return (
<Section title="Educational background">
<ul class={list}>
<li class={listItem}>
<ul class={educationalBackgroundList}>
<li class={educationalBackgroundListItem}>
<span>2022年4月 - 現在</span>
<span>早稲田大学法学部在学中</span>
</li>
Expand Down
4 changes: 2 additions & 2 deletions app/components/history/HistoryPresenter.css.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { css } from "hono/css";

const layout = css`
const presenterLayout = css`
display: flex;
flex-direction: column;
gap: 48px;
`;

export { layout };
export { presenterLayout };
4 changes: 2 additions & 2 deletions app/components/history/HistoryPresenter.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from "hono/jsx";
import type { WorkExperience } from "../../api/workExperience";
import { HistoryEducationalBackground } from "./HistoryEducationalBackground";
import { layout } from "./HistoryPresenter.css";
import { presenterLayout } from "./HistoryPresenter.css";
import { HistoryWorkExperience } from "./HistoryWorkExperience";

type Props = {
Expand All @@ -12,7 +12,7 @@ const HistoryPresenter: FC<Props> = (props) => {
const { workExperience } = props;

return (
<div class={layout}>
<div class={presenterLayout}>
<HistoryWorkExperience workExperience={workExperience} />
<HistoryEducationalBackground />
</div>
Expand Down
6 changes: 3 additions & 3 deletions app/components/history/HistoryWorkExperience.css.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { css } from "hono/css";

const list = css`
const workExperienceList = css`
display: flex;
flex-direction: column;
gap: 16px;
margin-top: 32px;
`;

const description = css`
const workExperienceDescription = css`
display: flex;
flex-direction: column;
gap: 8px;
padding: 8px;
`;

export { list, description };
export { workExperienceList, workExperienceDescription };
9 changes: 4 additions & 5 deletions app/components/history/HistoryWorkExperience.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { FC } from "hono/jsx";
import type { WorkExperience } from "../../api/workExperience";
import { Section } from "../layout/Section";
import { list } from "./HistoryEducationalBackground.css";
import { description } from "./HistoryWorkExperience.css";
import { Section } from "../Section";
import { workExperienceDescription, workExperienceList } from "./HistoryWorkExperience.css";

type Props = {
workExperience: WorkExperience[];
Expand All @@ -13,7 +12,7 @@ const HistoryWorkExperience: FC<Props> = (props) => {

return (
<Section title="Work experience">
<ul class={list}>
<ul class={workExperienceList}>
{workExperience
.toSorted((a, b) => a.order - b.order)
.map((item) => (
Expand All @@ -22,7 +21,7 @@ const HistoryWorkExperience: FC<Props> = (props) => {
<summary>
{item.span}: {item.company}
</summary>
<p class={description}>
<p class={workExperienceDescription}>
<span>{item.description}</span>
<span>使用技術: {item.techStack}</span>
</p>
Expand Down
2 changes: 1 addition & 1 deletion app/components/profile/ProfileLinks.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CosenseIcon, GitHubIcon, QiitaIcon } from "../icons";
import { Section } from "../layout/Section";
import { Section } from "../Section";
import { cosense, github, linkCardContainer, qiita } from "./ProfileLinks.css";

const links = [
Expand Down
2 changes: 1 addition & 1 deletion app/components/profile/ProfilePhotos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { FC } from "hono/jsx";
import type { Photo } from "../../api/photos";
import { photoList, photoImage } from "./ProfilePhotos.css";
import PhotoClickWrapper from "../../islands/PhotoClickWrapper";
import { Section } from "../layout/Section";
import { Section } from "../Section";

type Props = {
photos: Photo[];
Expand Down

0 comments on commit 59951c0

Please sign in to comment.