You've already forked AstralRinth
forked from didirus/AstralRinth
Fix mobile navbar spacing (#1116)
This commit is contained in:
committed by
GitHub
parent
19eba9526a
commit
ffb4b395d0
@@ -108,7 +108,12 @@
|
|||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="mobile-navigation">
|
<section class="mobile-navigation">
|
||||||
<div class="nav-menu nav-menu-browse" :class="{ expanded: isBrowseMenuOpen }">
|
<div
|
||||||
|
class="nav-menu nav-menu-browse"
|
||||||
|
:class="{ expanded: isBrowseMenuOpen }"
|
||||||
|
@focusin="isBrowseMenuOpen = true"
|
||||||
|
@focusout="isBrowseMenuOpen = false"
|
||||||
|
>
|
||||||
<div class="links cascade-links">
|
<div class="links cascade-links">
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
v-for="navRoute in navRoutes"
|
v-for="navRoute in navRoutes"
|
||||||
@@ -120,7 +125,12 @@
|
|||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-menu nav-menu-mobile" :class="{ expanded: isMobileMenuOpen }">
|
<div
|
||||||
|
class="nav-menu nav-menu-mobile"
|
||||||
|
:class="{ expanded: isMobileMenuOpen }"
|
||||||
|
@focusin="isMobileMenuOpen = true"
|
||||||
|
@focusout="isMobileMenuOpen = false"
|
||||||
|
>
|
||||||
<div class="account-container">
|
<div class="account-container">
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
v-if="auth.user"
|
v-if="auth.user"
|
||||||
@@ -284,9 +294,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="links links-1" role="region" aria-label="Legal">
|
<div class="links links-1" role="region" aria-label="Legal">
|
||||||
<h4 aria-hidden="true">Company</h4>
|
<h4 aria-hidden="true">Company</h4>
|
||||||
<nuxt-link to="/legal/terms"> Terms </nuxt-link>
|
<nuxt-link to="/legal/terms"> Terms</nuxt-link>
|
||||||
<nuxt-link to="/legal/privacy"> Privacy </nuxt-link>
|
<nuxt-link to="/legal/privacy"> Privacy</nuxt-link>
|
||||||
<nuxt-link to="/legal/rules"> Rules </nuxt-link>
|
<nuxt-link to="/legal/rules"> Rules</nuxt-link>
|
||||||
<a :target="$external()" href="https://careers.modrinth.com"> Careers </a>
|
<a :target="$external()" href="https://careers.modrinth.com"> Careers </a>
|
||||||
</div>
|
</div>
|
||||||
<div class="links links-2" role="region" aria-label="Resources">
|
<div class="links links-2" role="region" aria-label="Resources">
|
||||||
@@ -765,6 +775,7 @@ export default defineNuxtComponent({
|
|||||||
|
|
||||||
.mobile-navigation {
|
.mobile-navigation {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
.nav-menu {
|
.nav-menu {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -777,6 +788,7 @@ export default defineNuxtComponent({
|
|||||||
transition: transform 0.4s cubic-bezier(0.54, 0.84, 0.42, 1);
|
transition: transform 0.4s cubic-bezier(0.54, 0.84, 0.42, 1);
|
||||||
border-radius: var(--size-rounded-card) var(--size-rounded-card) 0 0;
|
border-radius: var(--size-rounded-card) var(--size-rounded-card) 0 0;
|
||||||
box-shadow: 0 0 20px 2px rgba(0, 0, 0, 0);
|
box-shadow: 0 0 20px 2px rgba(0, 0, 0, 0);
|
||||||
|
|
||||||
.links,
|
.links,
|
||||||
.account-container {
|
.account-container {
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -795,6 +807,7 @@ export default defineNuxtComponent({
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cascade-links {
|
.cascade-links {
|
||||||
@media screen and (min-width: 354px) {
|
@media screen and (min-width: 354px) {
|
||||||
grid-template-columns: repeat(2, 1fr);
|
grid-template-columns: repeat(2, 1fr);
|
||||||
@@ -803,36 +816,43 @@ export default defineNuxtComponent({
|
|||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-browse {
|
&-browse {
|
||||||
&.expanded {
|
&.expanded {
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
box-shadow: 0 0 20px 2px rgba(0, 0, 0, 0.3);
|
box-shadow: 0 0 20px 2px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-mobile {
|
&-mobile {
|
||||||
.account-container {
|
.account-container {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
|
||||||
.account-button {
|
.account-button {
|
||||||
padding: var(--spacing-card-md);
|
padding: var(--spacing-card-md);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
|
|
||||||
.user-icon {
|
.user-icon {
|
||||||
width: 2.25rem;
|
width: 2.25rem;
|
||||||
height: 2.25rem;
|
height: 2.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.account-text {
|
.account-text {
|
||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.expanded {
|
&.expanded {
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
box-shadow: 0 0 20px 2px rgba(0, 0, 0, 0.3);
|
box-shadow: 0 0 20px 2px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobile-navbar {
|
.mobile-navbar {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: var(--size-mobile-navbar-height);
|
height: var(--size-mobile-navbar-height);
|
||||||
@@ -850,10 +870,12 @@ export default defineNuxtComponent({
|
|||||||
transition: border-radius 0.3s ease-out;
|
transition: border-radius 0.3s ease-out;
|
||||||
border-top: 2px solid rgba(0, 0, 0, 0);
|
border-top: 2px solid rgba(0, 0, 0, 0);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
&.expanded {
|
&.expanded {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab {
|
.tab {
|
||||||
position: relative;
|
position: relative;
|
||||||
background: none;
|
background: none;
|
||||||
@@ -868,10 +890,12 @@ export default defineNuxtComponent({
|
|||||||
transition: color ease-in-out 0.15s;
|
transition: color ease-in-out 0.15s;
|
||||||
color: var(--color-text-inactive);
|
color: var(--color-text-inactive);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
&.browse {
|
&.browse {
|
||||||
svg {
|
svg {
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
transition: transform ease-in-out 0.3s;
|
transition: transform ease-in-out 0.3s;
|
||||||
|
|
||||||
&.closed {
|
&.closed {
|
||||||
transform: rotate(0deg);
|
transform: rotate(0deg);
|
||||||
}
|
}
|
||||||
@@ -907,28 +931,35 @@ export default defineNuxtComponent({
|
|||||||
transition: border ease-in-out 0.15s;
|
transition: border ease-in-out 0.15s;
|
||||||
border: 0 solid var(--color-brand);
|
border: 0 solid var(--color-brand);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
&.expanded {
|
&.expanded {
|
||||||
border: 2px solid var(--color-brand);
|
border: 2px solid var(--color-brand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
margin-left: 2rem;
|
margin-left: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-right: 2rem;
|
margin-right: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.router-link-exact-active:not(&.no-active) {
|
&.router-link-exact-active:not(&.no-active) {
|
||||||
svg {
|
svg {
|
||||||
color: var(--color-brand);
|
color: var(--color-brand);
|
||||||
}
|
}
|
||||||
|
|
||||||
color: var(--color-brand);
|
color: var(--color-brand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 1095px) {
|
@media screen and (max-width: 1095px) {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user