Skip to content

Commit

Permalink
Merge pull request #24 from sshiiden/fixes
Browse files Browse the repository at this point in the history
fixes
  • Loading branch information
sshiiden authored Jan 21, 2025
2 parents b1be56d + ca8ddcd commit d444bd8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
40 changes: 20 additions & 20 deletions static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,26 +186,26 @@ function handleDropdowns(content) {
}

// Helper function to set links and text after selecting an option
const setLinks = () => {
const {os, arch} = getSystemInfo();

if (os) {
const osDropdown = content.querySelector("#os");
const osDropdownButton = osDropdown.querySelector(".dropdown-button");
const osDropdownMenu = osDropdown.querySelector(".dropdown-menu");
const itemToSelect = osDropdownMenu.querySelector("#"+os);
console.log(os);


selectItem(itemToSelect, osDropdownButton, osDropdownMenu, false);
}
if (arch) {
const archDropdown = content.querySelector("#arch");
const archDropdownButton = archDropdown.querySelector(".dropdown-button");
const archDropdownMenu = archDropdown.querySelector(".dropdown-menu");
const itemToSelect = archDropdownMenu.querySelector("#"+arch);
const setLinks = (firstLoad=false) => {
if (firstLoad) {
const {os, arch} = getSystemInfo();

if (os) {
const osDropdown = content.querySelector("#os");
const osDropdownButton = osDropdown.querySelector(".dropdown-button");
const osDropdownMenu = osDropdown.querySelector(".dropdown-menu");
const itemToSelect = osDropdownMenu.querySelector("#"+os);

selectItem(itemToSelect, archDropdownButton, archDropdownMenu, false);
selectItem(itemToSelect, osDropdownButton, osDropdownMenu, false);
}
if (arch) {
const archDropdown = content.querySelector("#arch");
const archDropdownButton = archDropdown.querySelector(".dropdown-button");
const archDropdownMenu = archDropdown.querySelector(".dropdown-menu");
const itemToSelect = archDropdownMenu.querySelector("#"+arch);

selectItem(itemToSelect, archDropdownButton, archDropdownMenu, false);
}
}

// Collect selected options from dropdowns
Expand Down Expand Up @@ -437,6 +437,6 @@ function handleDropdowns(content) {
});

// Inital setup
setLinks()
setLinks(firstLoad=true)
});
}
2 changes: 1 addition & 1 deletion templates/runtime/base/meta_tags.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<title>{{$title}}</title>

{{- /* The value is the same as --primary-color */}}
<meta name="theme-color" content="hsl(281, 62%, 12%)">
<meta name="theme-color" content="#260c32">

{{- /* SEO Meta Tags */}}
<meta name="author" content="Blazium Team">
Expand Down

0 comments on commit d444bd8

Please sign in to comment.