Skip to content

Commit 2429823

Browse files
authored
site: menu show tag when front-matter has tag prop (#7053)
1 parent 9bdf882 commit 2429823

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

site/src/layouts/Menu.vue

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
<span>{{ isZhCN ? n.title : n.enTitle || n.title }}</span>
4949
<span v-if="isZhCN" class="chinese">{{ n.subtitle }}</span>
5050
</router-link>
51+
<a-tag v-if="n.tag" color="green" style="margin-left: auto">{{ n.tag }}</a-tag>
5152
</a-menu-item>
5253
</template>
5354
</a-menu-item-group>

site/src/theme/static/common.less

+5
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ a {
8989
padding-right: 40px !important;
9090
padding-left: 16px !important;
9191
}
92+
93+
.ant-menu-title-content {
94+
display: flex;
95+
align-items: center;
96+
}
9297
}
9398

9499
// Nest Category > Type > Article

0 commit comments

Comments
 (0)