forked from laysense/laysense.cn
Migrate Laysense to unmodified LaySite 1.5.2
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
const homeHero = document.querySelector('#main-content > .hero-home');
|
||||
const homeTitle = homeHero?.querySelector('.hero-copy h1');
|
||||
if (homeTitle) {
|
||||
const cursor = document.createElement('span');
|
||||
cursor.className = 'home-cursor';
|
||||
cursor.setAttribute('aria-hidden', 'true');
|
||||
cursor.textContent = '_';
|
||||
homeTitle.append(cursor);
|
||||
}
|
||||
|
||||
const homeImage = homeHero?.querySelector('.hero-visual > img');
|
||||
if (homeImage && new URL(homeImage.src).pathname === HOME_IMAGE_PATH) {
|
||||
homeImage.insertAdjacentHTML('afterend', HOME_MOTION_SVG);
|
||||
}
|
||||
|
||||
document.querySelector('#main-content > .hero-home ~ #about')?.setAttribute('data-moment', 'iris-opens');
|
||||
Reference in New Issue
Block a user