Skip to content

Commit

Permalink
publish-barshare-gbfs: add index/overview page
Browse files Browse the repository at this point in the history
  • Loading branch information
derhuerst committed Apr 6, 2022
1 parent f9d3cc9 commit a910f41
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
1 change: 1 addition & 0 deletions publish-barshare-gbfs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ RUN apk add --no-cache --update tree
COPY --from=mc /usr/bin/mc /usr/bin/mc

COPY main.sh ./
COPY index.html ./

# prevent inheriting `python` as entrypoint
ENTRYPOINT []
Expand Down
84 changes: 84 additions & 0 deletions publish-barshare-gbfs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<!DOCTYPE html>

<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>BARShare Open Data</title>
<style type="text/css">
body {
margin: 1rem;
font-size: 100%;
font-family: sans-serif;
line-height: 1.35;
}
header {
margin-bottom: 2rem;
}
footer {
margin-top: 5rem;
}
a, a:visited {
color: #da1b1b;
}
h1, h2, h3 {
font-weight: 500;
margin-bottom: .8em;
}
#bbnavi-logo {
display: inline-block;
text-decoration: none;
font-size: 2rem;
}
#bbnavi-logo svg {
display: inline-block;
width: 3rem;
vertical-align: bottom;
}
footer ul {
list-style: none;
padding-left: 0;
}
</style>
</head>
<body>
<header>
<a id="bbnavi-logo" href="https://bbnavi.de/">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 75 75">
<defs>
<style>
.cls-1{fill: #da1b1b;}.cls-2{fill: #fff;}
</style>
</defs>
<rect class="cls-1" x="5" y="5" width="65" height="65" rx="10"/>
<path class="cls-2" d="M41,48.91l7.17-20.44,1.05-3a12.77,12.77,0,0,0,.25-2.5,12.15,12.15,0,1,0-24.29,0,12.35,12.35,0,0,0,.32,2.81l.84,2.38,7.28,20.75C19,49.42,7.81,52.62,7.81,56.51c0,4.22,13.29,7.65,29.69,7.65s29.69-3.43,29.69-7.65C67.19,52.58,55.72,49.35,41,48.91ZM37.05,61c-12.92,0-23.39-2.12-23.39-4.73,0-2.44,9.12-4.44,20.84-4.7L36.41,57a.9.9,0,0,0,1.69,0L40,51.59c11.53.3,20.44,2.28,20.44,4.69C60.44,58.89,50,61,37.05,61Z"/>
</svg>
bbnavi
</a>
<h1>BARShare Open Data</h1>
</header>
<h2>GBFS-Feeds mit Verfügbarkeit von Leihfahrrädern & -autos</h2>
<h3>Feed mit <em>allen</em> Fahrzeugen</h3>
<ul>
<li><a href="./gbfs.json"><code>gbfs.json</code></a> (<a href="https://creativecommons.org/publicdomain/zero/1.0/"><code>CC0-1.0</code></a>)</li>
</ul>
<h3>Feed mit Leihfahrrädern</h3>
<ul>
<li><a href="./bicycle/gbfs.json"><code>gbfs.json</code></a> (<a href="https://creativecommons.org/publicdomain/zero/1.0/"><code>CC0-1.0</code></a>)</li>
</ul>
<h3>Feed mit Leihfahrautos</h3>
<ul>
<li><a href="./car/gbfs.json"><code>gbfs.json</code></a> (<a href="https://creativecommons.org/publicdomain/zero/1.0/"><code>CC0-1.0</code></a>)</li>
</ul>
<h3>Feed mit anderen Fahrzeugen</h3>
<ul>
<li><a href="./other/gbfs.json"><code>gbfs.json</code></a> (<a href="https://creativecommons.org/publicdomain/zero/1.0/"><code>CC0-1.0</code></a>)</li>
</ul>
<footer>
<ul>
<li><a href="https://bbnavi.de/impressum/">Impressum</a></li>
<li><a href="https://bbnavi.de/datenschutzerklaerung/">Datenschutz</a></li>
</ul>
</footer>
</body>
</html>
2 changes: 2 additions & 0 deletions publish-barshare-gbfs/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ dir="$(mktemp -d -t barshare-gbfs.XXXXXX)"

set -x

mc cp -q index.html bbnavi/barshare/

while true; do
# We sleep first so that, if the GBFS generation fails contantly, we don't DOS the Moqo API.
sleep "$PUBLISH_INTERVAL"
Expand Down

0 comments on commit a910f41

Please sign in to comment.