Skip to content

Commit df1379b

Browse files
authored
Merge pull request #4 from github/brunoborges-add-front-page-footer
Fix cookie consent and localized footers
2 parents 001413d + 19fb214 commit df1379b

4 files changed

Lines changed: 114 additions & 22 deletions

File tree

es/index.html

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<link rel="stylesheet" href="../styles.css">
1010
<link rel="stylesheet" href="../light-theme.css">
1111
<script src="../theme-toggle.js"></script>
12+
<script src="../github-cookie-consent.js" defer></script>
1213
<link rel="alternate" hreflang="en" href="https://copilot-dev-days.github.io/">
1314
<link rel="alternate" hreflang="pt-BR" href="https://copilot-dev-days.github.io/pt_BR/">
1415
<link rel="alternate" hreflang="es" href="https://copilot-dev-days.github.io/es/">
@@ -344,22 +345,42 @@ <h2 class="section-title">Requisitos Previos</h2>
344345
</div>
345346
<p class="footer-credit">Hecho con 💜 por el equipo de GitHub Copilot</p>
346347
<p class="footer-credit" style="margin-top: 1rem;">Organizadores de GitHub Copilot Dev Days, visita <a href="https://github.com/github/GitHub-Copilot-Dev-Days/" target="_blank" style="color: var(--neon-cyan);">github.com/github/GitHub-Copilot-Dev-Days</a> para más información.</p>
347-
<div class="footer-locale-picker">
348-
<div class="locale-picker" id="localePicker">
349-
<button type="button" class="locale-toggle footer-locale-toggle" aria-haspopup="listbox" aria-expanded="false" aria-label="Seleccionar idioma">
350-
<svg class="locale-globe" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM5.78 8.75a9.64 9.64 0 0 0 1.36 4.18c.26.43.55.83.86 1.21.25-.3.55-.7.86-1.21a9.64 9.64 0 0 0 1.36-4.18Zm4.44-1.5a9.64 9.64 0 0 0-1.36-4.18A9.93 9.93 0 0 0 8 1.86a9.93 9.93 0 0 0-.86 1.21A9.64 9.64 0 0 0 5.78 7.25Zm-5.94 1.5H1.54a6.51 6.51 0 0 0 4.67 5.5c-.12-.18-.24-.37-.35-.55-.72-1.19-1.44-2.88-1.58-4.95Zm-2.74-1.5h2.74c.14-2.07.86-3.76 1.58-4.95.12-.2.23-.38.35-.55a6.51 6.51 0 0 0-4.67 5.5Zm10.18 1.5c-.14 2.07-.86 3.76-1.58 4.95-.12.2-.23.38-.35.55a6.51 6.51 0 0 0 4.67-5.5Zm2.74-1.5a6.51 6.51 0 0 0-4.67-5.5c.12.18.24.37.35.55.72 1.19 1.44 2.88 1.58 4.95Z"/></svg>
351-
<span class="locale-current">Español</span>
352-
<svg class="locale-chevron" viewBox="0 0 16 16" aria-hidden="true"><path d="M12.78 5.22a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L3.22 6.28a.75.75 0 1 1 1.06-1.06L8 8.94l3.72-3.72a.75.75 0 0 1 1.06 0Z"/></svg>
353-
</button>
354-
<ul role="listbox" aria-label="Idioma">
355-
<li role="option" data-locale="en" aria-selected="false">🇬🇧 English</li>
356-
<li role="option" data-locale="es" aria-selected="true" class="active">🇪🇸 Español</li>
357-
<li role="option" data-locale="pt-BR" aria-selected="false">🇧🇷 Português (Brasil)</li>
348+
</div>
349+
<div class="subfooter-bar">
350+
<div class="subfooter">
351+
<nav aria-label="Enlaces legales y de recursos" class="subfooter-legal-nav">
352+
<ul class="subfooter-legal">
353+
<li class="subfooter-copyright"><time datetime="2026">© 2026 GitHub, Inc.</time></li>
354+
<li><a href="https://docs.github.com/site-policy/github-terms/github-terms-of-service">Términos</a></li>
355+
<li><a href="https://docs.github.com/site-policy/privacy-policies/github-privacy-statement">Privacidad</a></li>
356+
<li>
357+
<cookie-consent-link>
358+
<button type="button" class="cookie-button" data-action="click:cookie-consent-link#showConsentManagement" data-analytics-event='{"location":"footer","tag":"link","action":"cookies","context":"subfooter"}'>Administrar cookies</button>
359+
</cookie-consent-link>
360+
</li>
358361
</ul>
362+
</nav>
363+
<div class="subfooter-social-and-locale">
364+
<nav aria-label="Redes sociales de GitHub">
365+
<ul class="social-links">
366+
<li><a href="https://www.linkedin.com/company/github" aria-label="GitHub en LinkedIn"><svg viewBox="0 0 19 18" aria-hidden="true"><path d="M3.94 2A2 2 0 1 1 2 0a2 2 0 0 1 1.94 2zM4 5.48H0V18h4zm6.32 0H6.34V18h3.94v-6.57c0-3.66 4.77-4 4.77 0V18H19v-7.93c0-6.17-7.06-5.94-8.72-2.91z"/></svg></a></li>
367+
<li><a href="https://www.instagram.com/github" aria-label="GitHub en Instagram"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 0C8.74 0 8.33.02 7.05.07 5.78.13 4.91.33 4.14.63c-.79.31-1.46.72-2.13 1.38S.94 3.35.63 4.14C.33 4.91.13 5.78.07 7.05.01 8.33 0 8.74 0 12s.02 3.67.07 4.95c.06 1.28.26 2.15.56 2.91.31.79.72 1.46 1.38 2.13s1.34 1.08 2.13 1.38c.77.3 1.64.5 2.91.56C8.33 23.99 8.74 24 12 24s3.67-.02 4.95-.07c1.28-.06 2.15-.26 2.91-.56.79-.31 1.46-.72 2.13-1.38s1.08-1.34 1.38-2.13c.3-.77.5-1.64.56-2.91.06-1.28.07-1.69.07-4.95s-.02-3.67-.07-4.95c-.06-1.28-.26-2.15-.56-2.91-.31-.79-.72-1.46-1.38-2.13S20.65.94 19.86.63c-.77-.3-1.64-.5-2.91-.56C15.67.01 15.26 0 12 0zm0 5.84A6.16 6.16 0 1 0 12 18.16 6.16 6.16 0 0 0 12 5.84zm0 10.16a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm7.85-10.41a1.44 1.44 0 1 1-2.88 0 1.44 1.44 0 0 1 2.88 0z"/></svg></a></li>
368+
<li><a href="https://www.youtube.com/github" aria-label="GitHub en YouTube"><svg viewBox="0 0 19.17 13.6" aria-hidden="true"><path d="M18.77 2.13A2.4 2.4 0 0 0 17.09.42C15.59 0 9.58 0 9.58 0a57.55 57.55 0 0 0-7.5.4A2.49 2.49 0 0 0 .39 2.13 26.27 26.27 0 0 0 0 6.8a26.15 26.15 0 0 0 .39 4.67 2.43 2.43 0 0 0 1.69 1.71c1.52.42 7.5.42 7.5.42a57.69 57.69 0 0 0 7.51-.4 2.4 2.4 0 0 0 1.68-1.71 25.63 25.63 0 0 0 .4-4.67 24 24 0 0 0-.4-4.69zM7.67 9.71V3.89l5 2.91z"/></svg></a></li>
369+
<li><a href="https://x.com/github" aria-label="GitHub en X"><svg viewBox="0 0 1200 1227" aria-hidden="true"><path d="M714.16 519.28 1160.89 0h-105.86L667.14 450.89 357.33 0H0l468.49 681.82L0 1226.37h105.87l409.62-476.15 327.18 476.15H1200L714.14 519.28h.02ZM569.17 687.83 144.01 79.69h162.6l752.47 1070.61H892.48L569.17 687.83Z"/></svg></a></li>
370+
<li><a href="https://www.tiktok.com/@github" aria-label="GitHub en TikTok"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12.53.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"/></svg></a></li>
371+
<li><a href="https://www.twitch.tv/github" aria-label="GitHub en Twitch"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M11.57 4.71h1.72v5.15h-1.72zm4.72 0H18v5.15h-1.71zM6 0 1.71 4.29v15.42h5.15V24l4.28-4.29h3.43L22.29 12V0zm14.57 11.14-3.43 3.43h-3.43l-3 3v-3H6.86V1.71h13.71Z"/></svg></a></li>
372+
<li><a href="https://github.com/github" aria-label="Organización de GitHub en GitHub"><svg viewBox="0 0 98 96" aria-hidden="true"><path d="M48.85 0C21.84 0 0 22 0 49.22c0 21.75 13.99 40.17 33.41 46.69 2.42.49 3.31-1.06 3.31-2.36 0-1.14-.08-5.05-.08-9.13-13.59 2.94-16.42-5.87-16.42-5.87-2.18-5.7-5.42-7.17-5.42-7.17-4.45-3.01.33-3.01.33-3.01 4.93.32 7.52 5.05 7.52 5.05 4.37 7.5 11.4 5.38 14.24 4.07.4-3.18 1.7-5.38 3.07-6.6-10.84-1.14-22.24-5.38-22.24-24.28 0-5.38 1.94-9.78 5.01-13.2-.48-1.22-2.18-6.28.49-13.04 0 0 4.12-1.3 13.42 5.05a46.97 46.97 0 0 1 12.22-1.63c4.12 0 8.33.57 12.21 1.63 9.3-6.35 13.43-5.05 13.43-5.05 2.67 6.76.97 11.82.48 13.04 3.16 3.42 5.02 7.82 5.02 13.2 0 18.9-11.4 23.06-22.32 24.28 1.78 1.55 3.31 4.48 3.31 9.13 0 6.6-.08 11.9-.08 13.53 0 1.3.89 2.85 3.32 2.36 19.41-6.52 33.4-24.94 33.4-46.69C97.71 22 75.79 0 48.85 0z"/></svg></a></li>
373+
</ul>
374+
</nav>
375+
<div class="locale-picker" id="localePicker">
376+
<button type="button" class="locale-toggle footer-locale-toggle" aria-haspopup="listbox" aria-expanded="false" aria-label="Seleccionar idioma"><svg class="locale-globe" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM5.78 8.75a9.64 9.64 0 0 0 1.36 4.18c.26.43.55.83.86 1.21.25-.3.55-.7.86-1.21a9.64 9.64 0 0 0 1.36-4.18Zm4.44-1.5a9.64 9.64 0 0 0-1.36-4.18A9.93 9.93 0 0 0 8 1.86a9.93 9.93 0 0 0-.86 1.21A9.64 9.64 0 0 0 5.78 7.25Zm-5.94 1.5H1.54a6.51 6.51 0 0 0 4.67 5.5c-.12-.18-.24-.37-.35-.55-.72-1.19-1.44-2.88-1.58-4.95Zm-2.74-1.5h2.74c.14-2.07.86-3.76 1.58-4.95.12-.2.23-.38.35-.55a6.51 6.51 0 0 0-4.67 5.5Zm10.18 1.5c-.14 2.07-.86 3.76-1.58 4.95-.12.2-.23.38-.35.55a6.51 6.51 0 0 0 4.67-5.5Zm2.74-1.5a6.51 6.51 0 0 0-4.67-5.5c.12.18.24.37.35.55.72 1.19 1.44 2.88 1.58 4.95Z"/></svg><span class="locale-current">Español</span><svg class="locale-chevron" viewBox="0 0 16 16" aria-hidden="true"><path d="M12.78 5.22a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L3.22 6.28a.75.75 0 1 1 1.06-1.06L8 8.94l3.72-3.72a.75.75 0 0 1 1.06 0Z"/></svg></button>
377+
<ul role="listbox" aria-label="Idioma"><li role="option" data-locale="en" aria-selected="false">🇬🇧 English</li><li role="option" data-locale="es" aria-selected="true" class="active">🇪🇸 Español</li><li role="option" data-locale="pt-BR" aria-selected="false">🇧🇷 Português (Brasil)</li></ul>
378+
</div>
359379
</div>
360380
</div>
361381
</div>
362382
</footer>
383+
<ghcc-consent id="ghcc" data-locale="es" data-initial-cookie-consent-allowed="" data-cookie-consent-required="false" style="position:fixed;bottom:0;left:0;z-index:999999"></ghcc-consent>
363384
<script>
364385
document.querySelectorAll('.category-pill').forEach(pill => {
365386
pill.addEventListener('click', e => {

github-cookie-consent.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
(function() {
2+
const assetBase = 'https://github.githubassets.com/assets/';
3+
const assets = [
4+
'high-contrast-cookie-e99d8801a8e707d0.js',
5+
'wp-runtime-fd4d28ade03ac1d0.js',
6+
'app-runtime-2cb7c64f0defbe9d.js',
7+
'fetch-utilities-7fed68b8333e9826.js',
8+
'78205-5d6a6f402b7a8e68.js',
9+
'89415-812392e4104ab411.js',
10+
'environment-17a3813da72840a4.js',
11+
'runtime-helpers-176627970fd228b1.js',
12+
'catalyst-2b159a120cac7df3.js',
13+
'selector-observer-6cc59d6d6cb4ac45.js',
14+
'relative-time-element-ae9705f9acc73694.js',
15+
'296-4c0a68ac3f1b71d1.js',
16+
'816-8d95115b2deb6077.js',
17+
'21265-6a76b64e3534ad57.js',
18+
'81683-bbf17e7ded27669b.js',
19+
'46740-eafd9231dd2851b5.js',
20+
'30058-00fdf1aae5a3d0d2.js',
21+
'github-elements-3efe2af7b4535ce7.js',
22+
'element-registry-eeff84bbec91d759.js'
23+
];
24+
25+
async function loadAssets() {
26+
for (const asset of assets) {
27+
await new Promise((resolve, reject) => {
28+
const script = document.createElement('script');
29+
script.type = 'module';
30+
script.crossOrigin = 'anonymous';
31+
script.src = assetBase + asset;
32+
script.addEventListener('load', resolve, {once: true});
33+
script.addEventListener('error', () => reject(new Error('Unable to load ' + asset)), {once: true});
34+
document.head.appendChild(script);
35+
});
36+
}
37+
}
38+
39+
loadAssets().catch(error => {
40+
console.error('Unable to initialize GitHub cookie consent.', error);
41+
});
42+
})();

index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<link rel="stylesheet" href="styles.css">
1010
<link rel="stylesheet" href="light-theme.css">
1111
<script src="theme-toggle.js"></script>
12+
<script src="github-cookie-consent.js" defer></script>
1213
<link rel="alternate" hreflang="en" href="https://copilot-dev-days.github.io/">
1314
<link rel="alternate" hreflang="pt-BR" href="https://copilot-dev-days.github.io/pt_BR/">
1415
<link rel="alternate" hreflang="es" href="https://copilot-dev-days.github.io/es/">
@@ -421,6 +422,13 @@ <h2 class="section-title">General Prerequisites</h2>
421422
</div>
422423
</div>
423424
</footer>
425+
<ghcc-consent
426+
id="ghcc"
427+
data-locale="en"
428+
data-initial-cookie-consent-allowed=""
429+
data-cookie-consent-required="false"
430+
style="position:fixed;bottom:0;left:0;z-index:999999"
431+
></ghcc-consent>
424432
<script>
425433
document.querySelectorAll('.category-pill').forEach(pill => {
426434
pill.addEventListener('click', e => {

0 commit comments

Comments
 (0)