From 10a2a17c38e2882bb4ddee9af9b8714f5866227b Mon Sep 17 00:00:00 2001 From: Dave Sayer Date: Mon, 23 Nov 2020 22:28:02 +0000 Subject: [PATCH] Luxumbra hifi nav (#167) * Reinstating the navbar ready for the DAO meetup * Tweaked mobile and added glow on crystal hover * removed flicker and adjusted room bounds. * Renamed TheRoom to MetaMansion * did a couple of tweaks after feedback from @peth-yursick. * MG crystal icon now opens new tab when in the Mansion. * Sorted the alignment issue * Small tweak to balance things --- src/css/custom.scss | 17 ++++++--- ...om.module.scss => metaMansion.module.scss} | 5 +-- src/pages/metamansion.js | 38 +++++++++++++++++++ src/pages/theroom.js | 17 --------- 4 files changed, 51 insertions(+), 26 deletions(-) rename src/pages/{theRoom.module.scss => metaMansion.module.scss} (70%) create mode 100644 src/pages/metamansion.js delete mode 100644 src/pages/theroom.js diff --git a/src/css/custom.scss b/src/css/custom.scss index 0fdc983a..7282cd42 100644 --- a/src/css/custom.scss +++ b/src/css/custom.scss @@ -36,6 +36,10 @@ body { @media (min-width: 995px) { font-size: 17px; } + + div { + // outline: 1px solid red; + } } body, @@ -53,8 +57,8 @@ body, margin-top: -40px; padding-top: 40px; @media screen and (min-width: 768px) { - margin-top: -70px; - padding-top: 70px; + margin-top: -60px; + padding-top: 60px; } } } @@ -276,6 +280,7 @@ body, margin-left: auto; margin-right: 0; max-width: unset; + padding-left: 7px; } .row { display: flex; @@ -355,7 +360,7 @@ body, background-color: var(--mf-color-secondary); } .navbar { - background: rgba(var(--mf-color-secondary-rgb), 0.8); + background: #2a0c42; backdrop-filter: blur(5px); border: 0; box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5); @@ -365,8 +370,8 @@ body, text-align: center; @media screen and (min-width: 768px) { - height: 70px; - max-height: 70px; + height: 60px; + max-height: 60px; } &__title { position: absolute; @@ -388,7 +393,7 @@ body, transition: filter 0.2s ease-in; &:hover { - filter: drop-shadow(0 0 15px rgba(255,255,255,0.3)); + filter: drop-shadow(0 0 15px #a5b9f680); } @media screen and (min-width: 768px) { diff --git a/src/pages/theRoom.module.scss b/src/pages/metaMansion.module.scss similarity index 70% rename from src/pages/theRoom.module.scss rename to src/pages/metaMansion.module.scss index 174ed1c7..cd671ca3 100644 --- a/src/pages/theRoom.module.scss +++ b/src/pages/metaMansion.module.scss @@ -5,9 +5,8 @@ */ .theRoom { - height: calc(100vh - 75px); - max-height: calc(100vh - 75px); - overflow: hidden; + height: calc(100vh); + max-height: calc(100vh - 60px); width: 100%; border-width: 0; } diff --git a/src/pages/metamansion.js b/src/pages/metamansion.js new file mode 100644 index 00000000..d66a3b07 --- /dev/null +++ b/src/pages/metamansion.js @@ -0,0 +1,38 @@ +import React, { useEffect } from 'react'; +import styles from './metaMansion.module.scss'; +import Layout from '@theme/Layout'; + +function TheRoom() { + useEffect(() => { + if (typeof window !== 'undefined') { + const path = + window.location.pathname === '/metamansion' ? 'mansion' : null; + const homeLink = document.querySelector('.navbar__brand'); + homeLink.addEventListener( + 'click', + function (e) { + e.preventDefault(); + e.stopPropagation(); + path === 'mansion' && window.open('/', '_blank'); + console.log('e'); + }, + false, + ); + } + return () => { + homeLink.removeEventListener('click', e, false); + }; + }, []); + + return ( + +