Updated About page
This commit is contained in:
28
static/js/about.js
Normal file
28
static/js/about.js
Normal file
@@ -0,0 +1,28 @@
|
||||
document.querySelectorAll('.panel-small')?.forEach(el => {
|
||||
el.addEventListener('click', (event) => {
|
||||
let self = event.target;
|
||||
if (self.classList.contains('panel-small') || self.closest('.panel-small')){
|
||||
if (!self.classList.contains('panel-small')){
|
||||
self = self.closest('.panel-small');
|
||||
}
|
||||
|
||||
if (self.classList.contains('source_code')) {
|
||||
window.open('https://github.com/clarinsi/STARK', '_blank');
|
||||
return; // Skip further handling
|
||||
}
|
||||
|
||||
const id = self?.id;
|
||||
if (id){
|
||||
document.querySelectorAll('.panel-content-section')?.forEach(section => {
|
||||
section.hidden = true;
|
||||
});
|
||||
document.querySelectorAll('.panel-small')?.forEach(el => el.classList.remove('active'))
|
||||
self.classList.add('active');
|
||||
const targetSection = document.querySelector(`[data-content-for="${id}"]`);
|
||||
if (targetSection) {
|
||||
targetSection.hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user