From d993381d31e9f607a73bde2ef8ad019add77413a Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Tue, 18 Jun 2024 23:44:58 +0100 Subject: [PATCH] Revert "web: glossary fix (#4298)" This reverts commit d3274b28ba4d4af2b19c80164811853887fa6cce. --- website/.eleventy.js | 4 +-- website/src/_includes/layouts/article.html | 3 +- website/src/_includes/layouts/doc.html | 3 +- website/src/_includes/layouts/privacy.html | 3 +- website/src/css/blog.css | 4 --- website/src/css/style.css | 34 ++++++++-------------- website/src/js/script.js | 9 ------ 7 files changed, 17 insertions(+), 43 deletions(-) diff --git a/website/.eleventy.js b/website/.eleventy.js index a3b94643e8..a0a35f3366 100644 --- a/website/.eleventy.js +++ b/website/.eleventy.js @@ -404,7 +404,6 @@ module.exports = function (ty) { // this condition works if the link is a valid website file const fileContent = fs.readFileSync(linkFile, 'utf8') parsed.path = (matter(fileContent).data?.permalink || parsed.path).replace(/\.md$/, ".html").toLowerCase() - return parsed.path } else if (!fs.existsSync(linkFile)) { linkFile = linkFile.replace('/website/src', '') if (fs.existsSync(linkFile)) { @@ -414,12 +413,13 @@ module.exports = function (ty) { index = linkFile.indexOf(keyword) linkFile = linkFile.substring(index + keyword.length) parsed.path = `${githubUrl}${linkFile}` - return parsed.path } else { // if the link is not a valid website file or project file throw new Error(`Broken link: ${parsed.path} in ${hostFile}`) } } + + return uri.serialize(parsed) } }).use(markdownItAnchor, { slugify: (str) => diff --git a/website/src/_includes/layouts/article.html b/website/src/_includes/layouts/article.html index 4550aa96d7..783b6ece7c 100644 --- a/website/src/_includes/layouts/article.html +++ b/website/src/_includes/layouts/article.html @@ -38,11 +38,10 @@
-
{{ content | applyGlossary | safe }}
+
{{ content | safe }}
{% include "footer.html" %} - diff --git a/website/src/_includes/layouts/doc.html b/website/src/_includes/layouts/doc.html index 66ec7f022b..091f98bdc7 100644 --- a/website/src/_includes/layouts/doc.html +++ b/website/src/_includes/layouts/doc.html @@ -108,7 +108,7 @@ -
{{ content | applyGlossary | safe }}
+
{{ content | safe }}
@@ -117,7 +117,6 @@ {% include "footer.html" %} - diff --git a/website/src/_includes/layouts/privacy.html b/website/src/_includes/layouts/privacy.html index fcaa9964e3..7527852694 100644 --- a/website/src/_includes/layouts/privacy.html +++ b/website/src/_includes/layouts/privacy.html @@ -33,11 +33,10 @@ {% include "navbar.html" %}
-
{{ content | applyGlossary | safe }}
+
{{ content | safe }}
{% include "footer.html" %} - diff --git a/website/src/css/blog.css b/website/src/css/blog.css index a5d1ae0a1a..897fbafb10 100644 --- a/website/src/css/blog.css +++ b/website/src/css/blog.css @@ -217,10 +217,6 @@ h6 { float: right; margin-left: 3rem; } - - #article .float-right{ - margin-left: 3rem; - } } @media (max-width:768px) { diff --git a/website/src/css/style.css b/website/src/css/style.css index a33c13d9c5..475eddc404 100644 --- a/website/src/css/style.css +++ b/website/src/css/style.css @@ -764,15 +764,14 @@ p a{ } .tooltip-title{ - margin: 0 !important; - margin-bottom: 0.5rem !important; - color: #0197FF !important; - font-weight: 600 !important; - font-size: 1.1rem !important; + margin-bottom: 0.5rem; + color: #0197FF; + font-weight: 600; + font-size: 1.1rem; } .dark .tooltip-title{ - color: #70F0F9 !important; + color: #70F0F9; } .glossary-tooltip .read-more-btn{ @@ -855,18 +854,13 @@ p a{ } .glossary-overlay .overlay-card .overlay-title{ - font-size: 1.875rem !important; - line-height: 2.25rem !important; - font-weight: 700 !important; - margin: 0 !important; - padding: 0 !important; - margin-bottom: 1.5rem !important; - --tw-text-opacity: 1 !important; - color: rgb(1 151 255 / var(--tw-text-opacity)) !important; -} - -.glossary-overlay .overlay-card .overlay-title::after{ - background-color: transparent !important; + font-size: 1.875rem; + line-height: 2.25rem; + font-weight: 700; + margin-bottom: 1rem; + margin-bottom: 1.5rem; + --tw-text-opacity: 1; + color: rgb(1 151 255 / var(--tw-text-opacity)); } .glossary-overlay .overlay-card .overlay-content{ @@ -882,10 +876,6 @@ p a{ color: #fff; } -.glossary-overlay .overlay-card .overlay-content p{ - margin: 0 !important; -} - .close-overlay-btn{ fill: #3F484B; position: fixed; diff --git a/website/src/js/script.js b/website/src/js/script.js index abf7779ad3..5f863f48ee 100644 --- a/website/src/js/script.js +++ b/website/src/js/script.js @@ -1,5 +1,3 @@ -const uniqueSwiperContainer = document.querySelector('.unique-swiper') -if (uniqueSwiperContainer) { const uniqueSwiper = new Swiper('.unique-swiper', { slidesPerView: 1, spaceBetween: 80, @@ -25,15 +23,12 @@ const uniqueSwiper = new Swiper('.unique-swiper', { prevEl: '.unique-swiper-button-prev', }, }); -} const isMobile = { Android: () => navigator.userAgent.match(/Android/i), iOS: () => navigator.userAgent.match(/iPhone|iPad|iPod/i) }; -const privateSwiperContainer = document.querySelector('.private-swiper') -if (privateSwiperContainer) { const privateSwiper = new Swiper('.private-swiper', { slidesPerView: 1, slidesPerGroup: 1, @@ -84,10 +79,7 @@ const privateSwiper = new Swiper('.private-swiper', { } } }); -} -const simplexExplainedSwiperContainer = document.querySelector('.simplex-explained-swiper') -if (simplexExplainedSwiperContainer){ const simplexExplainedSwiper = new Swiper(".simplex-explained-swiper", { slidesPerView: 1, spaceBetween: 80, @@ -120,7 +112,6 @@ const simplexExplainedSwiper = new Swiper(".simplex-explained-swiper", { } } }); -} function closeOverlay(e) { e.target.closest('.overlay').classList.remove('flex');