Add stunning info button with glassmorphism modal

Features:
- Info button fixed on bottom-left (matches back-to-top on bottom-right)
- Modern glassmorphism modal with backdrop blur
- Smooth animations: scale + bounce effect on open
- Floating code icon animation
- Gradient text for title
- Tech stack showcase with hover effects (Go, HTMX, HTML5, CSS3)
- Beautiful GitHub link button with gradient and hover effects
- Multiple close methods: X button, click backdrop, Escape key
- Fully responsive for mobile devices
- No external libraries - pure CSS3 magic

Design highlights:
- Backdrop blur for depth
- White glass-effect card with subtle gradient
- Green accent color (#27ae60) throughout
- Smooth cubic-bezier transitions
- Rotating close button on hover
- Tech items lift on hover with shadows
- GitHub button with gradient that reverses on hover

Showcases modern web development skills with cutting-edge CSS
This commit is contained in:
juanatsap
2025-11-09 19:30:05 +00:00
parent 523e882286
commit 4b5c0df75d
2 changed files with 321 additions and 0 deletions
+241
View File
@@ -2224,6 +2224,247 @@ html {
}
}
/* ========================================
Info Button (Bottom Left)
======================================== */
.info-button {
position: fixed;
bottom: 2rem;
left: 2rem;
width: 50px;
height: 50px;
background: var(--black-bar);
color: white;
border: none;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
z-index: 99;
transition: all 0.3s ease;
opacity: 0.9;
}
.info-button:hover {
opacity: 1;
transform: translateY(-3px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
background: #3a3a3a;
}
.info-button:active {
transform: translateY(-1px);
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}
/* Mobile adjustments */
@media (max-width: 768px) {
.info-button {
bottom: 1.5rem;
left: 1.5rem;
width: 45px;
height: 45px;
}
}
/* ========================================
Info Modal - Modern Glassmorphism Design
======================================== */
.info-modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
padding: 1rem;
}
.info-modal.active {
opacity: 1;
visibility: visible;
}
.info-modal-content {
background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-radius: 24px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 100px rgba(39, 174, 96, 0.1);
max-width: 500px;
width: 100%;
padding: 2.5rem;
position: relative;
transform: scale(0.9) translateY(20px);
transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
border: 1px solid rgba(255, 255, 255, 0.8);
}
.info-modal.active .info-modal-content {
transform: scale(1) translateY(0);
}
.info-modal-close {
position: absolute;
top: 1rem;
right: 1rem;
background: rgba(0, 0, 0, 0.05);
border: none;
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
color: #333;
transition: all 0.2s ease;
z-index: 10;
}
.info-modal-close:hover {
background: rgba(0, 0, 0, 0.1);
transform: rotate(90deg);
}
.info-modal-header {
text-align: center;
margin-bottom: 2rem;
}
.info-modal-icon {
color: #27ae60;
margin-bottom: 1rem;
animation: float 3s ease-in-out infinite;
}
@keyframes float {
0%, 100% { transform: translateY(0px); }
50% { transform: translateY(-10px); }
}
.info-modal-header h2 {
font-size: 1.75rem;
font-weight: 600;
color: #1a1a1a;
margin: 0;
background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.info-modal-body {
color: #333;
}
.info-modal-description {
font-size: 1rem;
line-height: 1.6;
margin-bottom: 2rem;
color: #444;
}
.info-modal-description strong {
color: #27ae60;
font-weight: 600;
}
.info-modal-tech {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
margin-bottom: 2rem;
}
.info-tech-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem;
background: rgba(39, 174, 96, 0.05);
border-radius: 12px;
border: 1px solid rgba(39, 174, 96, 0.1);
transition: all 0.3s ease;
}
.info-tech-item:hover {
background: rgba(39, 174, 96, 0.1);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(39, 174, 96, 0.2);
}
.info-tech-item iconify-icon {
color: #27ae60;
flex-shrink: 0;
}
.info-tech-item span {
font-size: 0.9rem;
font-weight: 500;
color: #333;
}
.info-modal-github {
display: flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
padding: 1rem 1.5rem;
background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
color: white;
text-decoration: none;
border-radius: 12px;
font-weight: 600;
font-size: 1rem;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}
.info-modal-github:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
}
.info-modal-github:active {
transform: translateY(0);
box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}
/* Mobile responsive */
@media (max-width: 768px) {
.info-modal-content {
padding: 2rem 1.5rem;
max-width: calc(100% - 2rem);
}
.info-modal-header h2 {
font-size: 1.5rem;
}
.info-modal-tech {
grid-template-columns: 1fr;
}
.info-modal-description {
font-size: 0.95rem;
}
}
/* ========================================
Desktop: Ensure Sidebar Content Visible (>1280px)
======================================== */
+80
View File
@@ -284,6 +284,60 @@
<iconify-icon icon="mdi:arrow-up" width="24" height="24"></iconify-icon>
</button>
<!-- Info Button (Bottom Left) -->
<button id="info-button" class="info-button no-print" aria-label="{{if eq .Lang "es"}}Información{{else}}Information{{end}}" onclick="openInfoModal()">
<iconify-icon icon="mdi:information-outline" width="24" height="24"></iconify-icon>
</button>
<!-- Info Modal -->
<div id="info-modal" class="info-modal no-print" onclick="closeInfoModalOnBackdrop(event)">
<div class="info-modal-content" onclick="event.stopPropagation()">
<button class="info-modal-close" onclick="closeInfoModal()" aria-label="Close">
<iconify-icon icon="mdi:close" width="24" height="24"></iconify-icon>
</button>
<div class="info-modal-header">
<iconify-icon icon="mdi:code-braces" width="48" height="48" class="info-modal-icon"></iconify-icon>
<h2>{{if eq .Lang "es"}}Acerca de este CV{{else}}About this CV{{end}}</h2>
</div>
<div class="info-modal-body">
<p class="info-modal-description">
{{if eq .Lang "es"}}
Este CV interactivo fue construido con <strong>Go + HTMX</strong>, demostrando arquitectura moderna de hipermedia sin frameworks pesados de JavaScript.
{{else}}
This interactive CV was built with <strong>Go + HTMX</strong>, showcasing modern hypermedia architecture without heavy JavaScript frameworks.
{{end}}
</p>
<div class="info-modal-tech">
<div class="info-tech-item">
<iconify-icon icon="mdi:language-go" width="32" height="32"></iconify-icon>
<span>Go + Hono</span>
</div>
<div class="info-tech-item">
<iconify-icon icon="mdi:lightning-bolt" width="32" height="32"></iconify-icon>
<span>HTMX</span>
</div>
<div class="info-tech-item">
<iconify-icon icon="mdi:language-html5" width="32" height="32"></iconify-icon>
<span>Semantic HTML5</span>
</div>
<div class="info-tech-item">
<iconify-icon icon="mdi:language-css3" width="32" height="32"></iconify-icon>
<span>Pure CSS3</span>
</div>
</div>
<a href="https://github.com/juanatsap/cv-site" target="_blank" rel="noopener noreferrer" class="info-modal-github">
<iconify-icon icon="mdi:github" width="24" height="24"></iconify-icon>
<span>{{if eq .Lang "es"}}Ver código fuente{{else}}View Source Code{{end}}</span>
<iconify-icon icon="mdi:arrow-right" width="20" height="20"></iconify-icon>
</a>
</div>
</div>
</div>
<script>
// Toggle navigation menu
function toggleMenu() {
@@ -605,6 +659,32 @@
});
});
// Info Modal Functions
function openInfoModal() {
const modal = document.getElementById('info-modal');
modal.classList.add('active');
document.body.style.overflow = 'hidden'; // Prevent scrolling when modal is open
}
function closeInfoModal() {
const modal = document.getElementById('info-modal');
modal.classList.remove('active');
document.body.style.overflow = ''; // Restore scrolling
}
function closeInfoModalOnBackdrop(event) {
if (event.target.id === 'info-modal') {
closeInfoModal();
}
}
// Close modal with Escape key
document.addEventListener('keydown', function(event) {
if (event.key === 'Escape') {
closeInfoModal();
}
});
// Error handling utility
function showError(message) {
const errorToast = document.getElementById('error-toast');