mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-28 20:29:53 +00:00
parent
0198c1f110
commit
d993381d31
7 changed files with 17 additions and 43 deletions
|
@ -404,7 +404,6 @@ module.exports = function (ty) {
|
||||||
// this condition works if the link is a valid website file
|
// this condition works if the link is a valid website file
|
||||||
const fileContent = fs.readFileSync(linkFile, 'utf8')
|
const fileContent = fs.readFileSync(linkFile, 'utf8')
|
||||||
parsed.path = (matter(fileContent).data?.permalink || parsed.path).replace(/\.md$/, ".html").toLowerCase()
|
parsed.path = (matter(fileContent).data?.permalink || parsed.path).replace(/\.md$/, ".html").toLowerCase()
|
||||||
return parsed.path
|
|
||||||
} else if (!fs.existsSync(linkFile)) {
|
} else if (!fs.existsSync(linkFile)) {
|
||||||
linkFile = linkFile.replace('/website/src', '')
|
linkFile = linkFile.replace('/website/src', '')
|
||||||
if (fs.existsSync(linkFile)) {
|
if (fs.existsSync(linkFile)) {
|
||||||
|
@ -414,12 +413,13 @@ module.exports = function (ty) {
|
||||||
index = linkFile.indexOf(keyword)
|
index = linkFile.indexOf(keyword)
|
||||||
linkFile = linkFile.substring(index + keyword.length)
|
linkFile = linkFile.substring(index + keyword.length)
|
||||||
parsed.path = `${githubUrl}${linkFile}`
|
parsed.path = `${githubUrl}${linkFile}`
|
||||||
return parsed.path
|
|
||||||
} else {
|
} else {
|
||||||
// if the link is not a valid website file or project file
|
// if the link is not a valid website file or project file
|
||||||
throw new Error(`Broken link: ${parsed.path} in ${hostFile}`)
|
throw new Error(`Broken link: ${parsed.path} in ${hostFile}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return uri.serialize(parsed)
|
||||||
}
|
}
|
||||||
}).use(markdownItAnchor, {
|
}).use(markdownItAnchor, {
|
||||||
slugify: (str) =>
|
slugify: (str) =>
|
||||||
|
|
|
@ -38,11 +38,10 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<section id="article" class="container mb-[75px] bg-white dark:bg-[#17203D] px-5">
|
<section id="article" class="container mb-[75px] bg-white dark:bg-[#17203D] px-5">
|
||||||
<div class="py-6 md:p-[60px]">{{ content | applyGlossary | safe }}</div>
|
<div class="py-6 md:p-[60px]">{{ content | safe }}</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% include "footer.html" %}
|
{% include "footer.html" %}
|
||||||
<script src="/js/script.js"></script>
|
|
||||||
<script src="/js/prism.min.js"></script>
|
<script src="/js/prism.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>{{ content | applyGlossary | safe }}</div>
|
<div>{{ content | safe }}</div>
|
||||||
</article>
|
</article>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
@ -117,7 +117,6 @@
|
||||||
{% include "footer.html" %}
|
{% include "footer.html" %}
|
||||||
|
|
||||||
<script src="/js/docs.js"></script>
|
<script src="/js/docs.js"></script>
|
||||||
<script src="/js/script.js"></script>
|
|
||||||
<script src="/js/prism.min.js"></script>
|
<script src="/js/prism.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
@ -33,11 +33,10 @@
|
||||||
{% include "navbar.html" %}
|
{% include "navbar.html" %}
|
||||||
|
|
||||||
<section id="article" class="container mt-[25px] mb-[75px] bg-white dark:bg-[#17203D] px-5">
|
<section id="article" class="container mt-[25px] mb-[75px] bg-white dark:bg-[#17203D] px-5">
|
||||||
<div class="py-6 md:p-[60px]">{{ content | applyGlossary | safe }}</div>
|
<div class="py-6 md:p-[60px]">{{ content | safe }}</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% include "footer.html" %}
|
{% include "footer.html" %}
|
||||||
<script src="/js/script.js"></script>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -217,10 +217,6 @@ h6 {
|
||||||
float: right;
|
float: right;
|
||||||
margin-left: 3rem;
|
margin-left: 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#article .float-right{
|
|
||||||
margin-left: 3rem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width:768px) {
|
@media (max-width:768px) {
|
||||||
|
|
|
@ -764,15 +764,14 @@ p a{
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip-title{
|
.tooltip-title{
|
||||||
margin: 0 !important;
|
margin-bottom: 0.5rem;
|
||||||
margin-bottom: 0.5rem !important;
|
color: #0197FF;
|
||||||
color: #0197FF !important;
|
font-weight: 600;
|
||||||
font-weight: 600 !important;
|
font-size: 1.1rem;
|
||||||
font-size: 1.1rem !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark .tooltip-title{
|
.dark .tooltip-title{
|
||||||
color: #70F0F9 !important;
|
color: #70F0F9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.glossary-tooltip .read-more-btn{
|
.glossary-tooltip .read-more-btn{
|
||||||
|
@ -855,18 +854,13 @@ p a{
|
||||||
}
|
}
|
||||||
|
|
||||||
.glossary-overlay .overlay-card .overlay-title{
|
.glossary-overlay .overlay-card .overlay-title{
|
||||||
font-size: 1.875rem !important;
|
font-size: 1.875rem;
|
||||||
line-height: 2.25rem !important;
|
line-height: 2.25rem;
|
||||||
font-weight: 700 !important;
|
font-weight: 700;
|
||||||
margin: 0 !important;
|
margin-bottom: 1rem;
|
||||||
padding: 0 !important;
|
margin-bottom: 1.5rem;
|
||||||
margin-bottom: 1.5rem !important;
|
--tw-text-opacity: 1;
|
||||||
--tw-text-opacity: 1 !important;
|
color: rgb(1 151 255 / var(--tw-text-opacity));
|
||||||
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{
|
.glossary-overlay .overlay-card .overlay-content{
|
||||||
|
@ -882,10 +876,6 @@ p a{
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.glossary-overlay .overlay-card .overlay-content p{
|
|
||||||
margin: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.close-overlay-btn{
|
.close-overlay-btn{
|
||||||
fill: #3F484B;
|
fill: #3F484B;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
const uniqueSwiperContainer = document.querySelector('.unique-swiper')
|
|
||||||
if (uniqueSwiperContainer) {
|
|
||||||
const uniqueSwiper = new Swiper('.unique-swiper', {
|
const uniqueSwiper = new Swiper('.unique-swiper', {
|
||||||
slidesPerView: 1,
|
slidesPerView: 1,
|
||||||
spaceBetween: 80,
|
spaceBetween: 80,
|
||||||
|
@ -25,15 +23,12 @@ const uniqueSwiper = new Swiper('.unique-swiper', {
|
||||||
prevEl: '.unique-swiper-button-prev',
|
prevEl: '.unique-swiper-button-prev',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
const isMobile = {
|
const isMobile = {
|
||||||
Android: () => navigator.userAgent.match(/Android/i),
|
Android: () => navigator.userAgent.match(/Android/i),
|
||||||
iOS: () => navigator.userAgent.match(/iPhone|iPad|iPod/i)
|
iOS: () => navigator.userAgent.match(/iPhone|iPad|iPod/i)
|
||||||
};
|
};
|
||||||
|
|
||||||
const privateSwiperContainer = document.querySelector('.private-swiper')
|
|
||||||
if (privateSwiperContainer) {
|
|
||||||
const privateSwiper = new Swiper('.private-swiper', {
|
const privateSwiper = new Swiper('.private-swiper', {
|
||||||
slidesPerView: 1,
|
slidesPerView: 1,
|
||||||
slidesPerGroup: 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", {
|
const simplexExplainedSwiper = new Swiper(".simplex-explained-swiper", {
|
||||||
slidesPerView: 1,
|
slidesPerView: 1,
|
||||||
spaceBetween: 80,
|
spaceBetween: 80,
|
||||||
|
@ -120,7 +112,6 @@ const simplexExplainedSwiper = new Swiper(".simplex-explained-swiper", {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
function closeOverlay(e) {
|
function closeOverlay(e) {
|
||||||
e.target.closest('.overlay').classList.remove('flex');
|
e.target.closest('.overlay').classList.remove('flex');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue