diff --git a/wiki/layout.html b/wiki/layout.html index a4a38af72b1b5fb08e97ce27f49d396bbc55ccd9..9899e584089f8c072a00548ece128a57960d30eb 100644 --- a/wiki/layout.html +++ b/wiki/layout.html @@ -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> diff --git a/wiki/pages/attributions.html b/wiki/pages/attributions.html index 7d48d9c057763d2d391ad1f066b7791c1f33a8fb..db34cd07aac7bc02f687378250eb42f529f85e95 100644 --- a/wiki/pages/attributions.html +++ b/wiki/pages/attributions.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">