2024-05-18 19:43:49 +02:00
|
|
|
<div id=photoslist class="transition-parent photos-list">
|
|
|
|
<div
|
|
|
|
class="transition-child section-error-container"
|
|
|
|
style="height: 100%;">
|
|
|
|
<div class="section-error-content">
|
|
|
|
<i class="fa fas fa-times-circle"></i>
|
|
|
|
{{ .Site.Params.photos.empty }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-05-18 21:22:51 +02:00
|
|
|
<script defer>
|
2024-05-18 19:43:49 +02:00
|
|
|
function loadimages(){
|
|
|
|
var http = new XMLHttpRequest();
|
2024-05-18 21:22:51 +02:00
|
|
|
var url = '/getallphotos{{ if .limit }}?limit={{ .limit }}{{ end }}';
|
2024-05-18 19:43:49 +02:00
|
|
|
http.open('GET', url, false);
|
|
|
|
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
|
|
|
http.onreadystatechange = function() {//Call a function when the state changes.
|
|
|
|
if(http.readyState == 4 && http.status == 200) {
|
|
|
|
let responsehtml = http.responseText;
|
|
|
|
document.querySelector("#photoslist").innerHTML = responsehtml;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
http.send();
|
|
|
|
}
|
2024-05-18 21:22:51 +02:00
|
|
|
loadimages();
|
2024-05-18 19:43:49 +02:00
|
|
|
</script>
|