Splash screen ✨
This commit is contained in:
parent
f871cf1053
commit
54bcb80b44
4 changed files with 26 additions and 22 deletions
|
@ -56,7 +56,9 @@ gulp.task('build:client:script', () => {
|
||||||
|
|
||||||
gulp.task('build:client:style', () => {
|
gulp.task('build:client:style', () => {
|
||||||
return gulp.src(['./src/server/web/style.css', './src/server/web/bios.css', './src/server/web/cli.css'])
|
return gulp.src(['./src/server/web/style.css', './src/server/web/bios.css', './src/server/web/cli.css'])
|
||||||
.pipe(cssnano())
|
.pipe(cssnano({
|
||||||
|
zindex: false
|
||||||
|
}))
|
||||||
.pipe(gulp.dest('./built/server/web/'));
|
.pipe(gulp.dest('./built/server/web/'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -220,11 +220,23 @@ components(app);
|
||||||
|
|
||||||
await router.isReady();
|
await router.isReady();
|
||||||
|
|
||||||
//document.body.innerHTML = '<div id="app"></div>';
|
const splash = document.getElementById('splash');
|
||||||
|
// 念のためnullチェック(HTMLが古い場合があるため(そのうち消す))
|
||||||
|
if (splash) splash.addEventListener('transitionend', () => {
|
||||||
|
splash.remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
const rootEl = document.createElement('div');
|
||||||
|
document.body.appendChild(rootEl);
|
||||||
|
app.mount(rootEl);
|
||||||
|
|
||||||
app.mount('body');
|
|
||||||
reactionPicker.init();
|
reactionPicker.init();
|
||||||
|
|
||||||
|
if (splash) {
|
||||||
|
splash.style.opacity = '0';
|
||||||
|
splash.style.pointerEvents = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
watch(defaultStore.reactiveState.darkMode, (darkMode) => {
|
watch(defaultStore.reactiveState.darkMode, (darkMode) => {
|
||||||
import('@/scripts/theme').then(({ builtinThemes }) => {
|
import('@/scripts/theme').then(({ builtinThemes }) => {
|
||||||
const themes = builtinThemes.concat(getThemes());
|
const themes = builtinThemes.concat(getThemes());
|
||||||
|
|
|
@ -3,17 +3,20 @@ html {
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ini {
|
#splash {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 1;
|
z-index: 10000;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
cursor: wait;
|
cursor: wait;
|
||||||
|
background-color: var(--bg);
|
||||||
|
opacity: 1;
|
||||||
|
transition: opacity 0.5s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ini > svg {
|
#splash > img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
@ -22,16 +25,5 @@ html {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
width: 64px;
|
width: 64px;
|
||||||
height: 64px;
|
height: 64px;
|
||||||
animation: ini 0.6s infinite linear;
|
pointer-events: none;
|
||||||
color: var(--accent);
|
|
||||||
fill: currentColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes ini {
|
|
||||||
from {
|
|
||||||
transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,8 +44,6 @@ html
|
||||||
| JavaScriptを有効にしてください
|
| JavaScriptを有効にしてください
|
||||||
br
|
br
|
||||||
| Please turn on your JavaScript
|
| Please turn on your JavaScript
|
||||||
div#ini.
|
div#splash
|
||||||
<svg viewBox="0 0 50 50">
|
img(src='/favicon.ico')
|
||||||
<path d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z" />
|
|
||||||
</svg>
|
|
||||||
block content
|
block content
|
||||||
|
|
Loading…
Reference in a new issue