Merge pull request #12 from ZXY101/jidoujisho-testing
Temporary Jidoujisho compatibility
This commit is contained in:
@@ -11,6 +11,9 @@
|
|||||||
%sveltekit.head%
|
%sveltekit.head%
|
||||||
</head>
|
</head>
|
||||||
<body data-sveltekit-preload-data="hover" class="bg-white dark:bg-gray-950 dark:text-white">
|
<body data-sveltekit-preload-data="hover" class="bg-white dark:bg-gray-950 dark:text-white">
|
||||||
<div style="display: contents">%sveltekit.body%</div>
|
<div
|
||||||
|
id="popupAbout"
|
||||||
|
class="pageContainer"
|
||||||
|
style="display: contents; background-image: url('https://reader.mokuro.app/_app/immutable/assets/icon.06fcfdd6.webp');">%sveltekit.body%</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -9,7 +9,10 @@
|
|||||||
|
|
||||||
$: url = src ? `url(${URL.createObjectURL(src)})` : '';
|
$: url = src ? `url(${URL.createObjectURL(src)})` : '';
|
||||||
|
|
||||||
|
let legacy: HTMLElement | null;
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
legacy = document.getElementById('popupAbout');
|
||||||
zoomDefault();
|
zoomDefault();
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
@@ -19,6 +22,12 @@
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$: {
|
||||||
|
if (legacy) {
|
||||||
|
legacy.style.backgroundImage = url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
afterUpdate(() => {
|
afterUpdate(() => {
|
||||||
zoomDefault();
|
zoomDefault();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -76,9 +76,9 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#each textBoxes as { fontSize, height, left, lines, top, width, writingMode }, index (`text-box-${index}`)}
|
{#each textBoxes as { fontSize, height, left, lines, top, width, writingMode }, index (`textBox-${index}`)}
|
||||||
<div
|
<div
|
||||||
class="text-box"
|
class="textBox"
|
||||||
style:width
|
style:width
|
||||||
style:height
|
style:height
|
||||||
style:left
|
style:left
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.text-box {
|
.textBox {
|
||||||
color: black;
|
color: black;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -111,13 +111,13 @@
|
|||||||
z-index: 11;
|
z-index: 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-box:focus,
|
.textBox:focus,
|
||||||
.text-box:hover {
|
.textBox:hover {
|
||||||
background: rgb(255, 255, 255);
|
background: rgb(255, 255, 255);
|
||||||
border: 1px solid rgba(0, 0, 0, 0);
|
border: 1px solid rgba(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-box p {
|
.textBox p {
|
||||||
display: none;
|
display: none;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
letter-spacing: 0.1em;
|
letter-spacing: 0.1em;
|
||||||
@@ -128,8 +128,8 @@
|
|||||||
z-index: 11;
|
z-index: 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-box:focus p,
|
.textBox:focus p,
|
||||||
.text-box:hover p {
|
.textBox:hover p {
|
||||||
display: table;
|
display: table;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user