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

Commit

Permalink
Merge branch 'main' into feat-jsx-api
Browse files Browse the repository at this point in the history
  • Loading branch information
5ouma authored Sep 5, 2024
2 parents b036b52 + 155b112 commit 6ab91a4
Show file tree
Hide file tree
Showing 9 changed files with 369 additions and 22 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.
11 changes: 5 additions & 6 deletions src/components/CreateMessageCheck.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,16 @@ const buttonStyle = css`
border-radius: 0.5rem;
width: 7.5rem;
height: 7.25rem;
display: flex;
text-align: center;
justify-content: center;
a {
display: block;
color: var(--color-black);
text-decoration: none;
padding: 2rem 1.5rem;
font-size: 1rem;
padding: 2.9rem 1rem;
}
`;

Expand All @@ -84,6 +86,7 @@ const sendButtonStyle = css`
a {
color: var(--color-white);
padding: 2.1rem 1.5rem;
}
`;

Expand Down Expand Up @@ -131,11 +134,7 @@ export const CreateMessageCheck = () => {

<div class={buttonContainerStyle}>
<div class={buttonStyle}>
<a href="./select">
気持ちを
<br />
追加する
</a>
<a href="./">つくり直す</a>
</div>
<div class={cx(buttonStyle, sendButtonStyle)}>
<a href="./check">
Expand Down
2 changes: 1 addition & 1 deletion src/components/CreateMessageSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const CreateMessageSelect = async () => {
))}
</ul>
<div class={checkLinkStyle}>
<a href="./check">確認</a>
<a href="./check">決定</a>
</div>
</div>
</div>
Expand Down
44 changes: 35 additions & 9 deletions src/components/CreateMessageTop.tsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,45 @@
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;
height: 75vh;
display: flex;
justify-content: center;
margin-top: 3rem;
img {
height: calc(100% - 11rem);
height: calc(100% - 7rem);
margin-top: 4rem;
}
`;

const buttonStyle = css`
position: absolute;
bottom: 4rem;
background-color: var(--color-base);
border-radius: 0.5rem;
width: 7.5rem;
height: 7.25rem;
display: flex;
text-align: center;
justify-content: center;
a {
display: block;
color: var(--color-black);
text-decoration: none;
padding: 2rem 1.5rem;
font-size: 1rem;
padding: 2.1rem 1rem;
}
`;

Expand All @@ -34,9 +50,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 6ab91a4

Please sign in to comment.