Rebuild assets

This commit is contained in:
2023-06-18 15:53:57 +10:00
parent 0cf6d0d540
commit 5c30d03f51
7 changed files with 59 additions and 2363 deletions

View File

@@ -1 +1 @@
{"gallery.js":"gallery-tqDgU23Vw2lU.js","index.js":"index-tqDgU23Vw2lU.js","index.css":"index-tqDgU23Vw2lU.css"}
{"gallery.js":"gallery-EqYUgGAsu2kC.js","index.js":"index-EqYUgGAsu2kC.js","index.css":"index-EqYUgGAsu2kC.css"}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,56 @@
(function() {
document.addEventListener('alpine:init', () => {
Alpine.magic('clipboard', () => {
return subject => navigator.clipboard.writeText(subject)
})
})
document.addEventListener("DOMContentLoaded", function () {
const times = document.querySelectorAll('time');
times.forEach((time) => {
const oldDtime = Date.parse(time.dateTime);
time.innerHTML = new Date(oldDtime).toLocaleDateString(navigator.language, { weekday:"long", year:"numeric", month:"short", day:"numeric"});
md_gallery({
"class_name": "grid gap-4 grid-cols-2 prose-img:m-0"
});
htmx.on('#media_form', 'htmx:xhr:progress', function(evt) {
htmx.find('#progress').setAttribute('value', evt.detail.loaded/evt.detail.total * 100)
});
});
const mapContainer = document.getElementById("map");
if (mapContainer !== undefined) {
document.getElementById("go-back").addEventListener("click", () => {
history.back();
});
mapboxgl.accessToken = 'pk.eyJ1IjoiZG5pdHphIiwiYSI6ImNsZWIyY3ZzaTE0cjUzdm4xdnZ6czRlYjUifQ.FRETOXYRID6T2IoB7qqRLg';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v11',
maxZoom: 8
});
const markers = JSON.parse(mapContainer.dataset["markers"]);
const bounds = new mapboxgl.LngLatBounds(markers[0], markers[0]);
for (var i = 0; i < markers.length; i++) {
bounds.extend(markers[i]);
}
map.fitBounds(bounds, { padding: 60 });
for (var i = 0; i < markers.length; i++) {
const marker = markers[i];
const el = document.createElement("div");
el.className = "map-marker";
new mapboxgl.Marker(el)
.setLngLat(marker)
.addTo(map);
}
}
});
})();

File diff suppressed because one or more lines are too long

View File

@@ -1,35 +0,0 @@
(function() {
document.addEventListener('alpine:init', () => {
Alpine.magic('clipboard', () => {
return subject => navigator.clipboard.writeText(subject)
})
})
document.addEventListener("DOMContentLoaded", function () {
const times = document.querySelectorAll('time');
times.forEach((time) => {
const oldDtime = Date.parse(time.dateTime);
time.innerHTML = new Date(oldDtime).toLocaleDateString(navigator.language, { weekday:"long", year:"numeric", month:"short", day:"numeric"});
md_gallery({
"class_name": "grid gap-4 grid-cols-2 prose-img:m-0"
});
htmx.on('#media_form', 'htmx:xhr:progress', function(evt) {
htmx.find('#progress').setAttribute('value', evt.detail.loaded/evt.detail.total * 100)
});
});
// mapboxgl.accessToken = 'pk.eyJ1IjoiZG5pdHphIiwiYSI6ImNsZWIyY3ZzaTE0cjUzdm4xdnZ6czRlYjUifQ.FRETOXYRID6T2IoB7qqRLg';
// var map = new mapboxgl.Map({
// container: 'map',
// style: 'mapbox://styles/mapbox/streets-v11'
// });
// const mapContainer = document.getElementById("map");
// const markers = JSON.parse(mapContainer.dataset["markers"]);
// for (var i = 0; i < markers.length; i++) {
// const marker = markers[i];
// new mapboxgl.Marker()
// .setLngLat(marker)
// .addTo(map);
// }
});
})();

File diff suppressed because one or more lines are too long