-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
199 lines (187 loc) · 13.5 KB
/
index.html
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
188
189
190
191
192
193
194
195
196
197
198
199
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no, viewport-fit=contain">
<title>Swiss Climate Challenge - Thank You</title>
<style>
* {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@font-face {
font-family: 'TheSans';
src: url('fonts/TheSansB_700_.woff2') format('woff2'),
url('fonts/TheSansB_700_.woff') format('woff'),
url('fonts/TheSansB_700_.ttf') format('truetype');
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: 'TheSans';
src: url('fonts/TheSansB_400_.woff2') format('woff2'),
url('fonts/TheSansB_400_.woff') format('woff'),
url('fonts/TheSansB_400_.ttf') format('truetype');
font-weight: 400;
font-style: normal;
}
html {
padding: 44px 0;
}
body {
font-family: 'TheSans', sans-serif;
background: rgb(0, 63, 196);
color: rgb(255, 255, 255);
}
.container {
text-align: center;
background: rgb(0, 87, 223);
padding: 40px 20px;
margin: 20px auto;
border-radius: 16px;
box-shadow: 0 6px 12px rgba(0, 53, 163, 0.3);
max-width: 400px;
width: 80%;
/* height: calc(100% - 0px - 44px - var(--safe-area-inset-top, 0px)); */
}
h1 {
font-size: 1.8em;
}
h2 {
font-weight: 400;
}
p {
font-size: 1em;
line-height: 1.5;
margin: 1em 0;
}
a {
color: rgb(255, 255, 255);
font-weight: bold;
}
.language-container {
display: none;
}
.language-container.active {
display: block;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function () {
// Notify the SDK that the web app is loaded
callSdk('action=appIsLoaded');
// Get the 'userLang' query parameter from the URL
const urlParams = new URLSearchParams(window.location.search);
const queryUserLang = urlParams.get('userLang') ? urlParams.get('userLang').slice(0, 2) : null;
console.log('URL parameter userLang:', queryUserLang);
// Get the navigator language
const navigatorLang = navigator.language.slice(0, 2);
console.log('Navigator language:', navigatorLang);
// Use the 'userLang' query parameter if set, otherwise use the navigator language
const userLang = queryUserLang ? queryUserLang : navigatorLang;
console.log('Requested language:', userLang);
// Define the supported languages
const supportedLanguages = ['en', 'de', 'fr', 'it'];
console.log('Supported languages:', supportedLanguages);
// Determine the language to use, defaulting to English if unsupported
const lang = supportedLanguages.includes(userLang) ? userLang : 'en';
console.log('Final language selection:', lang);
// Find all language containers and clear the .active class
const containers = document.querySelectorAll('.language-container');
containers.forEach(container => container.classList.remove('active'));
// Find the container for the selected language and set the .active class
document.getElementById(`container-${lang}`).classList.add('active');
console.log('Activated container:', `container-${lang}`);
});
// Get SDK host platform
function getPlatform() {
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
const isTouchDevice = 'ontouchstart' in window || window.TouchEvent || window.DocumentTouch;
if (userAgent.match(/Mac\sOS\sX/i) && isTouchDevice) {
return 'iOS';
}
if (userAgent.match(/iPad/i) || userAgent.match(/iPhone/i) || userAgent.match(/iPod/i)) {
return 'iOS';
}
if (userAgent.match(/Android/i)) {
return 'Android';
}
return 'Desktop';
}
// SDK Callback
function callSdk(action) {
// Dispatch payloads from web-app to SDK
try {
if (getPlatform() === 'Android' && window.androidClient) {
console.log('Android SDK Callback:', action);
window.androidClient.callback(action);
} else if (getPlatform() === 'iOS' && window.webkit) {
console.log('iOS SDK Callback:', action);
window.webkit.messageHandlers.callback.postMessage(action);
}
console.log('No SDK Callback made for action:', action);
return undefined;
} catch (err) {
console.log(err);
return err;
}
}
</script>
</head>
<body>
<div id="container-en" class="container language-container active">
<img src="scc-clouds.svg" alt="">
<h1>Swiss Climate Challenge</h1>
<h2>Thank you for being part of our journey.</h2>
<p>Swiss Climate Challenge has officially concluded as of December 2024. We are deeply grateful for all your contributions in making a positive impact on our environment.</p>
<p>Together, we tracked emissions, took meaningful steps to reduce our carbon footprint, and showed the power of collective action. Though our app is no longer active, the mission to fight climate change continues.</p>
<p>We encourage you to stay engaged and keep making sustainable choices for our planet.</p><br/>
<p>For more information or to find other sustainability initiatives brought by Swisscom, please visit <a href="https://www.swisscom.ch/en/about/sustainability.html?campID=SC_sustainability">swisscom.ch/sustainability</a>.</p>
<p>If you are a company interested in taking advantage of digital sustainability solutions, please visit <a href="https://www.swisscom.ch/en/business/data-driven-sustainability.html">Data-driven sustainability for businesses</a>.</p>
<p>We are working on integrating the features of the Swiss Climate Challenge into an app for broader sustainability awareness. If you are interested in raising awareness among your employees about sustainability, including mobility, and would like to measure emissions from commuting and business traffic, please contact the data-driven sustainability team by sending a direct inquiry <a href="https://www.swisscom.ch/en/business/enterprise/forms/offerte-kontakt-gf.html/content/swisscom/en/biz/data-driven-sustainability#product_uri=%2Fen%2Fbusiness%2Fdata-driven-sustainability.html&campID=">Contact us</a>.</p><br/>
<p>Thank you again for your dedication and support.</p>
<p>— The Swiss Climate Challenge Team</p>
</div>
<div id="container-de" class="container language-container">
<img src="scc-clouds.svg" alt="">
<h1>Swiss Climate Challenge</h1>
<h2>Vielen Dank, dass Sie Teil unserer Reise waren.</h2>
<p>Swiss Climate Challenge wurde offiziell im Dezember 2024 beendet. Wir sind sehr dankbar für all Ihre Beiträge, die einen positiven Einfluss auf unsere Umwelt hatten.</p>
<p>Gemeinsam haben wir Emissionen verfolgt, sinnvolle Schritte zur Reduzierung unseres CO2-Fussabdrucks unternommen und die Kraft kollektiven Handelns gezeigt. Obwohl unsere App nicht mehr aktiv ist, geht die Mission zur Bekämpfung des Klimawandels weiter.</p>
<p>Wir ermutigen Sie, weiterhin nachhaltige Entscheidungen für unseren Planeten zu treffen.</p><br/>
<p>Für weitere Informationen oder um andere Nachhaltigkeitsinitiativen von Swisscom zu finden, besuchen Sie bitte <a href="https://www.swisscom.ch/de/about/nachhaltigkeit.html?campID=SC_nachhaltigkeit">swisscom.ch/nachhaltigkeit</a>.</p>
<p>Wenn Sie ein Unternehmen sind, das daran interessiert ist, digitale Nachhaltigkeitslösungen zu nutzen, besuchen Sie bitte <a href="https://www.swisscom.ch/de/business/data-driven-sustainability.html">Data Driven Sustainability für Unternehmen</a>.</p>
<p>Wir arbeiten daran, die Funktionen der Swiss Climate Challenge in eine App für die breitere Nachhaltigkeitssensibilisierung zu integrieren. Falls Sie Interesse haben, ihre Mitarbeitenden zum Thema Nachhaltigkeit inklusive Mobilität zu sensibilisieren und die Emissionen aus Pendler- und Geschäftsverkehr messen möchten, kontaktieren Sie gern das Team für datenbasierte Nachhaltigkeit durch eine direkte Anfrage <a href="https://www.swisscom.ch/de/business/enterprise/formulare/offerte-kontakt-gf.html/content/swisscom/en/biz/data-driven-sustainability#product_uri=%2Fen%2Fbusiness%2Fdata-driven-sustainability.html&campID=">Kontakt aufnehmen</a>.</p><br/>
<p>Vielen Dank nochmals für Ihr Engagement und Ihre Unterstützung.</p>
<p>— Das Swiss Climate Challenge Team</p>
</div>
<div id="container-fr" class="container language-container">
<img src="scc-clouds.svg" alt="">
<h1>Swiss Climate Challenge</h1>
<h2>Merci d’avoir fait partie de notre voyage.</h2>
<p>Swiss Climate Challenge a officiellement pris fin en décembre 2024. Nous sommes très reconnaissants pour toutes vos contributions ayant eu un impact positif sur notre environnement.</p>
<p>Ensemble, nous avons suivi les émissions, pris des mesures significatives pour réduire notre empreinte carbone et montré la puissance de l’action collective. Bien que notre application ne soit plus active, la mission de lutter contre le changement climatique continue.</p>
<p>Nous vous encourageons à rester engagés et à continuer à faire des choix durables pour notre planète.</p><br/>
<p>Pour plus d’informations ou pour découvrir d’autres initiatives de développement durable menées par Swisscom, veuillez visiter <a href="https://www.swisscom.ch/fr/about/durabilite.html?campID=SC_durabilite">swisscom.ch/durabilité</a>.</p>
<p>Si vous êtes une entreprise intéressée à profiter des solutions numériques dans le domaine de la durabilité, veuillez visiter <a href="https://www.swisscom.ch/fr/business/data-driven-sustainability.html">Data Driven Sustainability pour les entreprises</a>.</p>
<p>Nous travaillons à l’intégration des fonctionnalités du Swiss Climate Challenge dans une application pour une sensibilisation plus large au développement durable. Si vous souhaitez sensibiliser vos employés au thème de la durabilité, y compris la mobilité, et que vous souhaitez mesurer les émissions liées aux déplacements domicile-travail et professionnels, veuillez contacter l'équipe de durabilité basée sur les données en envoyant une demande directe <a href="https://www.swisscom.ch/fr/business/enterprise/formulaires/offerte-kontakt-gf.html/content/swisscom/fr/biz/data-driven-sustainability#product_uri=%2Ffr%2Fbusiness%2Fdata-driven-sustainability.html&campID=">Prendre contact</a>.</p><br/>
<p>Merci encore pour votre dévouement et votre soutien.</p>
<p>— L’équipe Swiss Climate Challenge</p>
</div>
<div id="container-it" class="container language-container">
<img src="scc-clouds.svg" alt="">
<h1>Swiss Climate Challenge</h1>
<h2>Grazie per aver fatto parte del nostro viaggio.</h2>
<p>Swiss Climate Challenge si è ufficialmente concluso a dicembre 2024. Siamo molto grati per tutti i vostri contributi che hanno avuto un impatto positivo sul nostro ambiente.</p>
<p>Insieme, abbiamo monitorato le emissioni, intrapreso azioni significative per ridurre la nostra impronta di carbonio e dimostrato il potere dell’azione collettiva. Sebbene la nostra app non sia più attiva, la missione per combattere il cambiamento climatico continua.</p>
<p>Vi incoraggiamo a rimanere impegnati e a continuare a fare scelte sostenibili per il nostro pianeta.</p><br/>
<p>Per maggiori informazioni o per scoprire altre iniziative sulla sostenibilità portate avanti da Swisscom, visitate <a href="https://www.swisscom.ch/it/about/sostenibilita.html?campID=shortcut_nachhaltigkeit">swisscom.ch/sostenibilità</a>.</p>
<p>Se siete un'azienda interessata ad approfittare delle soluzioni digitali nel campo della sostenibilità, visitate <a href="https://www.swisscom.ch/it/business/data-driven-sustainability.html">Data Driven Sustainability per le imprese</a>.</p>
<p>Stiamo lavorando per integrare le funzionalità della Swiss Climate Challenge in una app per una più ampia consapevolezza della sostenibilità. Se sei interessato a sensibilizzare i tuoi dipendenti sulla sostenibilità, inclusa la mobilità, e desideri misurare le emissioni derivanti dai viaggi pendolari e di lavoro, contatta il team per la sostenibilità basata sui dati inviando una richiesta diretta <a href="https://www.swisscom.ch/it/business/enterprise/moduli/offerte-kontakt-gf.html/content/swisscom/fr/biz/data-driven-sustainability#product_uri=%2Ffr%2Fbusiness%2Fdata-driven-sustainability.html&campID=">Contattateci</a>.</p><br/>
<p>Grazie ancora per il vostro impegno e supporto.</p>
<p>— Il team di Swiss Climate Challenge</p>
</div>
</body>
</html>