Skip to content
Snippets Groups Projects
Commit f086116a authored by HouTeng Chan's avatar HouTeng Chan
Browse files

Update 2 files

- /wiki/layout.html
- /wiki/pages/attributions.html
parent 06314144
No related branches found
No related tags found
No related merge requests found
......@@ -170,6 +170,29 @@
height: 100%;
object-fit: cover;
}
.text-size-toggle {
position: fixed;
right: 20px;
bottom: 30px;
width: 30px;
height: 30px;
background-color: #FFC0CB;
border: none;
border-radius: 50%;
color: white;
font-size: 14px;
font-weight: bold;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
}
/* Add a class for larger text */
.large-text {
font-size: 120%;
}
</style>
</head>
......@@ -250,6 +273,35 @@
});
});
});
// Existing script content
// Add new script for text size toggle functionality
document.addEventListener('DOMContentLoaded', function() {
var textSizeToggle = document.getElementById('textSizeToggle');
var body = document.body;
var isLarge = false;
textSizeToggle.addEventListener('click', function() {
if (isLarge) {
body.classList.remove('large-text');
textSizeToggle.textContent = 'L';
} else {
body.classList.add('large-text');
textSizeToggle.textContent = 'S';
}
isLarge = !isLarge;
// Store the current state in localStorage
localStorage.setItem('largeTextEnabled', isLarge);
});
// Check localStorage on page load
if (localStorage.getItem('largeTextEnabled') === 'true') {
body.classList.add('large-text');
textSizeToggle.textContent = 'S';
isLarge = true;
}
});
</script>
</body>
</html>
......
......@@ -72,6 +72,8 @@
<div class="progress-text">0%</div>
</div>
<button id="textSizeToggle" class="text-size-toggle">L</button>
<div class="content">
<div class="row mt-4">
<div class="col-lg-12">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment