From 762915f8162814b7cc4f08b53214510727eaa2b6 Mon Sep 17 00:00:00 2001 From: HouTeng Chan <ht-chen21@mails.tsinghua.edu.cn> Date: Fri, 26 Jul 2024 04:26:37 +0000 Subject: [PATCH] Update 3 files - /wiki/pages/attributions.html - /wiki/pages/description.html - /wiki/pages/education.html --- wiki/pages/attributions.html | 55 +------------------------- wiki/pages/description.html | 77 +----------------------------------- wiki/pages/education.html | 77 +----------------------------------- 3 files changed, 4 insertions(+), 205 deletions(-) diff --git a/wiki/pages/attributions.html b/wiki/pages/attributions.html index 37c112aa..15e6450c 100644 --- a/wiki/pages/attributions.html +++ b/wiki/pages/attributions.html @@ -16,40 +16,14 @@ max-width: 800px; margin: 0 auto; } - + h2 { scroll-margin-top: 60px; } .row.mt-4 { margin-left: 130px; } - - .progress-container { - position: fixed; - left: 20px; - bottom: 80px; - width: 60px; - height: 60px; - z-index: 1000; - } - - .progress-bar-circle { - transform: rotate(-90deg); - } - .progress-circle { - stroke: hsl(17, 100%, 50%); - stroke-linecap: round; - transition: stroke-dashoffset 0.3s; - } - .progress-text { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - font-size: 12px; - font-weight: bold; - color: hsl(17, 100%, 50%); - } + </style> </head> <body> @@ -134,31 +108,6 @@ </div> </div> - <script> - document.addEventListener('DOMContentLoaded', function() { - var circle = document.querySelector('.progress-circle'); - var radius = circle.r.baseVal.value; - var circumference = radius * 2 * Math.PI; - - circle.style.strokeDasharray = `${circumference} ${circumference}`; - circle.style.strokeDashoffset = circumference; - - function setProgress(percent) { - const offset = circumference - (percent / 100) * circumference; - circle.style.strokeDashoffset = offset; - document.querySelector('.progress-text').textContent = Math.round(percent) + '%'; - } - - function handleScroll() { - var winScroll = document.documentElement.scrollTop; - var height = document.documentElement.scrollHeight - document.documentElement.clientHeight; - var scrolled = (winScroll / height) * 100; - setProgress(scrolled); - } - - window.addEventListener('scroll', handleScroll); - }); - </script> </body> </html> {% endblock %} \ No newline at end of file diff --git a/wiki/pages/description.html b/wiki/pages/description.html index d2349309..e01258e4 100644 --- a/wiki/pages/description.html +++ b/wiki/pages/description.html @@ -16,31 +16,7 @@ max-width: 800px; margin: 0 auto; } - .sidebar { - position: fixed; - left: 0; - top: 280px; - width: 160px; - height: 40%; - background-color: #ffffff; - padding: 20px; - box-shadow: 2px 0 5px rgba(0,0,0,0.1); - border-radius: 20px; - } - .sidebar ul { - list-style: none; - padding: 0; - } - .sidebar ul li a { - display: block; - padding: 10px; - color: hsl(17, 100%, 50%); - text-decoration: none; - } - .sidebar ul li a:hover { - background-color: #e9ecef; - border-radius: 20px; - } + h2 { scroll-margin-top: 60px; } @@ -48,32 +24,6 @@ margin-left: 130px; } - .progress-container { - position: fixed; - left: 20px; - bottom: 80px; - width: 60px; - height: 60px; - z-index: 1000; - } - - .progress-bar-circle { - transform: rotate(-90deg); - } - .progress-circle { - stroke: hsl(17, 100%, 50%); - stroke-linecap: round; - transition: stroke-dashoffset 0.3s; - } - .progress-text { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - font-size: 12px; - font-weight: bold; - color: hsl(17, 100%, 50%); - } </style> </head> <body> @@ -157,31 +107,6 @@ </div> </div> - <script> - document.addEventListener('DOMContentLoaded', function() { - var circle = document.querySelector('.progress-circle'); - var radius = circle.r.baseVal.value; - var circumference = radius * 2 * Math.PI; - - circle.style.strokeDasharray = `${circumference} ${circumference}`; - circle.style.strokeDashoffset = circumference; - - function setProgress(percent) { - const offset = circumference - (percent / 100) * circumference; - circle.style.strokeDashoffset = offset; - document.querySelector('.progress-text').textContent = Math.round(percent) + '%'; - } - - function handleScroll() { - var winScroll = document.documentElement.scrollTop; - var height = document.documentElement.scrollHeight - document.documentElement.clientHeight; - var scrolled = (winScroll / height) * 100; - setProgress(scrolled); - } - - window.addEventListener('scroll', handleScroll); - }); - </script> </body> </html> {% endblock %} \ No newline at end of file diff --git a/wiki/pages/education.html b/wiki/pages/education.html index 22bcfdf0..57fcb114 100644 --- a/wiki/pages/education.html +++ b/wiki/pages/education.html @@ -16,31 +16,7 @@ max-width: 800px; margin: 0 auto; } - .sidebar { - position: fixed; - left: 0; - top: 280px; - width: 160px; - height: 40%; - background-color: #ffffff; - padding: 20px; - box-shadow: 2px 0 5px rgba(0,0,0,0.1); - border-radius: 20px; - } - .sidebar ul { - list-style: none; - padding: 0; - } - .sidebar ul li a { - display: block; - padding: 10px; - color: hsl(17, 100%, 50%); - text-decoration: none; - } - .sidebar ul li a:hover { - background-color: #e9ecef; - border-radius: 20px; - } + h2 { scroll-margin-top: 60px; } @@ -48,32 +24,6 @@ margin-left: 130px; } - .progress-container { - position: fixed; - left: 20px; - bottom: 80px; - width: 60px; - height: 60px; - z-index: 1000; - } - - .progress-bar-circle { - transform: rotate(-90deg); - } - .progress-circle { - stroke: hsl(17, 100%, 50%); - stroke-linecap: round; - transition: stroke-dashoffset 0.3s; - } - .progress-text { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - font-size: 12px; - font-weight: bold; - color: hsl(17, 100%, 50%); - } </style> </head> <body> @@ -157,31 +107,6 @@ </div> </div> - <script> - document.addEventListener('DOMContentLoaded', function() { - var circle = document.querySelector('.progress-circle'); - var radius = circle.r.baseVal.value; - var circumference = radius * 2 * Math.PI; - - circle.style.strokeDasharray = `${circumference} ${circumference}`; - circle.style.strokeDashoffset = circumference; - - function setProgress(percent) { - const offset = circumference - (percent / 100) * circumference; - circle.style.strokeDashoffset = offset; - document.querySelector('.progress-text').textContent = Math.round(percent) + '%'; - } - - function handleScroll() { - var winScroll = document.documentElement.scrollTop; - var height = document.documentElement.scrollHeight - document.documentElement.clientHeight; - var scrolled = (winScroll / height) * 100; - setProgress(scrolled); - } - - window.addEventListener('scroll', handleScroll); - }); - </script> </body> </html> {% endblock %} \ No newline at end of file -- GitLab