-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSponsors.astro
More file actions
101 lines (91 loc) · 2.16 KB
/
Copy pathSponsors.astro
File metadata and controls
101 lines (91 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
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;
}
.sponsor-section {
text-align: center;
width: 100%;
}
@media screen and (max-width: 768px) {
section {
padding: var(--space-m) var(--space-s);
gap: var(--space-s);
}
.content {
max-width: 450px;
}
}
</style>