Skip to content

Commit 44a0b5b

Browse files
committed
intro
1 parent 375df25 commit 44a0b5b

3 files changed

Lines changed: 85 additions & 42 deletions

File tree

__pycache__/main.cpython-314.pyc

1.4 KB
Binary file not shown.

docs/index.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description: explore the EvisHomeLab documentation covering Smart Home automatio
55
hide:
66
- navigation
77
- toc
8+
render_macros: true
89
---
910

1011
<style>
@@ -43,10 +44,12 @@ hide:
4344

4445

4546
<div class="hero-section">
46-
{{ hero_overlay("Virtual Fireplace", "Featured Project", "articles/articles/virtual-fireplace/") }}
47-
<video autoplay loop muted playsinline style="cursor: default;">
48-
<source src="assets/images/intro-1080-2000.mp4" type="video/mp4">
49-
</video>
47+
<div class="hero-inner" style="position: relative; width: 100%; max-width: 1200px; margin: 0 auto;">
48+
{# {{ hero_overlay("Virtual Fireplace", "Featured Project", "articles/virtual-fireplace/") }} #}
49+
<video autoplay loop muted playsinline style="cursor: default;">
50+
<source src="assets/images/intro-1080-2000.mp4" type="video/mp4">
51+
</video>
52+
</div>
5053
</div>
5154

5255

main.py

Lines changed: 78 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -354,72 +354,112 @@ def hero_overlay(title, subtitle, link):
354354
Creates an overlay card for the hero video section.
355355
"""
356356
html = f'''
357-
<div class="hero-overlay">
358-
<a href="{link}" class="feature-card overlay-card">
359-
<span>{subtitle}</span>
360-
<h4>{title}</h4>
361-
<p>Read more &rarr;</p>
357+
<div class="hero-overlay-container">
358+
<a href="{link}" class="overlay-card">
359+
<span class="overlay-badge">{subtitle}</span>
360+
<h4 class="overlay-title">{title}</h4>
361+
<p class="overlay-link">Read more &rarr;</p>
362362
</a>
363363
</div>
364364
<style>
365-
.hero-overlay {{
365+
.hero-overlay-container {{
366366
position: absolute;
367-
bottom: 30px;
368-
left: 30px;
367+
bottom: 60px; /* Raised higher */
368+
left: 40px; /* Moved inward */
369369
z-index: 20;
370-
max-width: 320px;
371-
width: 90%;
372-
animation: fadeIn 1s ease-out 1s both;
370+
width: auto;
371+
min-width: 140px;
372+
max-width: 340px; /* Wider to fit content */
373+
pointer-events: auto;
373374
}}
374-
.overlay-card {{
375-
background: rgba(30, 30, 35, 0.85); /* Dark mode default */
375+
376+
.hero-overlay-container .overlay-card {{
377+
display: flex !important;
378+
flex-direction: column;
379+
padding: 24px !important; /* Specificity boost + larger padding */
380+
background: rgba(22, 24, 28, 0.25);
376381
backdrop-filter: blur(12px);
377382
-webkit-backdrop-filter: blur(12px);
378383
border-left: 4px solid var(--md-accent-fg-color);
379-
box-shadow: 0 8px 32px rgba(0,0,0,0.3);
380-
transform: translateY(0);
381-
transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
382-
border: 1px solid rgba(255,255,255,0.1);
384+
border-radius: 8px;
385+
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
386+
text-decoration: none !important;
387+
transition: all 0.3s ease;
388+
border: 1px solid rgba(255, 255, 255, 0.1);
389+
animation: slideUpFade 0.8s ease-out 0.5s both;
390+
line-height: normal !important;
391+
text-align: left;
392+
margin: 0 !important;
393+
box-sizing: border-box !important;
394+
width: 100%;
383395
}}
384396
385-
[data-md-color-scheme="default"] .overlay-card {{
386-
background: rgba(255, 255, 255, 0.85);
397+
[data-md-color-scheme="default"] .hero-overlay-container .overlay-card {{
398+
background: rgba(255, 255, 255, 0.9);
387399
border: 1px solid rgba(0,0,0,0.1);
400+
box-shadow: 0 8px 25px rgba(0,0,0,0.2);
388401
}}
389-
390-
.overlay-card:hover {{
402+
403+
.hero-overlay-container .overlay-card:hover {{
391404
transform: translateY(-5px);
392-
box-shadow: 0 12px 40px rgba(0,0,0,0.4);
393-
background: rgba(30, 30, 35, 0.95);
405+
background: rgba(22, 24, 28, 0.65);
406+
box-shadow: 0 15px 40px rgba(0,0,0,0.6);
407+
}}
408+
409+
[data-md-color-scheme="default"] .hero-overlay-container .overlay-card:hover {{
410+
background: #fff;
394411
}}
395-
[data-md-color-scheme="default"] .overlay-card:hover {{
396-
background: rgba(255, 255, 255, 0.95);
412+
413+
.overlay-badge {{
414+
font-size: 0.7rem;
415+
text-transform: uppercase;
416+
letter-spacing: 1px;
417+
color: rgba(255, 255, 255, 0.7);
418+
margin-bottom: 0px;
419+
font-weight: 500;
420+
line-height: 1;
421+
}}
422+
[data-md-color-scheme="default"] .overlay-badge {{
423+
color: #555;
397424
}}
398425
399-
.overlay-card h4 {{
400-
margin-top: 5px;
401-
color: var(--md-default-fg-color);
426+
.overlay-title {{
427+
margin: 0 0 4px 0;
428+
color: #fff !important;
429+
font-weight: 700;
430+
font-size: 1.2rem;
431+
line-height: 1 !important;
432+
}}
433+
[data-md-color-scheme="default"] .overlay-title {{
434+
color: #222 !important;
402435
}}
403436
404-
.overlay-card p {{
405-
margin-top: 10px;
406-
font-size: 0.85em;
407-
font-weight: bold;
408-
color: var(--md-accent-fg-color);
437+
.overlay-link {{
438+
margin: 0;
439+
font-size: 0.9rem;
440+
font-weight: 600;
441+
color: var(--md-accent-fg-color) !important;
442+
align-self: flex-start;
443+
line-height: 1;
409444
}}
410445
411-
@keyframes fadeIn {{
446+
@keyframes slideUpFade {{
412447
from {{ opacity: 0; transform: translateY(20px); }}
413448
to {{ opacity: 1; transform: translateY(0); }}
414449
}}
415450
416-
@media screen and (max-width: 480px) {{
417-
.hero-overlay {{
418-
bottom: 20px;
451+
@media screen and (max-width: 600px) {{
452+
.hero-overlay-container {{
453+
bottom: 25px;
419454
left: 20px;
420455
right: 20px;
421456
max-width: none;
422-
width: auto;
457+
}}
458+
.overlay-title {{
459+
font-size: 1.2rem;
460+
}}
461+
.overlay-card {{
462+
padding: 16px 20px !important;
423463
}}
424464
}}
425465
</style>

0 commit comments

Comments
 (0)