-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLanguage.astro
More file actions
122 lines (120 loc) · 2.45 KB
/
Language.astro
File metadata and controls
122 lines (120 loc) · 2.45 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<div class="switch-toggle" id="switch-toggle">
<input id="spanish" name="state-d" type="radio" />
<label for="spanish" class="spanish" onclick=""
><img
src="/logos/spain.avif"
height="30px"
width="40px"
alt="Spanish flag"
/>
</label>
<input id="english" name="state-d" type="radio" />
<label for="english" class="english" onclick="">
<img src="/logos/usa.avif" height="30px" width="30px" alt="American flag" />
</label>
<input id="japanese" name="state-d" type="radio" />
<label for="japanese" class="japanese" onclick="">
<img
src="/logos/japan.avif"
height="30px"
width="40px"
alt="Japanese flag"
/>
</label>
</div>
<style>
.switch-toggle {
position: absolute;
float: right;
background: var(--astro-dark-gray);
display: inline-flex;
right: 0px;
border-radius: 50px;
border-color: var(--astro-blue);
border-style: solid;
border-width: 1pt;
}
.switch-toggle input {
position: absolute;
opacity: 0;
}
.switch-toggle input + label {
padding: 7px;
float: left;
color: var(--astro-white);
cursor: pointer;
}
.switch-toggle input:checked + label {
background: var(--astro-gradient);
transition: 1s ease;
opacity: 0.85;
}
.spanish::after,
.english::after,
.japanese::after {
opacity: 0;
}
.spanish:hover,
.english:hover,
.japanese:hover {
background-color: var(--astro-blue);
transition: opacity 0.75s ease;
opacity: 1;
}
.spanish {
border-radius: 50px 2px 2px 50px;
}
.japanese {
border-radius: 2px 50px 50px 2px;
}
.english {
border-radius: 2px;
}
.spanish,
.english,
.japanese {
color: var(--astro-white);
opacity: 0.35;
}
label {
width: 40px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
user-select: none;
}
@media only screen and (max-width: 600px) {
label {
width: 25px;
height: 25px;
}
.switch-toggle {
right: 10px;
}
}
@media only screen and (min-width: 600px) {
label {
width: 30px;
height: 30px;
}
}
@media only screen and (min-width: 768px) {
label {
width: 35px;
height: 35px;
}
}
@media only screen and (min-width: 992px) {
label {
width: 40px;
height: 40px;
}
}
@media only screen and (min-width: 1200px) {
label {
width: 42px;
height: 42px;
}
}
</style>