diff --git a/themes/frozenTacos/assets/js/score.js b/themes/frozenTacos/assets/js/score.js index dece93e..f71734c 100644 --- a/themes/frozenTacos/assets/js/score.js +++ b/themes/frozenTacos/assets/js/score.js @@ -5,12 +5,6 @@ if (document.readyState === 'loading') { // Loading hasn't finished yet getData(); } -// Toggling Class -const contentToggle = (id, id2) => { - document.getElementById(id).classList.toggle('hidden'); - document.getElementById(id2).classList.add('hidden'); -} - // Saving in BDD async function getData(){ const queryString = window.location.search; @@ -38,11 +32,11 @@ const populate = (res,id) => { document.getElementById('date').innerHTML = date; - gauge('ei',res['eco-index']); - gauge('perf',res['lighthouse-perf']); - gauge('acc',res['lighthouse-accessibility']); - gauge('bp',res['lighthouse-best-practices']); - gauge('seo',res['lighthouse-seo']); + gaugeB('ei',res['eco-index']); + gaugeB('perf',res['lighthouse-perf']); + gaugeB('acc',res['lighthouse-accessibility']); + gaugeB('bp',res['lighthouse-best-practices']); + gaugeB('seo',res['lighthouse-seo']); document.getElementById('res-pepper').classList.add('done', res['pepper-index']); document.getElementById('s-pepper').innerHTML = res['pepper-index-score']; @@ -58,7 +52,7 @@ const getDate = (date,ts) => { } // Animating Mobile results -const gauge = (id, score) => { +const gaugeB = (id, score) => { if(score === null) console.log('error null'); else{ diff --git a/themes/frozenTacos/layouts/partials/script.html b/themes/frozenTacos/layouts/partials/script.html index d29e075..f6604c8 100644 --- a/themes/frozenTacos/layouts/partials/script.html +++ b/themes/frozenTacos/layouts/partials/script.html @@ -17,7 +17,6 @@ {{ else if eq .Params.mp "Contact" }} {{ $js := resources.Get "/js/contact.js" | resources.Minify | resources.Fingerprint }} -{{ else }} +{{ end }} {{ $js := resources.Get "/js/main.js" | resources.Minify | resources.Fingerprint }} - -{{ end }} \ No newline at end of file + \ No newline at end of file