Skip to content

Commit

Permalink
fix: item height, container, panel text overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Iori Ichinose committed Jan 11, 2023
1 parent b9e65e2 commit 15d90d0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
4 changes: 3 additions & 1 deletion src/components/MarkdownContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const theme = computed(() =>
const CustomSelect = defineCustomElement(CustomSelectCe);
customElements.define('mira-select', CustomSelect);
if (customElements.get('mira-select') != undefined) {
customElements.define('mira-select', CustomSelect);
}
</script>

<template>
Expand Down
28 changes: 19 additions & 9 deletions src/components/SidePanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,24 @@ async function handleClick(link: NewsEntry) {
<NTabs type="segment" size="small" pane-class="tab-pane">
<NTabPane name="Mirror">
<NRow v-for="link in news" :key="link.content">
<NButton text tag="a" @click="handleClick(link)">{{
convertTimestamp(link.time, locale as 'zh' | 'en') +
' - ' +
link.name
}}</NButton>
<NButton text tag="a" @click="handleClick(link)">
<span class="link-title">
{{
convertTimestamp(link.time, locale as 'zh' | 'en') +
' - ' +
link.name
}}
</span>
</NButton>
</NRow>
</NTabPane>
<NTabPane name="LUG Jokes">
<NRow v-for="link in jokes" :key="link.title">
<NButton text tag="a" :href="link.web_url" target="_blank">{{
link.title
}}</NButton>
<NButton text tag="a" :href="link.web_url" target="_blank">
<span class="link-title">
{{ link.title }}
</span>
</NButton>
</NRow>
</NTabPane>
</NTabs>
Expand All @@ -67,7 +73,7 @@ async function handleClick(link: NewsEntry) {
preset="card"
size="huge"
:bordered="true"
:title="selected?.name || 'Null'"
:title="selected?.name"
v-model:show="show"
>
<MarkdownContainer :content="content" />
Expand All @@ -80,6 +86,10 @@ async function handleClick(link: NewsEntry) {
}
a.n-button {
max-width: 100%;
}
span.link-title {
overflow: hidden;
max-width: 100%;
text-overflow: ellipsis;
Expand Down
3 changes: 2 additions & 1 deletion src/components/TopNavi.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ watch(
:value="route.path"
:options="options"
mode="horizontal"
class="navi-menu"
v-if="!store.state.isMobile"
/>
<NDropdown
Expand Down Expand Up @@ -155,7 +156,7 @@ watch(
</style>

<style>
.n-menu .n-menu-item {
.navi-menu .n-menu-item {
height: calc(100% - 1px) !important;
}
</style>

0 comments on commit 15d90d0

Please sign in to comment.