Skip to content

Commit

Permalink
Merge pull request #26 from GoCon/hytkgami/update-logo-images
Browse files Browse the repository at this point in the history
スポンサーロゴの更新とスポンサー一覧へのアンカーリンクの設置
  • Loading branch information
hytkgami authored Apr 11, 2024
2 parents 1a08c25 + 48cc7ef commit 75861c1
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 7 deletions.
Binary file added public/sponsors/CyberAgent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added public/sponsors/Mirrativ.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/sponsors/株式会社カナリー.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/sponsors/株式会社ミラティブ.png
Binary file not shown.
1 change: 1 addition & 0 deletions src/components/Header/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { concatWithBase } from "@utils/concatWithBase";
<nav id="navigation" class="collapsed">
<ul>
<li><a href={concatWithBase()}>Home</a></li>
<li><a href="#sponsors">Sponsors</a></li>
<!-- ページの準備ができ次第コメントアウトを外す -->
<!-- <li><a href="#">Sessions</a></li>
<li><a href="#">Timetable</a></li>
Expand Down
23 changes: 22 additions & 1 deletion src/components/Sponsors.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { getEntry } from "astro:content";
import { concatWithBase } from "@utils/concatWithBase";
const sponsors = await getEntry("sponsors", "data");
const venueSponsors = sponsors.data.filter(
(sponsor) => sponsor.class === "Venue",
);
const platinumGoldSponsors = sponsors.data.filter(
(sponsor) => sponsor.class === "Platinum Gold",
);
Expand All @@ -18,10 +21,26 @@ const bronzeSponsors = sponsors.data.filter(
);
---

<div class="background">
<div id="sponsors" class="background">
<div class="container">
<h2>Sponsors</h2>
<p>スポンサープランの募集は終了しました。</p>
<h3>会場スポンサー</h3>
<div class="box">
{
venueSponsors.map((sponsor) => (
<a href={concatWithBase(`sponsors/${sponsor.id}`)}>
<Image
class="platinum"
src={concatWithBase(sponsor.image)}
alt={sponsor.name}
width={448}
height={242}
/>
</a>
))
}
</div>
<h3>Platinum "Go"ld</h3>
<div class="box">
{
Expand Down Expand Up @@ -128,6 +147,8 @@ const bronzeSponsors = sponsors.data.filter(
img {
object-fit: contain;
}

.venue,
.platinum,
.gold {
@media screen and (max-width: 448px) {
Expand Down
2 changes: 1 addition & 1 deletion src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const sponsorsCollection = defineCollection({
z.object({
id: z.number(),
name: z.string(),
class: z.enum(["Platinum Gold", "Gold", "Silver", "Bronze"]),
class: z.enum(["Venue", "Platinum Gold", "Gold", "Silver", "Bronze"]),
description: z.string(),
image: z.string(),
}),
Expand Down
13 changes: 10 additions & 3 deletions src/content/sponsors/data.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
[
{
"id": 0,
"name": "株式会社サイバーエージェント",
"class": "Venue",
"description": "",
"image": "sponsors/CyberAgent.png"
},
{
"id": 1,
"name": "転職ドラフト",
"class": "Platinum Gold",
"name": "転職ドラフト",
"description": "「エンジニアの価値は世界が決める」\n転職ドラフトは、企業から年収付きで指名が届く、ITエンジニア向けの転職サービスです。\nITエンジニアが「自身の客観的な市場価値」を判断する機会は限られています。\n転職ドラフトは、評価におけるバイアスを排除し、ITエンジニアが実力で正当に評価され、実力に見合った報酬を得られる世界の実現を目指しています。\n利用企業数は累計700社以上。毎月600人超のITエンジニアが参加。\n挑戦的なキャリア形成の登竜門としてご利用いただけるよう、日々提供価値を拡充しています。",
"image": "sponsors/転職ドラフト.png"
},
Expand All @@ -11,7 +18,7 @@
"name": "株式会社エブリー",
"class": "Platinum Gold",
"description": "",
"image": "sponsors/株式会社エブリー.svg"
"image": "sponsors/Every.svg"
},
{
"id": 3,
Expand Down Expand Up @@ -179,7 +186,7 @@
"name": "株式会社ミラティブ",
"class": "Bronze",
"description": "",
"image": "sponsors/株式会社ミラティブ.png"
"image": "sponsors/Mirrativ.png"
},
{
"id": 27,
Expand Down
4 changes: 3 additions & 1 deletion src/pages/sponsors/[id].astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export async function getStaticPaths() {
return sponsors.data
.filter(
(sponsor) =>
sponsor.class === "Platinum Gold" || sponsor.class === "Gold",
sponsor.class === "Venue" ||
sponsor.class === "Platinum Gold" ||
sponsor.class === "Gold",
)
.map((sponsor) => ({
params: { id: sponsor.id },
Expand Down
1 change: 1 addition & 0 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

html {
height: 100%;
scroll-behavior: smooth;
}

body {
Expand Down
2 changes: 1 addition & 1 deletion test/utils/concatWithBase.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { concatWithBase } from "../../src/utils/concatWithBase";
import { describe, assert, expect, test } from "vitest";
import { describe, expect, test } from "vitest";

describe("concatWithBase", () => {
test("prefixにBASE_URLを追加する", () => {
Expand Down

0 comments on commit 75861c1

Please sign in to comment.