Merge pull request #674 from h3poteto/narrow-design
Fix side menu design for narrow style
This commit is contained in:
commit
24a299148d
|
@ -36,52 +36,54 @@
|
||||||
:router="true"
|
:router="true"
|
||||||
:class="collapse ? 'el-menu-vertical timeline-menu narrow-menu':'el-menu-vertical timeline-menu'"
|
:class="collapse ? 'el-menu-vertical timeline-menu narrow-menu':'el-menu-vertical timeline-menu'"
|
||||||
role="menu">
|
role="menu">
|
||||||
<el-menu-item :index="`/${id()}/home`" role="menuitem">
|
<el-menu-item :index="`/${id()}/home`" role="menuitem" :title="$t('side_menu.home')">
|
||||||
<icon name="home"></icon>
|
<icon name="home"></icon>
|
||||||
<span>{{ $t("side_menu.home") }}</span>
|
<span>{{ $t("side_menu.home") }}</span>
|
||||||
<el-badge is-dot :hidden="!unreadHomeTimeline">
|
<el-badge is-dot :hidden="!unreadHomeTimeline">
|
||||||
</el-badge>
|
</el-badge>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item :index="`/${id()}/notifications`" role="menuitem">
|
<el-menu-item :index="`/${id()}/notifications`" role="menuitem" :title="$t('side_menu.notification')">
|
||||||
<icon name="bell"></icon>
|
<icon name="bell"></icon>
|
||||||
<span>{{ $t("side_menu.notification") }}</span>
|
<span>{{ $t("side_menu.notification") }}</span>
|
||||||
<el-badge is-dot :hidden="!unreadNotifications">
|
<el-badge is-dot :hidden="!unreadNotifications">
|
||||||
</el-badge>
|
</el-badge>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item :index="`/${id()}/favourites`" role="menuitem">
|
<el-menu-item :index="`/${id()}/favourites`" role="menuitem" :title="$t('side_menu.favourite')">
|
||||||
<icon name="star"></icon>
|
<icon name="star"></icon>
|
||||||
<span>{{ $t("side_menu.favourite") }}</span>
|
<span>{{ $t("side_menu.favourite") }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item :index="`/${id()}/local`" role="menuitem">
|
<el-menu-item :index="`/${id()}/local`" role="menuitem" :title="$t('side_menu.local')">
|
||||||
<icon name="users"></icon>
|
<icon name="users"></icon>
|
||||||
<span>{{ $t("side_menu.local") }}</span>
|
<span>{{ $t("side_menu.local") }}</span>
|
||||||
<el-badge is-dot :hidden="!unreadLocalTimeline">
|
<el-badge is-dot :hidden="!unreadLocalTimeline">
|
||||||
</el-badge>
|
</el-badge>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item :index="`/${id()}/public`" role="menuitem">
|
<el-menu-item :index="`/${id()}/public`" role="menuitem" :title="$t('side_menu.public')">
|
||||||
<icon name="globe"></icon>
|
<icon name="globe"></icon>
|
||||||
<span>{{ $t("side_menu.public") }}</span>
|
<span>{{ $t("side_menu.public") }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item :index="`/${id()}/search`" role="menuitem">
|
<el-menu-item :index="`/${id()}/search`" role="menuitem" :title="$t('side_menu.search')">
|
||||||
<icon name="search"></icon>
|
<icon name="search"></icon>
|
||||||
<span>{{ $t("side_menu.search") }}</span>
|
<span>{{ $t("side_menu.search") }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item :index="`/${id()}/hashtag`" role="menuitem">
|
<el-menu-item :index="`/${id()}/hashtag`" role="menuitem" :title="$t('side_menu.hashtag')">
|
||||||
<icon name="hashtag"></icon>
|
<icon name="hashtag"></icon>
|
||||||
<span>{{ $t("side_menu.hashtag") }}</span>
|
<span>{{ $t("side_menu.hashtag") }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<template v-for="tag in tags">
|
<template v-for="tag in tags">
|
||||||
<el-menu-item :index="`/${id()}/hashtag/${tag.tagName}`" class="sub-menu" :key="tag.tagName" role="menuitem">
|
<el-menu-item :index="`/${id()}/hashtag/${tag.tagName}`" :class="collapse ? '' : 'sub-menu'" :key="tag.tagName" role="menuitem" :title="tag.tagName">
|
||||||
<span>#{{ tag.tagName }}</span>
|
<icon name="hashtag" scale="0.8"></icon>
|
||||||
|
<span>{{ tag.tagName }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</template>
|
</template>
|
||||||
<el-menu-item :index="`/${id()}/lists`" role="menuitem">
|
<el-menu-item :index="`/${id()}/lists`" role="menuitem" :title="$t('side_menu.lists')">
|
||||||
<icon name="list-ul"></icon>
|
<icon name="list-ul"></icon>
|
||||||
<span>{{ $t("side_menu.lists") }}</span>
|
<span>{{ $t("side_menu.lists") }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<template v-for="list in lists">
|
<template v-for="list in lists">
|
||||||
<el-menu-item :index="`/${id()}/lists/${list.id}`" class="sub-menu" :key="list.id" role="menuitem">
|
<el-menu-item :index="`/${id()}/lists/${list.id}`" :class="collapse ? '' : 'sub-menu'" :key="list.id" role="menuitem" :title="list.title">
|
||||||
<span>#{{ list.title }}</span>
|
<icon name="list-ul" scale="0.8"></icon>
|
||||||
|
<span>{{ list.title }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</template>
|
</template>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
|
@ -201,6 +203,7 @@ export default {
|
||||||
.release-collapse {
|
.release-collapse {
|
||||||
color: #dcdfe6;
|
color: #dcdfe6;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
margin-left: -10px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #409eff;
|
color: #409eff;
|
||||||
|
@ -241,8 +244,18 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.narrow-menu {
|
.narrow-menu /deep/ {
|
||||||
width: 76px;
|
width: 64px;
|
||||||
|
|
||||||
|
.el-menu-item {
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-badge {
|
||||||
|
vertical-align: top;
|
||||||
|
line-height: 32px;
|
||||||
|
margin-left: -8px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue