move ityped to js asset, implement experiences horizontal vertical line in css

This commit is contained in:
Aaron Qian 2022-11-11 10:47:14 -08:00 committed by Aaron Qian
parent 97d60b44d9
commit a06ee73c4a
No known key found for this signature in database
GPG key ID: BF1A987C395B5B0E
4 changed files with 26 additions and 48 deletions

View file

@ -0,0 +1,16 @@
import {init} from 'ityped';
// =========== Typing Carousel ================
// get data from hidden ul and set as typing data
document.addEventListener('DOMContentLoaded', () => {
$ul = document.getElementById('typing-carousel-data')?.children;
if($ul == null || $ul.length === 0) return;
const strings = Array.from($ul).map($el => $el.textContent);
init('#ityped', {
strings,
startDelay: 200,
loop: true
});
});

View file

@ -1,3 +1,4 @@
import './note';
import './search';
import './single';
import './home';