Really fix overflow not being updated properly + scroll title enough so that we can see it
All checks were successful
ci / deploy (push) Successful in 2m12s
All checks were successful
ci / deploy (push) Successful in 2m12s
This commit is contained in:
@@ -17,15 +17,18 @@
|
|||||||
}"
|
}"
|
||||||
x-init="setInterval(
|
x-init="setInterval(
|
||||||
async () => {
|
async () => {
|
||||||
metadata = await get_metadata()
|
metadata = await getMetadata()
|
||||||
},
|
},
|
||||||
2000,
|
2000,
|
||||||
)
|
)
|
||||||
$watch('metadata.title', (value, oldValue) => {
|
$watch('metadata.title', async (value, oldValue) => {
|
||||||
if (value != oldValue){
|
if (value == oldValue){
|
||||||
isTitleOverflow = false; // force a reset
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// First, reset overflow for proper recalculation
|
||||||
|
isTitleOverflow = false
|
||||||
|
await $nextTick()
|
||||||
|
// Now check for overflow
|
||||||
isTitleOverflow = $refs.scrollTitle.offsetWidth < $refs.scrollTitle.scrollWidth
|
isTitleOverflow = $refs.scrollTitle.offsetWidth < $refs.scrollTitle.scrollWidth
|
||||||
})
|
})
|
||||||
"
|
"
|
||||||
@@ -63,7 +66,7 @@
|
|||||||
|
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<script>
|
||||||
const get_metadata = async () => {
|
const getMetadata = async () => {
|
||||||
return Object.fromEntries(
|
return Object.fromEntries(
|
||||||
await (await fetch("/status.json")).json()
|
await (await fetch("/status.json")).json()
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ body {
|
|||||||
transform: translateX(0);
|
transform: translateX(0);
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
transform: translateX(-100%);
|
transform: translateX(-150%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user