Skip to content

Commit

Permalink
fix: small bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Tudor-Ang committed Jan 22, 2024
1 parent 0879939 commit 47c7985
Showing 1 changed file with 27 additions and 26 deletions.
53 changes: 27 additions & 26 deletions themes/genezio-theme/layouts/partials/theCode.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ <h2 class="text-white text-center fw-bold mb-4 pb-3">
<div class="text-white position-relative" id="accordionExample">
<div class="accordion-item py-2 my-2 text-white" style="border-top: 1px solid rgba(255, 255, 255, 0.1)">
<h2 class="accordion-header" id="headingBackend">
<button class="accordion-button shadow-none collapsed fw-medium py-3" type="button" data-bs-toggle="collapse" data-bs-target="#collapseBackend" aria-expanded="false" aria-controls="collapseBackend">
<button class="accordion-button theCode shadow-none collapsed fw-medium py-3" type="button" data-bs-toggle="collapse" data-bs-target="#collapseBackend" aria-expanded="false" aria-controls="collapseBackend">
genezio.Backend
</button>
</h2>
Expand Down Expand Up @@ -322,7 +322,7 @@ <h2 class="accordion-header" id="headingBackend">
<div class="text-white position-relative" id="accordionExample2">
<div class="accordion-item py-2 my-2 text-white" style="border-top: 1px solid rgba(255, 255, 255, 0.1)">
<h2 class="accordion-header" id="headingRpc">
<button class="accordion-button shadow-none collapsed fw-medium py-3" type="button" data-bs-toggle="collapse" data-bs-target="#collapseRpc" aria-expanded="false" aria-controls="collapseRpc">
<button class="accordion-button theCode shadow-none collapsed fw-medium py-3" type="button" data-bs-toggle="collapse" data-bs-target="#collapseRpc" aria-expanded="false" aria-controls="collapseRpc">
genezio.Rpc
</button>
</h2>
Expand Down Expand Up @@ -426,7 +426,7 @@ <h2 class="accordion-header" id="headingRpc">
<div class="text-white position-relative" id="accordionExample3">
<div class="accordion-item py-2 my-2 text-white" style="border-top: 1px solid rgba(255, 255, 255, 0.1)">
<h2 class="accordion-header" id="headingServerless">
<button class="accordion-button shadow-none collapsed fw-medium py-3" type="button" data-bs-toggle="collapse" data-bs-target="#collapseServerless" aria-expanded="false" aria-controls="collapseServerless">
<button class="accordion-button theCode shadow-none collapsed fw-medium py-3" type="button" data-bs-toggle="collapse" data-bs-target="#collapseServerless" aria-expanded="false" aria-controls="collapseServerless">
genezio.Serverless
</button>
</h2>
Expand Down Expand Up @@ -558,7 +558,7 @@ <h2 class="accordion-header" id="headingServerless">
<div class="text-white position-relative" id="accordionExample4">
<div class="accordion-item py-2 my-2 text-white" style="border-top: 1px solid rgba(255, 255, 255, 0.1)">
<h2 class="accordion-header" id="headingCloud">
<button class="accordion-button shadow-none collapsed fw-medium py-3" type="button" data-bs-toggle="collapse" data-bs-target="#collapseCloud" aria-expanded="false" aria-controls="collapseCloud">
<button class="accordion-button theCode shadow-none collapsed fw-medium py-3" type="button" data-bs-toggle="collapse" data-bs-target="#collapseCloud" aria-expanded="false" aria-controls="collapseCloud">
genezio.Cloud
</button>
</h2>
Expand Down Expand Up @@ -1384,34 +1384,35 @@ <h2 class="text-white text-center fw-bold mb-4 pb-3">

<script>
document.addEventListener('DOMContentLoaded', function () {
var accordionButtons = document.querySelectorAll('.accordion-button');
var accordionButtons = document.querySelectorAll('.accordion-button.theCode');

accordionButtons.forEach(function (button) {
button.addEventListener('click', function () {
accordionButtons.forEach(function (btn) {
btn.classList.remove('customDropdown');
});

if (!button.classList.contains('customDropdown')) {
button.classList.add('customDropdown');
}

if (button.classList.contains('collapsed')) {
button.classList.remove('customDropdown');
}
accordionButtons.forEach(function (button) {
button.addEventListener('click', function () {
accordionButtons.forEach(function (btn) {
btn.classList.remove('customDropdown');
});

if (!button.classList.contains('customDropdown')) {
button.classList.add('customDropdown');
}

if (button.classList.contains('collapsed')) {
button.classList.remove('customDropdown');
}
});
});
});

$(document).ready(function() {
$('.accordion-button').click(function() {
// Close all open accordion items
$('.accordion-collapse').collapse('hide');

// Open the clicked accordion item
$($(this).data('bs-target')).collapse('show');
});
$(document).ready(function() {
$('.accordion-button.theCode').click(function() {
// Close all open accordion items
$('.accordion-collapse').collapse('hide');

// Open the clicked accordion item
$($(this).data('bs-target')).collapse('show');
});
});


</script>

Expand Down

0 comments on commit 47c7985

Please sign in to comment.