Redo desktop nav and change bell to bolt for interactions
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
eris 2022-07-30 22:14:37 +00:00
parent 751fd5917b
commit a0de673cc0
7 changed files with 152 additions and 19 deletions

View file

@ -5,12 +5,16 @@ import {
faSignOutAlt, faSignOutAlt,
faHome, faHome,
faComments, faComments,
faBell,
faUserPlus, faUserPlus,
faBullhorn, faBullhorn,
faSearch, faSearch,
faTachometerAlt, faTachometerAlt,
faCog, faCog,
faGlobe,
faBolt,
faUsers,
faCommentMedical,
faBookmark,
faInfoCircle faInfoCircle
} from '@fortawesome/free-solid-svg-icons' } from '@fortawesome/free-solid-svg-icons'
@ -19,12 +23,16 @@ library.add(
faSignOutAlt, faSignOutAlt,
faHome, faHome,
faComments, faComments,
faBell,
faUserPlus, faUserPlus,
faBullhorn, faBullhorn,
faSearch, faSearch,
faTachometerAlt, faTachometerAlt,
faCog, faCog,
faGlobe,
faBolt,
faUsers,
faCommentMedical,
faBookmark,
faInfoCircle faInfoCircle
) )

View file

@ -15,16 +15,16 @@
display: grid; display: grid;
grid-template-rows: var(--navbar-height); grid-template-rows: var(--navbar-height);
grid-template-columns: 2fr auto 2fr; grid-template-columns: 2fr auto 2fr;
grid-template-areas: "sitename logo actions"; grid-template-areas: "nav-left logo actions";
box-sizing: border-box; box-sizing: border-box;
padding: 0 1.2em; padding: 0 1.2em;
margin: auto; margin: auto;
max-width: 980px; max-width: 1110px;
} }
&.-logoLeft .inner-nav { &.-logoLeft .inner-nav {
grid-template-columns: auto 2fr 2fr; grid-template-columns: auto 2fr 2fr;
grid-template-areas: "logo sitename actions"; grid-template-areas: "logo nav-left actions";
} }
.button-default { .button-default {
@ -84,12 +84,23 @@
} }
.nav-icon { .nav-icon {
margin-left: 1em; margin-left: 0.2em;
width: 2em; width: 2em;
height: 100%; height: 100%;
font-size: 130%;
text-align: center; text-align: center;
&.router-link-active {
font-size: 1.2em;
margin-top: 0.05em;
.svg-inline--fa {
font-weight: bolder;
color: $fallback--text;
color: var(--selectedMenuText, $fallback--text);
--lightText: var(--selectedMenuLightText, $fallback--lightText);
}
}
&-logout { &-logout {
margin-left: 2em; margin-left: 2em;
} }
@ -100,8 +111,23 @@
} }
} }
.sitename { .left {
grid-area: sitename; padding-left: 5px;
display: flex;
.nav-icon {
margin-left: 0.15em;
}
}
.nav-left-wrapper {
grid-area: nav-left;
.favicon {
height: 28px;
vertical-align: middle;
padding-right: 5px;
}
} }
.actions { .actions {

View file

@ -6,15 +6,74 @@
@click="scrollToTop()" @click="scrollToTop()"
> >
<div class="inner-nav"> <div class="inner-nav">
<div class="item sitename"> <div class="item nav-left-wrapper">
<router-link <router-link
v-if="!hideSitename" class="site-brand"
class="site-name"
:to="{ name: 'root' }" :to="{ name: 'root' }"
active-class="home" active-class="home"
> >
{{ sitename }} <img
class="favicon"
src="/favicon.png"
>
<span
v-if="!hideSitename"
class="site-name"
>
{{ sitename }}
</span>
</router-link> </router-link>
<div
v-if="currentUser || !privateMode"
class="nav-items left"
>
<router-link
v-if="currentUser"
:to="{ name: 'friends' }"
class="nav-icon"
>
<FAIcon
fixed-width
class="fa-scale-110 fa-old-padding"
icon="home"
:title="$t('nav.home_timeline')"
/>
</router-link>
<router-link
:to="{ name: 'public-timeline' }"
class="nav-icon"
>
<FAIcon
fixed-width
class="fa-scale-110 fa-old-padding"
icon="users"
:title="$t('nav.public_tl')"
/>
</router-link>
<router-link
:to="{ name: 'public-external-timeline' }"
class="nav-icon"
>
<FAIcon
fixed-width
class="fa-scale-110 fa-old-padding"
icon="globe"
:title="$t('nav.twkn')"
/>
</router-link>
<router-link
v-if="currentUser"
:to="{ name: 'bubble-timeline' }"
class="nav-icon"
>
<FAIcon
fixed-width
class="fa-scale-110 fa-old-padding"
icon="circle"
:title="$t('nav.bubble_timeline')"
/>
</router-link>
</div>
</div> </div>
<router-link <router-link
class="logo" class="logo"
@ -36,6 +95,46 @@
@toggled="onSearchBarToggled" @toggled="onSearchBarToggled"
@click.stop @click.stop
/> />
<div
v-if="currentUser || !privateMode"
class="nav-items right"
>
<router-link
class="nav-icon"
:to="{ name: 'interactions', params: { username: currentUser.screen_name } }"
>
<FAIcon
fixed-width
class="fa-scale-110 fa-old-padding"
icon="bolt"
:title="$t('nav.interactions')"
/>
</router-link>
<router-link
v-if="currentUser"
:to="{ name: 'lists' }"
class="nav-icon"
>
<FAIcon
fixed-width
class="fa-scale-110 fa-old-padding"
icon="list"
:title="$t('nav.lists')"
/>
</router-link>
<router-link
v-if="currentUser"
:to="{ name: 'bookmarks' }"
class="nav-icon"
>
<FAIcon
fixed-width
class="fa-scale-110 fa-old-padding"
icon="bookmark"
:title="$t('nav.bookmarks')"
/>
</router-link>
</div>
<button <button
class="button-unstyled nav-icon" class="button-unstyled nav-icon"
@click.stop="openSettingsModal" @click.stop="openSettingsModal"

View file

@ -10,7 +10,7 @@ import {
faChevronDown, faChevronDown,
faChevronUp, faChevronUp,
faComments, faComments,
faBell, faBolt,
faInfoCircle, faInfoCircle,
faStream, faStream,
faList, faList,
@ -25,7 +25,7 @@ library.add(
faChevronDown, faChevronDown,
faChevronUp, faChevronUp,
faComments, faComments,
faBell, faBolt,
faInfoCircle, faInfoCircle,
faStream, faStream,
faList, faList,

View file

@ -45,7 +45,7 @@
<FAIcon <FAIcon
fixed-width fixed-width
class="fa-scale-110" class="fa-scale-110"
icon="bell" icon="bolt"
/>{{ $t("nav.interactions") }} />{{ $t("nav.interactions") }}
</router-link> </router-link>
</li> </li>

View file

@ -8,7 +8,7 @@ import {
faSignOutAlt, faSignOutAlt,
faHome, faHome,
faComments, faComments,
faBell, faBolt,
faUserPlus, faUserPlus,
faBullhorn, faBullhorn,
faSearch, faSearch,
@ -23,7 +23,7 @@ library.add(
faSignOutAlt, faSignOutAlt,
faHome, faHome,
faComments, faComments,
faBell, faBolt,
faUserPlus, faUserPlus,
faBullhorn, faBullhorn,
faSearch, faSearch,

View file

@ -74,7 +74,7 @@
<FAIcon <FAIcon
fixed-width fixed-width
class="fa-scale-110 fa-old-padding" class="fa-scale-110 fa-old-padding"
icon="bell" icon="bolt"
/> {{ $t("nav.interactions") }} /> {{ $t("nav.interactions") }}
</router-link> </router-link>
</li> </li>