mirror of
https://github.com/ivabus/www
synced 2024-11-22 09:25:06 +03:00
Adjusted the js so that it can be used in a partial at two locations
This commit is contained in:
parent
89e5e8af1f
commit
0920ce5bc6
1 changed files with 8 additions and 6 deletions
|
@ -30,16 +30,17 @@
|
|||
</div>
|
||||
|
||||
<div class="dropdown">
|
||||
<button onclick="toggleDropdown()" class="dropbtn hbtn-light hb-light-fill-right">
|
||||
<button onclick="toggleDropdown(this)" class="dropbtn hbtn-light hb-light-fill-right">
|
||||
additional install options
|
||||
<span id="arrow" class="arrow" style="font-size:16px;">›</span>
|
||||
<span class="arrow" style="font-size:16px;">›</span>
|
||||
</button>
|
||||
<div id="myDropdown" class="dropdown-content">
|
||||
<div class="dropdown-content">
|
||||
<a href="https://docs.tea.xyz/getting-started/install-tea/without-installer#a-fancy-one-liner">fancy one-liner</a>
|
||||
<a href="https://docs.tea.xyz/getting-started/install-tea/without-installer#via-homebrew">hombrew</a>
|
||||
<a href="https://docs.tea.xyz/getting-started/install-tea/without-installer#via-docker">via docker</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -147,9 +148,9 @@
|
|||
|
||||
<script>
|
||||
|
||||
function toggleDropdown() {
|
||||
var dropdown = document.getElementById("myDropdown");
|
||||
var arrow = document.getElementById("arrow");
|
||||
function toggleDropdown(dropdownButton) {
|
||||
var dropdown = dropdownButton.nextElementSibling;
|
||||
var arrow = dropdownButton.querySelector('.arrow');
|
||||
dropdown.classList.toggle("show");
|
||||
arrow.classList.toggle("rotated", dropdown.classList.contains("show"));
|
||||
}
|
||||
|
@ -169,4 +170,5 @@
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue