migrated home.js and refactored into various sections

This commit is contained in:
Aaron Qian 2022-11-11 12:18:28 -08:00 committed by Aaron Qian
parent 954507a20d
commit 67c1f520d8
No known key found for this signature in database
GPG key ID: BF1A987C395B5B0E
13 changed files with 268 additions and 632 deletions

View file

@ -0,0 +1,18 @@
import Filterizr from 'filterizr';
import { insertScript } from '../core'
document.addEventListener('DOMContentLoaded', () => {
// ================== Project cards =====================
// setup project filter buttons
var projectCardHolder = document.getElementById("project-card-holder");
if (projectCardHolder != null && projectCardHolder.children.length != 0) {
new Filterizr(".filtr-projects", {
layout: 'sameWidth',
controlsSelector: '.project-filtr-control',
});
}
});
// dynamically insert github buttons script.
insertScript('github-buttons', 'https://buttons.github.io/buttons.js');