move ityped to js asset, implement experiences horizontal vertical line in css
This commit is contained in:
parent
97d60b44d9
commit
a06ee73c4a
4 changed files with 26 additions and 48 deletions
16
assets/scripts/pages/home.js
Normal file
16
assets/scripts/pages/home.js
Normal 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
|
||||
});
|
||||
});
|
|
@ -1,3 +1,4 @@
|
|||
import './note';
|
||||
import './search';
|
||||
import './single';
|
||||
import './home';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue