This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:function url() { | |
var start_date = new Date(); | |
var start_dd = start_date.getDate(); | |
var start_mm = start_date.getMonth() + 1; | |
var start_yyyy = start_date.getFullYear(); | |
if (start_dd < 10) { start_dd = '0' + start_dd; } | |
if (start_mm < 10) { start_mm = '0' + start_mm; } | |
var start = '' + start_yyyy + start_mm + start_dd; | |
var end_date = new Date(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// return array with image data | |
export async function getImage(image) { | |
const pathname = `${path.dirname(image)}/${path.parse(image).name}`; | |
const extension = path.parse(image).ext; | |
const source = `${imageConfig.cloudUrl}${pathname}${extension}`; // final image source | |
let metadata = await exifReader.load(source, { length: 128 * 1024 }); | |
if (typeof metadata["Object Name"] === "undefined" || metadata["Object Name"] === null) { | |
return { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create an api connection to digitalocean spaces | |
export const spacesClient = new S3({ | |
endpoint: "https://nyc3.digitaloceanspaces.com", | |
region: "us-east-1", | |
credentials: { | |
accessKeyId: import.meta.env.SPACES_KEY, | |
secretAccessKey: import.meta.env.SPACES_SECRET, | |
}, | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const banner = document.querySelector("#banner"); | |
const nav = document.querySelector("#navigation"); | |
// Create a new IntersectionObserver object | |
let observer = new IntersectionObserver(function (entries, observer) { | |
for (let entry of entries) { | |
if (entry.isIntersecting) { | |
nav.classList.remove("bg-stone-200"); | |
nav.classList.add("bg-stone-100"); | |
} else { |