Skip to content

Commit da4281e

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

File tree

2 files changed

+95
-10
lines changed

2 files changed

+95
-10
lines changed

static/css/output.css

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,10 @@ video {
584584
}
585585
}
586586

587+
.pointer-events-auto {
588+
pointer-events: auto;
589+
}
590+
587591
.relative {
588592
position: relative;
589593
}
@@ -612,6 +616,14 @@ video {
612616
right: 1rem;
613617
}
614618

619+
.right-6 {
620+
right: 1.5rem;
621+
}
622+
623+
.right-8 {
624+
right: 2rem;
625+
}
626+
615627
.mx-1 {
616628
margin-left: 0.25rem;
617629
margin-right: 0.25rem;
@@ -622,6 +634,11 @@ video {
622634
margin-right: auto;
623635
}
624636

637+
.mx-12 {
638+
margin-left: 3rem;
639+
margin-right: 3rem;
640+
}
641+
625642
.mb-1 {
626643
margin-bottom: 0.25rem;
627644
}
@@ -674,10 +691,46 @@ video {
674691
margin-right: 2rem;
675692
}
676693

694+
.-mt-1 {
695+
margin-top: -0.25rem;
696+
}
697+
698+
.-mt-2 {
699+
margin-top: -0.5rem;
700+
}
701+
702+
.-mt-3 {
703+
margin-top: -0.75rem;
704+
}
705+
706+
.-mt-2\.5 {
707+
margin-top: -0.625rem;
708+
}
709+
710+
.ml-5 {
711+
margin-left: 1.25rem;
712+
}
713+
714+
.ml-12 {
715+
margin-left: 3rem;
716+
}
717+
718+
.-mt-5 {
719+
margin-top: -1.25rem;
720+
}
721+
722+
.ml-16 {
723+
margin-left: 4rem;
724+
}
725+
677726
.block {
678727
display: block;
679728
}
680729

730+
.inline-block {
731+
display: inline-block;
732+
}
733+
681734
.inline {
682735
display: inline;
683736
}
@@ -690,6 +743,22 @@ video {
690743
display: none;
691744
}
692745

746+
.h-24 {
747+
height: 6rem;
748+
}
749+
750+
.h-20 {
751+
height: 5rem;
752+
}
753+
754+
.h-\[84px\] {
755+
height: 84px;
756+
}
757+
758+
.h-\[5\.25rem\] {
759+
height: 5.25rem;
760+
}
761+
693762
.min-h-screen {
694763
min-height: 100vh;
695764
}
@@ -710,6 +779,10 @@ video {
710779
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
711780
}
712781

782+
.cursor-pointer {
783+
cursor: pointer;
784+
}
785+
713786
.flex-col {
714787
flex-direction: column;
715788
}
@@ -771,6 +844,10 @@ video {
771844
padding-right: 1rem;
772845
}
773846

847+
.pl-5 {
848+
padding-left: 1.25rem;
849+
}
850+
774851
.text-center {
775852
text-align: center;
776853
}
@@ -779,6 +856,15 @@ video {
779856
text-align: right;
780857
}
781858

859+
.align-middle {
860+
vertical-align: middle;
861+
}
862+
863+
.text-xs {
864+
font-size: 0.75rem;
865+
line-height: 1rem;
866+
}
867+
782868
.font-extrabold {
783869
font-weight: 800;
784870
}

templates/index.html

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@
1010
style="--tw-translate-x: 35px; @media (min-width: 768px) { --tw-translate-x: 35px; } @media (min-width: 1024px) { --tw-translate-x: 100px; } @media (min-width: 1280px) { --tw-translate-x: 130px; }"
1111
x-data
1212
x-init="$el.style.transform = `translateX(${getComputedStyle($el).getPropertyValue('--tw-translate-x')})`">
13-
<div class="w-full md:w-1/12 md:ml-2/12 text-center avatars-positions"
14-
style="margin-top: -4px; position: relative; right: 4px;">
15-
<img id="avatar_1" src="./static/public/Argentina.png" alt="MG" width="28" height="28" />
16-
<br><br>
17-
<img id="avatar_2" src="./static/public/Chile.png" alt="LA" width="28" height="28" />
13+
<div class="w-full md:w-1/12 md:ml-2/12 -mt-3 ml-16 mr-6 bg-white bg-clip-border border border-solid border-gray-200 rounded-md text-center cursor-pointer font-extrabold"
14+
style="height: 82px;">
15+
<div id="argentina" class="mt-4">.AR</div>
16+
<div id="chile">.CH</div>
1817
</div>
1918
<div class="w-full md:w-4/12 lg:w-4/12 xl:w-4/12" style="max-width: 250px;"> <!-- COLUMNA DASHBOARD -->
2019
<div class="mb-1">
@@ -23,7 +22,7 @@
2322
{% set now = datetime.now(pytz.timezone('America/Montevideo')) - timedelta(minutes=180) %}
2423
{% set time_diff = now - last_total_increase.timestamp %}
2524
{% set minutes_diff = time_diff.total_seconds() // 60 %}
26-
<div class="rounded-lg" style="width: 75%;"><mark class="ml-3 rounded-md">{{
25+
<div class="rounded-lg" style="width: 75%;"><mark class="ml-3 rounded-md text-xs">{{
2726
minutes_diff }} minutos atrás</mark>
2827
</div>
2928
<div class="text-right mr-20 mt-1"> <!-- VER POSICION PARA MOBILE Y EN ERROR-->
@@ -58,7 +57,7 @@
5857
</div>
5958
</div>
6059
<div class="w-full md:w-3/12 mx-1">
61-
<div class="-mt-4 text-center mr-8 relative right-4" style="letter-spacing: 0%;">
60+
<div class="-mt-5 text-center relative right-8" style="letter-spacing: 0%;">
6261
<div class="text-uppercase inline mr-20 relative right-1 top-3 font-extrabold"
6362
style="font-size: 20px;">
6463
ODIO <div class="inline" style="opacity: 40%;">OÍDO:</div>
@@ -84,8 +83,8 @@
8483
{% block scripts %}
8584
{{ super() }}
8685
<script>
87-
document.getElementById('avatar_2').addEventListener('click', function () {
88-
console.log('Avatar 2 clicked');
86+
document.getElementById('chile').addEventListener('click', function () {
87+
console.log('Chile clicked');
8988
// Change the hero image source
9089
document.getElementById('hero').src = "./static/public/Chile.png";
9190

@@ -110,7 +109,7 @@
110109

111110
});
112111

113-
document.getElementById('avatar_1').addEventListener('click', function () {
112+
document.getElementById('argentina').addEventListener('click', function () {
114113
// Change the hero image source
115114
document.getElementById('hero').src = "./static/public/Argentina.png";
116115

0 commit comments

Comments
 (0)