-
Notifications
You must be signed in to change notification settings - Fork 2
スポンサーリストを追加 #26
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
Open
masakurapa
wants to merge
19
commits into
main
Choose a base branch
from
feature/sponsors
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
スポンサーリストを追加 #26
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
79260ae
スポンサーリストを追加
masakurapa 561d566
fix style
masakurapa c940725
add Dialog
masakurapa bfe901a
fix Sponsor type
masakurapa b58e72c
fix Dialog layout
masakurapa d578c6f
URLの色を変更
masakurapa 75a9476
add image title
masakurapa 281e7d0
fix: スポンサーページを英語対応
mochi-yu 3e04e20
種別別にcomponentを分離
masakurapa 8b7c3c4
fix dialog style
masakurapa 86277af
fix Sponsors.astro
masakurapa 910d152
add image opacity
masakurapa 1486055
fix Gopher
masakurapa b83eabc
fix sponsor layout
masakurapa c8110f9
スタイルの調整
masakurapa 069496f
fix Tool layout
masakurapa 4054bb7
rm Dialog
masakurapa 6fc3b24
rm unused component
masakurapa f9de01e
Merge branch 'main' into feature/sponsors
masakurapa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| --- | ||
| import SectionTitle from "../ui/SectionTitle.astro"; | ||
|
|
||
| import Gold from "./sponsor/Gold.astro"; | ||
| import Silver from "./sponsor/Silver.astro"; | ||
| import Drink from "./sponsor/Drink.astro"; | ||
| import Lunch from "./sponsor/Lunch.astro"; | ||
| import Bronze from "./sponsor/Bronze.astro"; | ||
| import Gopher from "./sponsor/Gopher.astro"; | ||
| import Tool from "./sponsor/Tool.astro"; | ||
| import { | ||
| goldSponsors, | ||
| silverSponsors, | ||
| drinkSponsors, | ||
| lunchSponsors, | ||
| bronzeSponsors, | ||
| gopherSponsors, | ||
| toolSponsors, | ||
| } from "./sponsors"; | ||
|
|
||
| const currentLocale = Astro.currentLocale || "ja"; | ||
|
|
||
| if ( | ||
| goldSponsors.length === 0 && | ||
| silverSponsors.length === 0 && | ||
| drinkSponsors.length === 0 && | ||
| lunchSponsors.length === 0 && | ||
| bronzeSponsors.length === 0 && | ||
| gopherSponsors.length === 0 && | ||
| toolSponsors.length === 0 | ||
| ) { | ||
| return null; | ||
| } | ||
| --- | ||
|
|
||
| <section id="sponsors"> | ||
| <SectionTitle> | ||
| { | ||
| currentLocale === "en" ? ( | ||
| <span class="section-title"> | ||
| <span style="color: var(--text-accent);">S</span>ponsors | ||
| </span> | ||
| ) : ( | ||
| <span class="section-title"> | ||
| <span style="color: var(--text-accent);">ス</span>ポンサー | ||
| </span> | ||
| ) | ||
| } | ||
| </SectionTitle> | ||
| <div class="content"> | ||
| <Gold sponsors={goldSponsors} /> | ||
| <Silver sponsors={silverSponsors} /> | ||
| <Drink sponsors={drinkSponsors} /> | ||
| <Lunch sponsors={lunchSponsors} /> | ||
| <Bronze sponsors={bronzeSponsors} /> | ||
| <Gopher sponsors={gopherSponsors} /> | ||
| <Tool sponsors={toolSponsors} /> | ||
| </div> | ||
| </section> | ||
|
|
||
| <style> | ||
| section { | ||
| max-width: 1200px; | ||
| margin: 0 auto; | ||
| padding: var(--space-l) var(--space-m); | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: var(--space-m); | ||
| align-items: center; | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| .content { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: var(--space-l); | ||
| width: 100%; | ||
| } | ||
|
|
||
| .section-title { | ||
| word-break: keep-all; | ||
| overflow-wrap: anywhere; | ||
| text-align: center; | ||
| } | ||
|
|
||
| @media screen and (max-width: 768px) { | ||
| section { | ||
| padding: var(--space-m) var(--space-s); | ||
| gap: var(--space-s); | ||
| } | ||
|
|
||
| .content { | ||
| max-width: 450px; | ||
| } | ||
| } | ||
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| --- | ||
| import { Image } from "astro:assets"; | ||
| import type { Sponsor } from "../sponsors"; | ||
|
|
||
| interface Props { | ||
| sponsors: Sponsor[]; | ||
| } | ||
|
|
||
| const { sponsors } = Astro.props; | ||
|
|
||
| if (sponsors.length === 0) { | ||
| return null; | ||
| } | ||
|
|
||
| const currentLocale = Astro.currentLocale || "ja"; | ||
| --- | ||
|
|
||
| <div class="sponsor-section"> | ||
| <h4 class="text-h4"> | ||
| {currentLocale === "ja" ? "ブロンズ" : "Bronze"} | ||
| </h4> | ||
| <ul> | ||
| { | ||
| sponsors.map((sponsor) => ( | ||
| <li> | ||
| <Image | ||
| src={sponsor.imageSrc} | ||
| alt={sponsor.name} | ||
| title={sponsor.name} | ||
| loading="lazy" | ||
| priority | ||
| /> | ||
| </li> | ||
| )) | ||
| } | ||
| </ul> | ||
| </div> | ||
|
|
||
| <style> | ||
| .sponsor-section { | ||
| text-align: center; | ||
| } | ||
|
|
||
| ul { | ||
| display: grid; | ||
| grid-template-columns: repeat(5, auto); | ||
| list-style: none; | ||
| text-align: center; | ||
| padding: 0; | ||
| gap: 20px; | ||
| margin: 0 auto; | ||
| width: 100%; | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| li { | ||
| max-width: 100%; | ||
| } | ||
|
|
||
| li > img { | ||
| width: 208px; | ||
| height: auto; | ||
| aspect-ratio: 208 / 100; | ||
| max-width: 100%; | ||
| object-fit: contain; | ||
| display: block; | ||
| } | ||
|
|
||
| li > img:hover { | ||
| opacity: 0.7; | ||
| } | ||
|
|
||
| @media screen and (max-width: 768px) { | ||
| ul { | ||
| grid-template-columns: repeat(2, auto); | ||
| column-gap: 16px; | ||
| row-gap: 8px; | ||
| } | ||
|
|
||
| li { | ||
| display: flex; | ||
| justify-content: center; | ||
| } | ||
|
|
||
| li > img { | ||
| width: 163px; | ||
| aspect-ratio: 163 / 64; | ||
| } | ||
| } | ||
| </style> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| --- | ||
| import { Image } from "astro:assets"; | ||
| import type { SponsorWithUrl } from "../sponsors"; | ||
|
|
||
| interface Props { | ||
| sponsors: SponsorWithUrl[]; | ||
| } | ||
|
|
||
| const { sponsors } = Astro.props; | ||
|
|
||
| if (sponsors.length === 0) { | ||
| return null; | ||
| } | ||
|
|
||
| const currentLocale = Astro.currentLocale || "ja"; | ||
| --- | ||
|
|
||
| <div class="sponsor-section"> | ||
| <h4 class="text-h4"> | ||
| {currentLocale === "ja" ? "ドリンク" : "Drink"} | ||
| </h4> | ||
| <ul> | ||
| { | ||
| sponsors.map((sponsor) => ( | ||
| <li> | ||
| <a href={sponsor.link} target="_blank" rel="noopener noreferrer"> | ||
| <Image | ||
| src={sponsor.imageSrc} | ||
| alt={sponsor.name} | ||
| title={sponsor.name} | ||
| loading="lazy" | ||
| priority | ||
| /> | ||
| </a> | ||
| </li> | ||
| )) | ||
| } | ||
| </ul> | ||
| </div> | ||
|
|
||
| <style> | ||
| .sponsor-section { | ||
| text-align: center; | ||
| } | ||
|
|
||
| ul { | ||
| display: flex; | ||
| list-style: none; | ||
| text-align: center; | ||
| padding: 0 118px; | ||
| margin: 0 auto; | ||
| justify-content: center; | ||
| width: 100%; | ||
| box-sizing: border-box; | ||
| } | ||
|
mochi-yu marked this conversation as resolved.
|
||
|
|
||
| li { | ||
| width: calc(50% - 10px); | ||
| display: flex; | ||
| justify-content: center; | ||
| } | ||
|
|
||
| a { | ||
| display: block; | ||
| } | ||
|
|
||
| a:hover { | ||
| opacity: 0.7; | ||
| } | ||
|
|
||
| a > img { | ||
| width: 100%; | ||
| height: auto; | ||
| aspect-ratio: 354 / 164; | ||
| max-width: 354px; | ||
| object-fit: contain; | ||
| display: block; | ||
| } | ||
|
|
||
| @media screen and (max-width: 768px) { | ||
| ul { | ||
| padding: 0 40px; | ||
| } | ||
|
|
||
| li { | ||
| width: 100%; | ||
| } | ||
|
|
||
| a > img { | ||
| width: 262px; | ||
| aspect-ratio: 262 / 64; | ||
| } | ||
| } | ||
| </style> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.