Skip to content

Commit 79960e0

Browse files
committed
Fix consistency issues in Learning Resources page
1 parent a636e09 commit 79960e0

1 file changed

Lines changed: 42 additions & 21 deletions

File tree

learning-resources.html

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -355,31 +355,22 @@
355355
background-color: var(--dark-color);
356356
color: white;
357357
text-align: center;
358-
padding: 20px 0;
359-
margin-top: 40px;
360-
}
361-
362-
footer a {
363-
color: var(--secondary-color);
364-
text-decoration: none;
358+
padding: 30px 0;
365359
}
366360

367361
.disclaimer {
368-
font-size: 0.8rem;
369-
margin-top: 10px;
370-
color: #777;
371-
}
372-
373-
body.dark-mode .disclaimer {
374-
color: #999;
362+
max-width: 800px;
363+
margin: 20px auto;
364+
font-size: 0.9rem;
365+
opacity: 0.8;
375366
}
376367

377-
.highlight {
368+
.disclaimer .highlight {
378369
font-weight: bold;
379370
color: var(--secondary-color);
380371
}
381372

382-
body.dark-mode .highlight {
373+
body.dark-mode .disclaimer .highlight {
383374
color: var(--dark-mode-secondary);
384375
}
385376

@@ -1302,6 +1293,24 @@ <h3>Independent Learning Resources</h3>
13021293
</footer>
13031294

13041295
<script>
1296+
// Function to handle repository access check
1297+
function checkRepoAccess(event, repo) {
1298+
event.preventDefault();
1299+
1300+
// In a real implementation, you would check if the user has access to the repository
1301+
// For now, we'll redirect to the access request page
1302+
window.location.href = `access-request.html?repo=${repo}`;
1303+
1304+
return false;
1305+
}
1306+
1307+
function setRepoParam(event, repo) {
1308+
// Set a cookie or localStorage item to remember the repo
1309+
localStorage.setItem('selectedRepo', repo);
1310+
1311+
// Allow the default context menu to appear
1312+
return true;
1313+
}
13051314
// Theme toggle functionality
13061315
const themeToggle = document.getElementById('themeToggle');
13071316
const body = document.body;
@@ -1369,7 +1378,7 @@ <h3>Independent Learning Resources</h3>
13691378
viewResume: "View Resume",
13701379
backToHome: "Back to Home",
13711380
footer: "All rights reserved.",
1372-
disclaimer: "Disclaimer: All views and opinions expressed on this website and in my GitHub repositories are my own and do not represent the opinions of my employer."
1381+
disclaimer: "Disclaimer: All views and opinions expressed on this website and in my GitHub repositories are my own and do not represent the opinions of my employer."
13731382
},
13741383
es: {
13751384
title: "Recursos de Aprendizaje",
@@ -1386,7 +1395,7 @@ <h3>Independent Learning Resources</h3>
13861395
viewResume: "Ver Currículum",
13871396
backToHome: "Volver al Inicio",
13881397
footer: "Todos los derechos reservados.",
1389-
disclaimer: "Descargo de responsabilidad: Todas las opiniones expresadas en este sitio web y en mis repositorios de GitHub son mías y no representan las opiniones de mi empleador."
1398+
disclaimer: "Descargo de responsabilidad: Todas las opiniones expresadas en este sitio web y en mis repositorios de GitHub son mías y no representan las opiniones de mi empleador."
13901399
},
13911400
pt: {
13921401
title: "Recursos de Aprendizagem",
@@ -1403,7 +1412,7 @@ <h3>Independent Learning Resources</h3>
14031412
viewResume: "Ver Currículo",
14041413
backToHome: "Voltar ao Início",
14051414
footer: "Todos os direitos reservados.",
1406-
disclaimer: "Aviso: Todas as opiniões expressas neste site e nos meus repositórios GitHub são minhas e não representam as opiniões do meu empregador."
1415+
disclaimer: "Aviso: Todas as opiniões expressas neste site e nos meus repositórios GitHub são minhas e não representam as opiniões do meu empregador."
14071416
}
14081417
};
14091418

@@ -1450,12 +1459,24 @@ <h3>Independent Learning Resources</h3>
14501459
languageButtons.forEach(button => {
14511460
button.addEventListener('click', () => {
14521461
const lang = button.getAttribute('data-lang');
1453-
translatePage(lang);
1462+
setActiveLanguage(lang);
14541463
});
14551464
});
14561465

1466+
function setActiveLanguage(lang) {
1467+
languageButtons.forEach(btn => {
1468+
if (btn.getAttribute('data-lang') === lang) {
1469+
btn.classList.add('active');
1470+
} else {
1471+
btn.classList.remove('active');
1472+
}
1473+
});
1474+
translatePage(lang);
1475+
localStorage.setItem('language', lang);
1476+
}
1477+
14571478
// Initialize with saved language preference
1458-
translatePage(currentLang);
1479+
setActiveLanguage(currentLang);
14591480
</script>
14601481
</body>
14611482
</html>

0 commit comments

Comments
 (0)