-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
symbolen Kernregistratie Eigen Locaties
- Loading branch information
1 parent
96e18fc
commit 50f7c3f
Showing
5 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<html> | ||
<head> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" | ||
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous"> | ||
</head> | ||
<body> | ||
<script> | ||
(async () => { | ||
const subdir = window.location.pathname.split('/')[2]; | ||
const main = 'https://github.com/imroi/diversen/blob/main/'; | ||
const response = await fetch('https://api.github.com/repos/imroi/diversen/contents/' + subdir); | ||
const data = await response.json(); | ||
let htmlString = `<div class="container"> | ||
<nav class="navbar navbar-expand-lg"> | ||
<div class="container-fluid"> | ||
<ol class="breadcrumb"> | ||
<li class="breadcrumb-item"><a href="https://imroi.github.io/diversen/">Home</a></li> | ||
<li class="breadcrumb-item active" aria-current="page">${subdir}</li> | ||
</ol> | ||
<a class="navbar-brand" href="#">${subdir.toUpperCase()}</a> | ||
<div class="navbar-nav"> | ||
<a class="nav-link" href="${main}${subdir}/stylesheet.sld">SLD</a> | ||
<a class="nav-link" href="${main}${subdir}/stylesheet.geostyler">GeoStyler</a> | ||
</div> | ||
</div> | ||
</nav> | ||
</div>`; | ||
htmlString += '<div class="d-flex flex-column flex-md-row p-4 gap-4 py-md-5 align-items-center justify-content-center">'; | ||
htmlString += '<ol class="list-group">'; | ||
for (let file of data) { | ||
if (file.name.endsWith('.png') || file.name.endsWith('.jpg') || file.name.endsWith('.jpeg') || file.name.endsWith('.svg')) { | ||
htmlString += `<li class="list-group-item list-group-item-action d-flex gap-3 py-3" aria-current="true"> | ||
<img src="${file.download_url}" alt="${file.name}" width="32" height="32"> | ||
<div class="d-flex gap-2 w-100 justify-content-between"> | ||
<div> | ||
<h6><a href="${file.html_url}">${file.name}</a></h6> | ||
<p>${document.URL}${file.name}</p> | ||
</div> | ||
<small class="opacity-50 text-nowrap">${Math.round(file.size / 1024)}kb</small> | ||
</div> | ||
</li>`; | ||
} | ||
} | ||
htmlString += '</ol></div>'; | ||
document.getElementsByTagName('body')[0].innerHTML = htmlString; | ||
})() | ||
</script> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.