cleanup, styles, fox random, and better "animation" for orz
This commit is contained in:
parent
414947d755
commit
82936aed38
32
index.html
32
index.html
|
@ -29,10 +29,8 @@
|
||||||
#splash-credit {
|
#splash-credit {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
bottom: 0;
|
bottom: 16px;
|
||||||
right: 0;
|
right: 16px;
|
||||||
margin-right: 8px
|
|
||||||
margin-bottom: 8px
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#splash-container {
|
#splash-container {
|
||||||
|
@ -43,30 +41,25 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
perspective: 60em;
|
||||||
|
perspective-origin: 0 -15em;
|
||||||
|
transform-style: preserve-3d;
|
||||||
}
|
}
|
||||||
|
|
||||||
#mascot:not(.orz) {
|
#mascot {
|
||||||
margin-bottom: 2em
|
|
||||||
object-position: 2.5em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mascot-temp.orz {
|
|
||||||
margin-bottom: 2em
|
|
||||||
object-position: 2.5em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mascot,
|
|
||||||
#mascot-temp {
|
|
||||||
width: calc(10em * var(--scale));
|
width: calc(10em * var(--scale));
|
||||||
height: calc(8em * var(--scale));
|
height: calc(10em * var(--scale));
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
object-position: bottom;
|
object-position: bottom;
|
||||||
|
transform: translateZ(-2em);
|
||||||
}
|
}
|
||||||
|
|
||||||
#throbber {
|
#throbber {
|
||||||
display: grid;
|
display: grid;
|
||||||
width: calc(5em * 0.5 * var(--scale));
|
width: calc(5em * 0.5 * var(--scale));
|
||||||
height: calc(8em * 0.5 * var(--scale));
|
height: calc(8em * 0.5 * var(--scale));
|
||||||
|
margin-left: 5.1em;
|
||||||
|
z-index: 2;
|
||||||
grid-template-rows: repeat(8, 1fr);
|
grid-template-rows: repeat(8, 1fr);
|
||||||
grid-template-columns: repeat(5, 1fr);
|
grid-template-columns: repeat(5, 1fr);
|
||||||
grid-template-areas: "P P . L L"
|
grid-template-areas: "P P . L L"
|
||||||
|
@ -100,6 +93,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#status {
|
#status {
|
||||||
|
margin-top: 0.5em;
|
||||||
line-height: 2;
|
line-height: 2;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -107,7 +101,7 @@
|
||||||
|
|
||||||
@media (prefers-reduced-motion) {
|
@media (prefers-reduced-motion) {
|
||||||
#throbber {
|
#throbber {
|
||||||
animation: none;
|
animation: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -132,7 +126,7 @@
|
||||||
<div class="chunk" id="chunk-E">
|
<div class="chunk" id="chunk-E">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<img id="mascot" src="/static/pleromatan_apology_fox.png">
|
<img id="mascot" src="/static/pleromatan_apology.png">
|
||||||
</div>
|
</div>
|
||||||
<div id="status" class="css-ok">
|
<div id="status" class="css-ok">
|
||||||
<!-- (。>﹏<) -->
|
<!-- (。>﹏<) -->
|
||||||
|
|
|
@ -954,8 +954,7 @@ option {
|
||||||
|
|
||||||
&.dead {
|
&.dead {
|
||||||
animation-name: dead;
|
animation-name: dead;
|
||||||
animation-duration: 3s;
|
animation-duration: 2s;
|
||||||
// animation-iteration-count: 1;
|
|
||||||
animation-iteration-count: 1;
|
animation-iteration-count: 1;
|
||||||
transform: rotateX(90deg) rotateY(0) rotateZ(-45deg);
|
transform: rotateX(90deg) rotateY(0) rotateZ(-45deg);
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 396 KiB After Width: | Height: | Size: 35 B |
1
src/assets/pleromatan_apology.png
Symbolic link
1
src/assets/pleromatan_apology.png
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../static/pleromatan_apology.png
|
Before Width: | Height: | Size: 396 KiB After Width: | Height: | Size: 35 B |
23
src/main.js
23
src/main.js
|
@ -48,16 +48,6 @@ const i18n = createI18n({
|
||||||
|
|
||||||
messages.setLanguage(i18n.global, currentLocale)
|
messages.setLanguage(i18n.global, currentLocale)
|
||||||
|
|
||||||
const splashError = (i18n, e) => {
|
|
||||||
document.querySelector('#mascot').src = (Math.floor(Math.random() * 2) > 0)
|
|
||||||
? '/static/pleromatan_orz_fox.png'
|
|
||||||
: '/static/pleromatan_orz.png'
|
|
||||||
document.querySelector('#mascot').classList.add('orz')
|
|
||||||
document.querySelector('#throbber').classList.add('dead')
|
|
||||||
document.querySelector('#status').textContent = i18n.global.t('splash.error')
|
|
||||||
console.error('PleromaFE failed to initialize: ', e)
|
|
||||||
}
|
|
||||||
|
|
||||||
const persistedStateOptions = {
|
const persistedStateOptions = {
|
||||||
paths: [
|
paths: [
|
||||||
'serverSideStorage.cache',
|
'serverSideStorage.cache',
|
||||||
|
@ -68,6 +58,18 @@ const persistedStateOptions = {
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
|
const isFox = Math.floor(Math.random() * 2) > 0 ? '_fox' : ''
|
||||||
|
|
||||||
|
const splashError = (i18n, e) => {
|
||||||
|
const throbber = document.querySelector('#throbber')
|
||||||
|
throbber.addEventListener('animationend', () => {
|
||||||
|
document.querySelector('#mascot').src = `/static/pleromatan_orz${isFox}.png`
|
||||||
|
})
|
||||||
|
throbber.classList.add('dead')
|
||||||
|
document.querySelector('#status').textContent = i18n.global.t('splash.error')
|
||||||
|
console.error('PleromaFE failed to initialize: ', e)
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let storageError
|
let storageError
|
||||||
const plugins = [pushNotifications]
|
const plugins = [pushNotifications]
|
||||||
|
@ -78,6 +80,7 @@ const persistedStateOptions = {
|
||||||
console.error('Storage error', e)
|
console.error('Storage error', e)
|
||||||
storageError = e
|
storageError = e
|
||||||
}
|
}
|
||||||
|
document.querySelector('#mascot').src = `/static/pleromatan_apology${isFox}.png`
|
||||||
document.querySelector('#status').removeAttribute('class')
|
document.querySelector('#status').removeAttribute('class')
|
||||||
document.querySelector('#status').textContent = i18n.global.t('splash.loading')
|
document.querySelector('#status').textContent = i18n.global.t('splash.loading')
|
||||||
document.querySelector('#splash-credit').textContent = i18n.global.t('update.art_by', { linkToArtist: 'pipivovott' })
|
document.querySelector('#splash-credit').textContent = i18n.global.t('update.art_by', { linkToArtist: 'pipivovott' })
|
||||||
|
|
BIN
static/pleromatan_apology.png
Normal file
BIN
static/pleromatan_apology.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 396 KiB |
Loading…
Reference in a new issue