Skip to content

Commit

Permalink
Hide buttons if js disabled on downloads page
Browse files Browse the repository at this point in the history
  • Loading branch information
DeclanChidlow committed Jun 6, 2024
1 parent 488877b commit c7519bc
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
3 changes: 3 additions & 0 deletions config/global/scripts/downloads.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
document.addEventListener("DOMContentLoaded", function () {
document.getElementById("options").style.display = "flex";
document.getElementById("other").style.display = "block";

const repoOwner = "mutant-remix";
const repoName = "mutant-remix";

Expand Down
7 changes: 6 additions & 1 deletion config/global/styles/pages/downloads.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#options,
#other {
display: none;
}

#options {
display: flex;
/* Set to flex in download.js */
gap: 3rem;
}

Expand Down
3 changes: 3 additions & 0 deletions docs/scripts/downloads.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
document.addEventListener("DOMContentLoaded", function () {
document.getElementById("options").style.display = "flex";
document.getElementById("other").style.display = "block";

const repoOwner = "mutant-remix";
const repoName = "mutant-remix";

Expand Down
7 changes: 6 additions & 1 deletion docs/styles/pages/downloads.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#options,
#other {
display: none;
}

#options {
display: flex;
/* Set to flex in download.js */
gap: 3rem;
}

Expand Down
2 changes: 1 addition & 1 deletion gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pages=(
for page_config in "${pages[@]}"; do
page="${page_config%% *}"
output="${page_config#* }"
adduce -c "$page" -n "$output" -o docs
/home/vale/gitrepos/Adduce/target/release/adduce -c "$page" -n "$output" -o docs
done

# Copy global styles and assets
Expand Down

0 comments on commit c7519bc

Please sign in to comment.