-
Notifications
You must be signed in to change notification settings - Fork 2
Feat/add floor map #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
58eb1ba
bb726c0
997b227
f00a897
ae845c9
40dfa8f
fd94e74
eefa841
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| --- | ||
| import { Image } from "astro:assets"; | ||
| import FloorMapImage from "../assets/map/floor-map.png"; | ||
|
|
||
| interface Props { | ||
| lang?: "ja" | "en"; | ||
| } | ||
| const { lang = "ja" } = Astro.props; | ||
| const altText = lang === "en" ? "Floor Map" : "フロアマップ"; | ||
| --- | ||
|
|
||
| <div class="floor-map-wrapper"> | ||
| <Image | ||
| src={FloorMapImage} | ||
| alt={altText} | ||
| sizes="(max-width: 768px) 100vw, 80vw" | ||
| priority | ||
| class="floor-map" | ||
| /> | ||
| </div> | ||
|
|
||
| <style> | ||
| .floor-map-wrapper { | ||
| display: flex; | ||
| justify-content: center; | ||
| padding: 1rem; | ||
| } | ||
| .floor-map { | ||
| max-width: 100%; | ||
| height: auto; | ||
| } | ||
| </style> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| import SubPage from "../../layouts/SubPage.astro"; | ||
| import FloorGuide from "../../components/FloorGuide.astro"; | ||
| --- | ||
|
|
||
| <SubPage pageTitleJa="フロアガイド" pageTitleEn="Floor Guide"> | ||
| <FloorGuide lang="en" /> | ||
| </SubPage> |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. すみません、pages/en の方にもファイル追加が必要そうでした...!! このファイルとenの方は薄いwrapperにして、 src/components/FloorGuide.astro を新規追加してそちらにこのファイルの実装 + 英訳対応を持っていくのが良さそうです!!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. こちらで対応しましたmm |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| import SubPage from "../layouts/SubPage.astro"; | ||
| import FloorGuide from "../components/FloorGuide.astro"; | ||
| --- | ||
|
|
||
| <SubPage pageTitleJa="フロアガイド" pageTitleEn="Floor Guide"> | ||
| <FloorGuide /> | ||
| </SubPage> |
Uh oh!
There was an error while loading. Please reload this page.