Skip to content

Commit

Permalink
🚸 Adicionando tooltip no rodape
Browse files Browse the repository at this point in the history
  • Loading branch information
KarolineLuz committed Dec 14, 2024
1 parent 9ef85fd commit 37e45f6
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 7 deletions.
43 changes: 43 additions & 0 deletions src/app/components/background/background.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,46 @@
min-width: 1.5em;
text-align: center;
}
.tooltip-container {
position: relative;
/* Necessário para posicionar a tooltip */
display: inline-block;
}

.tooltip {
visibility: hidden;
opacity: 0;
position: absolute;
bottom: 125%;
/* Posiciona acima do ícone */
left: 50%;
transform: translateX(-50%);
background-color: #686565ee;
color: #fff;
text-align: center;
padding: 0.25em 0.5em;
border-radius: 1em;
font-size: 0.75em;
line-height: 1.2;
white-space: nowrap;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
transition: opacity 0.3s ease, visibility 0.3s ease;
z-index: 10;
}

.tooltip-container:hover .tooltip {
visibility: visible;
opacity: 1;
}

.tooltip::after {
content: '';
position: absolute;
top: 95%;
/* Aparece abaixo da tooltip */
left: 50%;
transform: translateX(-50%);
border-width: 6px;
border-style: solid;
border-color: #686565ee transparent transparent transparent;
}
24 changes: 17 additions & 7 deletions src/app/components/background/background.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,34 +70,44 @@
<footer class="flex flex-row items-center justify-center gap-3 py-6 px-3 md:py-10 sticky bottom-0 bg-white z-20">
<div>
<a [href]="
mobileDevide ? 'tel:+556131072775' : 'https://unbtv.unb.br/contato'
" target="_blank" id="contact_link" rel="noopener">
mobileDevide ? 'tel:+556131072775' : 'https://unbtv.unb.br/contato'
" target="_blank" id="contact_link" rel="noopener" class="tooltip-container">
<img alt="telefone" src="../../../assets/telefone.svg" />
<span class="tooltip">Contato</span>
</a>
</div>
<div>
<a href="https://www.unbtv.unb.br" target="_blank" id="website_link" rel="noopener">
<a href="https://www.unbtv.unb.br" target="_blank" id="website_link" rel="noopener" class="tooltip-container">
<img alt="website" src="../../../assets/website.svg" />
<span class="tooltip">UnB-TV</span>
</a>
</div>
<div>
<a href="https://www.youtube.com/@UnBTV" target="_blank" id="youtube_link" rel="noopener">
<a href="https://www.youtube.com/@UnBTV" target="_blank" id="youtube_link" rel="noopener"
class="tooltip-container">
<img alt="youtube" src="../../../assets/youtube.svg" />
<span class="tooltip">YouTube</span>
</a>
</div>
<div>
<a href="https://www.instagram.com/unbtv/" target="_blank" id="instagram_link" rel="noopener">
<a href="https://www.instagram.com/unbtv/" target="_blank" id="instagram_link" rel="noopener"
class="tooltip-container">
<img alt="instagram" src="../../../assets/instagram.svg" />
<span class="tooltip">Instagram</span>
</a>
</div>
<div>
<a href="https://www.facebook.com/UnBTV" target="_blank" id="facebook_link" rel="noopener">
<a href="https://www.facebook.com/UnBTV" target="_blank" id="facebook_link" rel="noopener"
class="tooltip-container">
<img alt="facebook" src="../../../assets/facebook.svg" />
<span class="tooltip">Facebook</span>
</a>
</div>
<div>
<a href="https://www.twitter.com/unb_tv" target="_blank" id="twitter_link" rel="noopener">
<a href="https://www.twitter.com/unb_tv" target="_blank" id="twitter_link" rel="noopener"
class="tooltip-container">
<img alt="x" src="../../../assets/x.svg" />
<span class="tooltip">X</span>
</a>
</div>
</footer>
Expand Down

0 comments on commit 37e45f6

Please sign in to comment.