Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
Feature/issue38 add home screen (#40)
Browse files Browse the repository at this point in the history
ホーム画面の実装を行いました

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
yui-szk and pre-commit-ci[bot] authored Sep 5, 2024
1 parent 2821f30 commit 3ae0f11
Show file tree
Hide file tree
Showing 7 changed files with 354 additions and 9 deletions.
Binary file added public/audio/ice.mp3
Binary file not shown.
168 changes: 168 additions & 0 deletions public/images/cocktail-glass-empty.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions public/images/cocktail-glass.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 26 additions & 3 deletions src/components/CreateMessageTop.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
import { css } from "@hono/hono/css";
import { css, keyframes } from "@hono/hono/css";
import { WithHTML } from "../layout/WithHTML.tsx";

const fadeIn = keyframes`
from {
opacity: 0;
}
to{
opacity: 1;
}
`;

const fadeAnimation = css`
animation: ${fadeIn} 3s forwards;
`;

const imageStyle = css`
height: 85vh;
display: flex;
Expand Down Expand Up @@ -34,9 +47,19 @@ const buttonStyle = css`
export const CreateMessageTop = () => {
return (
<WithHTML>
<div>
<div class={fadeAnimation}>
<audio
id="ice-audio"
preload="auto"
autoplay
src="/public/audio/ice.mp3"
>
</audio>
<div class={imageStyle}>
<img src="/public/images/cocktail-glass.svg" alt="empty glass" />
<img
src="/public/images/cocktail-glass-empty.svg"
alt="empty glass"
/>
</div>
<div class={buttonStyle}>
<a href="./select">
Expand Down
5 changes: 4 additions & 1 deletion src/components/router.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Hono } from "@hono/hono";

import { Home } from "../pages/Home.tsx";
import { CreateMessageTop } from "./CreateMessageTop.tsx";
import { CreateMessageSelect } from "./CreateMessageSelect.tsx";
import { CreateMessageCheck } from "./CreateMessageCheck.tsx";
Expand All @@ -10,6 +12,7 @@ import { CreateMessageCheck } from "./CreateMessageCheck.tsx";
export const createMessage = new Hono();

createMessage
.get("/", (ctx) => ctx.html(<CreateMessageTop />))
.get("/", (ctx) => ctx.html(<Home />))
.get("/create", (ctx) => ctx.html(<CreateMessageTop />))
.get("/select", (ctx) => ctx.html(<CreateMessageSelect />))
.get("/check", (ctx) => ctx.html(<CreateMessageCheck />));
3 changes: 3 additions & 0 deletions src/layout/WithHTML.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const layoutStyle = css`
padding: 0;
box-sizing: border-box;
--font-jp: "Noto Serif JP", serif;
--font-en: "Cormorant Garamond", serif;
--color-black: #000000;
--color-white: #ffffff;
--color-main: #443d3a;
Expand Down
Loading

0 comments on commit 3ae0f11

Please sign in to comment.