Skip to content

Commit

Permalink
add freq dropd and remove normal tag dropd
Browse files Browse the repository at this point in the history
  • Loading branch information
LDannijs committed Oct 4, 2023
1 parent 7960692 commit 7336829
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 27 deletions.
2 changes: 1 addition & 1 deletion website/layouts/_default/term.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
{{ $title := printf "Tag: %s" .Title}}
{{ partial "banner.html" (dict "title" $title "description" .Description) }}
<div class="dropdown-container">
{{ partial "tagdropdown.html" . }}
{{ partial "vendordropdown.html" . }}
{{ partial "freqdropdown.html" . }}
</div>
{{ partial "device-list.html" (dict "devices" ( .Pages ) ) }}
</main>
Expand Down
2 changes: 1 addition & 1 deletion website/layouts/devices/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<main>
{{ partial "banner.html" (dict "title" .Title "description" .Description) }}
<div class="dropdown-container">
{{ partial "tagdropdown.html" . }}
{{ partial "vendordropdown.html" . }}
{{ partial "freqdropdown.html" . }}
</div>
{{ partial "device-list.html" (dict "devices" ( .Pages ) ) }}
</main>
Expand Down
2 changes: 1 addition & 1 deletion website/layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<main aria-role="main">
{{ partial "banner.html" (dict "title" "Device Repository for LoRaWAN®" "description" .Description) }}
<div class="dropdown-container">
{{ partial "tagdropdown.html" . }}
{{ partial "vendordropdown.html" . }}
{{ partial "freqdropdown.html" . }}
</div>
{{ partial "device-list.html" (dict "devices" ( where site.RegularPages "Section" "devices" ) ) }}
</main>
Expand Down
21 changes: 21 additions & 0 deletions website/layouts/partials/freqdropdown.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Frequency Plan Dropdown -->
<select id="frequencyPlanDropdown">
<option value="" selected disabled>Select a Frequency</option>
<option value="as923">AS923</option>
<option value="au915-928">AU915-928</option>
<option value="cn470-510">CN470-510</option>
<option value="eu863-870">EU863-870</option>
<option value="eu433">EU433</option>
<option value="in865-867">IN865-867</option>
<option value="kr920-923">KR920-923</option>
<option value="ru864-870">RU864-870</option>
<option value="us902-928">US902-928</option>
</select>
<script>
document.getElementById("frequencyPlanDropdown").addEventListener("change", function() {
var selectedFrequencyPlan = this.value;
if (selectedFrequencyPlan) {
window.location.href = "{{ .Site.BaseURL }}tags/" + selectedFrequencyPlan + "/";
}
});
</script>
24 changes: 0 additions & 24 deletions website/layouts/partials/tagdropdown.html

This file was deleted.

0 comments on commit 7336829

Please sign in to comment.