-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathi18n.css
More file actions
187 lines (185 loc) · 5.31 KB
/
i18n.css
File metadata and controls
187 lines (185 loc) · 5.31 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
/* Globe language button — sits inline inside #site-footer next to copyright text. */
#site-footer #lang-wrap {
display: inline-block;
position: relative;
margin-left: 4px;
vertical-align: baseline;
}
#site-footer #lang-btn {
background: none;
border: none;
padding: 0 2px;
margin: 0;
cursor: pointer;
color: rgba(0, 0, 0, 0.4);
font: inherit;
line-height: inherit;
vertical-align: middle;
display: inline-flex;
align-items: center;
transition: color 0.15s ease;
}
#site-footer #lang-btn:hover {
color: rgba(0, 0, 0, 0.7);
}
#site-footer #lang-btn svg {
width: 11px;
height: 11px;
display: block;
}
#site-footer #lang-menu {
display: none;
position: absolute;
right: 0;
bottom: calc(100% + 4px);
background: #fff;
border: 1px solid #ccc;
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
z-index: 200;
min-width: 110px;
font-family: "Ubuntu", sans-serif;
}
#site-footer #lang-menu.open {
display: block;
}
#site-footer #lang-menu button {
display: block;
width: 100%;
text-align: left;
padding: 6px 10px;
border: none;
background: none;
cursor: pointer;
font-size: 11px;
font-family: inherit;
font-weight: 300;
color: #333;
}
#site-footer #lang-menu button:hover {
background: #f0f4ff;
}
#site-footer #lang-menu button.active {
font-weight: 600;
color: #1f77b4;
}
/* ── Mobile language picker overlay ──────────────────────────────
Hidden by default. Runtime adds .show only on mobile (≤1024px)
and only when no per-session choice exists yet. Z-index above
the orientation-lock overlay so language is picked first. */
#lang-picker-overlay {
display: none;
position: fixed;
inset: 0;
background: rgba(20, 20, 20, 0.92);
z-index: 100000;
align-items: center;
justify-content: center;
padding: 24px;
-webkit-tap-highlight-color: transparent;
}
#lang-picker-overlay.show {
display: flex;
}
#lang-picker-overlay .lang-picker-card {
background: #fff;
border-radius: 16px;
padding: 28px 22px 24px;
max-width: 360px;
width: 100%;
text-align: center;
font-family: "Ubuntu", sans-serif;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
#lang-picker-overlay .lang-picker-globe {
margin: 0 auto 14px;
display: block;
color: #333;
}
#lang-picker-overlay .lang-picker-prompt {
font-size: 15px;
font-weight: 300;
color: #555;
margin: 0 0 20px;
line-height: 1.5;
}
#lang-picker-overlay .lang-picker-prompt span {
display: block;
margin-top: 2px;
font-style: italic;
}
#lang-picker-overlay .lang-picker-buttons {
display: flex;
flex-direction: column;
gap: 10px;
}
#lang-picker-overlay .lang-picker-buttons button {
font-family: inherit;
font-size: 18px;
font-weight: 400;
padding: 14px 20px;
border: 1px solid #333;
border-radius: 8px;
background: #fff;
color: #333;
cursor: pointer;
transition: background 0.15s ease, color 0.15s ease;
}
#lang-picker-overlay .lang-picker-buttons button:hover,
#lang-picker-overlay .lang-picker-buttons button:active {
background: #333;
color: #fff;
}
/* ── Swahili overflow handling ──────────────────────────────────
Framer locks font-size via inline style on <p class="framer-text">,
so overrides need !important. Only applied when Swahili is the
active language (set on <html lang="sw"> by i18n.js).
Allow wrapping + shrink the worst-offending nav buttons. */
html[lang="sw"] [data-nav-button] p.framer-text {
white-space: normal !important;
word-break: normal !important;
overflow-wrap: break-word !important;
hyphens: auto !important;
line-height: 1.05em !important;
}
/* Support button: longest Swahili string. Shrink + tighten leading.
Force the <a> + its inner divs into a flex-centered column so the
shrunken text sits vertically centered (Framer's original layout
reserves vertical space for ~3 lines at 35px; at 26px the text is
shorter and would otherwise sit top-anchored). */
html[lang="sw"] a[data-nav-button="support"] {
display: flex !important;
align-items: center !important;
justify-content: center !important;
}
html[lang="sw"] a[data-nav-button="support"] > div,
html[lang="sw"] a[data-nav-button="support"] > div > div {
position: static !important;
width: 100% !important;
height: auto !important;
transform: none !important;
}
html[lang="sw"] [data-nav-button="support"] p.framer-text {
font-size: 26px !important;
--framer-font-size: 26px !important;
letter-spacing: -0.2px !important;
line-height: 1.15em !important;
}
/* Cool Buildings Guide: ~30% longer in Swahili. Slight font-size reduction. */
html[lang="sw"] [data-nav-button="cbg"] p.framer-text {
font-size: 26px !important;
--framer-font-size: 26px !important;
}
/* Support page tagline: Swahili is much longer than English, reduce font size */
html[lang="sw"] p.framer-text[data-i18n="support.tagline"] {
font-size: 20px !important;
--framer-font-size: 20px !important;
line-height: 1.2em !important;
}
/* Support page mission paragraphs: Swahili text is significantly longer, shrink to avoid overlapping images */
html[lang="sw"] [data-i18n^="support.mission"],
html[lang="sw"] [data-i18n^="support.larger.mission"] {
font-size: 18px !important;
--framer-font-size: 18px !important;
line-height: 1.4em !important;
}