diff --git a/js/sanfona.js b/js/sanfona.js new file mode 100644 index 0000000..635ffc6 --- /dev/null +++ b/js/sanfona.js @@ -0,0 +1,17 @@ +$( document ).ready(function() { + + var acc = document.getElementsByClassName("sanfona"); + var i; + + for (i = 0; i < acc.length; i++) { + acc[i].addEventListener("click", function() { + this.classList.toggle("active-sanfona"); + var painel = this.nextElementSibling; + if (painel.style.display === "block") { + painel.style.display = "none"; + } else { + painel.style.display = "block"; + } + }); + } +}); diff --git a/js/tabs.js b/js/tabs.js new file mode 100644 index 0000000..343633d --- /dev/null +++ b/js/tabs.js @@ -0,0 +1,13 @@ +function openCity(evt, tabId) { + var i, tabcontent, tablinks; + tabcontent = document.getElementsByClassName("tabcontent"); + for (i = 0; i < tabcontent.length; i++) { + tabcontent[i].style.display = "none"; + } + tablinks = document.getElementsByClassName("tablinks"); + for (i = 0; i < tablinks.length; i++) { + tablinks[i].className = tablinks[i].className.replace(" active", ""); + } + document.getElementById(tabId).style.display = "block"; + evt.currentTarget.className += " active"; +} \ No newline at end of file diff --git a/style/tabs.css b/style/tabs.css new file mode 100644 index 0000000..6366c62 --- /dev/null +++ b/style/tabs.css @@ -0,0 +1,37 @@ +/* Style the tab */ +.tab { + overflow: hidden; + border: 1px solid #ccc; + background-color: #00305b; +} + +/* Style the buttons inside the tab */ +.tab button { + background-color: inherit; + float: left; + border: none; + outline: none; + cursor: pointer; + padding: 14px 16px; + transition: 0.3s; + font-size: 17px; + color: #d2d2d2; +} + +/* Change background color of buttons on hover */ +.tab button:hover { + background-color: #ddd; +} + +/* Create an active/current tablink class */ +.tab button.active { + background-color: #024277; +} + +/* Style the tab content */ +.tabcontent { + display: none; + padding: 6px 12px; + border: 1px solid #ccc; + border-top: none; +} \ No newline at end of file diff --git a/templates/head2.mustache b/templates/head2.mustache index 447260d..2bc2da5 100644 --- a/templates/head2.mustache +++ b/templates/head2.mustache @@ -38,13 +38,23 @@ - + + + + + + - + + + + + +