Skip to content

Commit

Permalink
Fix broken download links
Browse files Browse the repository at this point in the history
  • Loading branch information
connorslade committed May 1, 2024
1 parent 3cdad1d commit 672d67e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions web/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ <h1>OFFIMG Gallery</h1>
<a href="https://forum.swissmicros.com">Swissmicros Fourm</a>. Created by
<a href="https://connorcode.com">Connor Slade</a>, source code is on
Github
<a href="https://github.com/Basicprogrammer10/offimg_gallery">here</a>.
<a href="https://github.com/connorslade/offimg_gallery">here</a>.
You can download a zip of all the images <a href="offimg/all.zip">here</a>.
Updates monthly.
<ul info></ul>
</p>
<hr />
Expand Down
4 changes: 2 additions & 2 deletions web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ fetch(`${OFFIMG_PATH}/info.json`)
if (i.alt) info.innerHTML += ` &bull; ${i.alt}`;

let download = document.createElement("a");
download.href = `${OFFIMG_PATH}/${i.id}.bmp`;
download.href = `${OFFIMG_PATH}/${i.uuid}.bmp`;
download.innerHTML = `⇓`;
if (i.alt) download.download = `${i.alt}${i.alt.endsWith(".bmp") ? "" : ".bmp"}`;
else download.download = `${i.id}.bmp`;
else download.download = `${i.uuid}.bmp`;

foot.appendChild(info);
foot.appendChild(download);
Expand Down
1 change: 1 addition & 0 deletions web/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ hr {
margin-bottom: 1em;
padding: 0.5em;
width: 400px;
height: 272.5px;

& [foot] {
max-width: 400px;
Expand Down

0 comments on commit 672d67e

Please sign in to comment.