diff --git a/css/style.css b/css/style.css index e93c2ab..db2a948 100644 --- a/css/style.css +++ b/css/style.css @@ -212,18 +212,8 @@ a:hover { line-height: 3rem; top: 0; left: 0; - animation: fadeOut 7s forwards; } - @keyframes fadeOut { - 0% { - opacity: 1; - } - 100% { - opacity: 0; - } - } - .blog-card { display: flex; flex-direction: row; @@ -391,7 +381,7 @@ em { } nav { - margin-top: 1%; + margin-top: 3rem; font-size: 1.6em; } @@ -431,7 +421,7 @@ nav .nav-btn { } .cta { - font-size:.9rem; + font-size:1.1rem; line-height: 1.5rem; height: 3.1rem; } diff --git a/js/cta.js b/js/cta.js new file mode 100644 index 0000000..8f73a03 --- /dev/null +++ b/js/cta.js @@ -0,0 +1,16 @@ +document.addEventListener("DOMContentLoaded", function() { + const cta = document.querySelector(".cta"); + const nav = document.querySelector("nav"); + + if (cta && nav) { + setTimeout(() => { + cta.style.transition = "height 0.5s ease, opacity 0.5s ease"; + cta.style.height = "0"; + cta.style.opacity = "0"; + + setTimeout(() => { + nav.style.setProperty("margin-top", "1%", "important"); + }, 500); + }, 10000); + } +}); diff --git a/templates/partials/base.html.twig b/templates/partials/base.html.twig index 3778539..51a1292 100644 --- a/templates/partials/base.html.twig +++ b/templates/partials/base.html.twig @@ -83,16 +83,20 @@ {% do assets.addCss('theme://css/style.css') %} {% do assets.addCss('theme://fonts/opensans/local.css') %} {% do assets.addCss('theme://fonts/sourcecodepro/local.css') %} + {% do assets.addJs('theme://js/cta.js') %} {% if theme_config.hashover.domain %} {% endif %} {% endblock %} {{ assets.css()|raw }} + {{ assets.js()|raw }} {{ theme_config.analytics|raw }}
+