Skip to content

Commit b25b138

Browse files
committed
[render-examples#5] - Sistema de colores - Tailwind
1 parent da4281e commit b25b138

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

templates/index.html

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,7 @@
8585
<script>
8686
document.getElementById('chile').addEventListener('click', function () {
8787
console.log('Chile clicked');
88-
// Change the hero image source
89-
document.getElementById('hero').src = "./static/public/Chile.png";
90-
91-
// Change the color of the hero text
92-
93-
88+
9489
// Make an AJAX request to the new route
9590
fetch('/api/total_engagement_chile')
9691
.then(response => response.json())
@@ -103,7 +98,7 @@
10398
engagementBar.style.width = (Math.min(data.total_engagement * 1000, 100)).toFixed(2) + '%';
10499

105100
// Update the content of the percentage div
106-
var percentageDiv = document.querySelector('.d-flex.align-items-center');
101+
var percentageDiv = document.querySelector('.flex.justify-between > div[style*="filter: var(--legibilidad)"]');
107102
percentageDiv.textContent = (Math.min(data.total_engagement * 1000, 100)).toFixed(2) + '%';
108103
});
109104

@@ -128,7 +123,7 @@
128123
engagementBar.style.width = (Math.min(data.total_engagement * 1000, 100)).toFixed(2) + '%';
129124

130125
// Update the content of the percentage div
131-
var percentageDiv = document.querySelector('.d-flex.align-items-center');
126+
var percentageDiv = document.querySelector('.flex.justify-between > div[style*="filter: var(--legibilidad)"]');
132127
percentageDiv.textContent = (Math.min(data.total_engagement * 1000, 100)).toFixed(2) + '%';
133128
});
134129

0 commit comments

Comments
 (0)