Add category filter for skills (#979)

Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
This commit is contained in:
JY Hsu 2024-09-20 08:57:14 +08:00 committed by GitHub
parent 0f6737eee0
commit 9da3e3420b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 39 additions and 7 deletions

View file

@ -4,4 +4,5 @@ import './sidebar'
import './education'
import './achievements'
import './projects'
import './skills'
import './publications'

View file

@ -0,0 +1,15 @@
import Filterizr from 'filterizr'
document.addEventListener('DOMContentLoaded', () => {
// ================== Skill cards =====================
// setup skill filter buttons
const skillCardHolder = document.getElementById('skill-card-holder')
if (skillCardHolder != null && skillCardHolder.children.length !== 0) {
// eslint-disable-next-line no-new
new Filterizr('.filtr-skills', {
layout: 'sameWidth',
controlsSelector: '.skill-filtr-control'
})
}
})