Compare commits

...

3 Commits

Author SHA1 Message Date
M Sarmad Qadeer 912d35b61a Merge branch 'master' into sq/web-glossary-fix 2024-06-21 01:11:49 +05:00
M Sarmad Qadeer c07f6c4e94 web: a quick path fix 2024-06-21 01:09:00 +05:00
M Sarmad Qadeer 049fb512a9 web: glossary fix 2024-06-06 14:34:30 +05:00
7 changed files with 43 additions and 15 deletions
+2
View File
@@ -404,6 +404,7 @@ 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)) {
@@ -413,6 +414,7 @@ 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}`)
+2 -1
View File
@@ -38,10 +38,11 @@
</div>
<section id="article" class="container mb-[75px] bg-white dark:bg-[#17203D] px-5">
<div class="py-6 md:p-[60px]">{{ content | safe }}</div>
<div class="py-6 md:p-[60px]">{{ content | applyGlossary | safe }}</div>
</section>
{% include "footer.html" %}
<script src="/js/script.js"></script>
<script src="/js/prism.min.js"></script>
</body>
+2 -1
View File
@@ -108,7 +108,7 @@
</div>
</div>
</div>
<div>{{ content | safe }}</div>
<div>{{ content | applyGlossary | safe }}</div>
</article>
</main>
</div>
@@ -117,6 +117,7 @@
{% include "footer.html" %}
<script src="/js/docs.js"></script>
<script src="/js/script.js"></script>
<script src="/js/prism.min.js"></script>
</body>
+2 -1
View File
@@ -33,10 +33,11 @@
{% include "navbar.html" %}
<section id="article" class="container mt-[25px] mb-[75px] bg-white dark:bg-[#17203D] px-5">
<div class="py-6 md:p-[60px]">{{ content | safe }}</div>
<div class="py-6 md:p-[60px]">{{ content | applyGlossary | safe }}</div>
</section>
{% include "footer.html" %}
<script src="/js/script.js"></script>
</body>
</html>
+4
View File
@@ -217,6 +217,10 @@ h6 {
float: right;
margin-left: 3rem;
}
#article .float-right{
margin-left: 3rem;
}
}
@media (max-width:768px) {
+22 -12
View File
@@ -764,14 +764,15 @@ p a{
}
.tooltip-title{
margin-bottom: 0.5rem;
color: #0197FF;
font-weight: 600;
font-size: 1.1rem;
margin: 0 !important;
margin-bottom: 0.5rem !important;
color: #0197FF !important;
font-weight: 600 !important;
font-size: 1.1rem !important;
}
.dark .tooltip-title{
color: #70F0F9;
color: #70F0F9 !important;
}
.glossary-tooltip .read-more-btn{
@@ -854,13 +855,18 @@ p a{
}
.glossary-overlay .overlay-card .overlay-title{
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));
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;
}
.glossary-overlay .overlay-card .overlay-content{
@@ -876,6 +882,10 @@ p a{
color: #fff;
}
.glossary-overlay .overlay-card .overlay-content p{
margin: 0 !important;
}
.close-overlay-btn{
fill: #3F484B;
position: fixed;
+9
View File
@@ -1,3 +1,5 @@
const uniqueSwiperContainer = document.querySelector('.unique-swiper')
if (uniqueSwiperContainer) {
const uniqueSwiper = new Swiper('.unique-swiper', {
slidesPerView: 1,
spaceBetween: 80,
@@ -23,12 +25,15 @@ 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,
@@ -79,7 +84,10 @@ 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,
@@ -112,6 +120,7 @@ const simplexExplainedSwiper = new Swiper(".simplex-explained-swiper", {
}
}
});
}
function closeOverlay(e) {
e.target.closest('.overlay').classList.remove('flex');