feat: add madeira blog post upgrade astro
Some checks failed
Deploy to SFTP Server / build (push) Failing after 5m43s
Some checks failed
Deploy to SFTP Server / build (push) Failing after 5m43s
This commit is contained in:
@@ -141,6 +141,15 @@
|
||||
// console.log(ev);
|
||||
};
|
||||
|
||||
function formatExposureTime(num: string) {
|
||||
if (num.includes("/")) {
|
||||
const [a, b] = num.split("/");
|
||||
return `${a}/${b}s`;
|
||||
} else {
|
||||
return num + "s";
|
||||
}
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
const wrappers = Array.prototype.slice.call(
|
||||
document.querySelectorAll("picture > img"),
|
||||
@@ -168,7 +177,9 @@
|
||||
? exifData.FocalLength.replace(" mm", "mm")
|
||||
: "",
|
||||
"FNumber" in exifData ? exifData.FNumber : "",
|
||||
"ExposureTime" in exifData ? exifData.ExposureTime : "",
|
||||
"ExposureTime" in exifData
|
||||
? formatExposureTime(exifData.ExposureTime)
|
||||
: "",
|
||||
];
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -206,10 +217,11 @@
|
||||
<div class="controls">
|
||||
{#each images as _, i}
|
||||
<button
|
||||
aria-label={`Image ${i + 1}`}
|
||||
class:active={currentIndex === i}
|
||||
on:click={() => {
|
||||
currentIndex = i;
|
||||
}} />
|
||||
}}></button>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
|
Reference in New Issue
Block a user