diff --git a/src/components/t-sidebar.vue b/src/components/t-sidebar.vue index b72fc035..5a8d17cb 100644 --- a/src/components/t-sidebar.vue +++ b/src/components/t-sidebar.vue @@ -29,57 +29,17 @@ annoIcon + + + - - - - - - - - - - - - - - - - - - - - - - - - - @@ -164,7 +232,6 @@ import { NewsCard, NewsData } from "../plugins/Mys/interface/news"; const router = useRouter(); const gid = useRoute().params.gid as string; const showNews = ref((gid !== "5") as boolean); -const showSwitch = ref((gid === "2") as boolean); // Store const appStore = useAppStore(); @@ -183,6 +250,7 @@ const search = ref("" as string); // 数据 const tab = ref("" as string); +const showList = ref(false as boolean); const postData = ref({ notice: [] as NewsCard[], activity: [] as NewsCard[], @@ -237,6 +305,12 @@ async function switchAnno () { await router.push("/announcements"); } +async function toChannel (chan:string) { + showList.value = false; + await router.push(chan); + await window.location.reload(); +} + // 加载更多 async function loadMore (data: string) { loadingSub.value = true; @@ -379,7 +453,7 @@ async function searchPost () { overflow: hidden; } -.news-cover :hover { +.news-cover:hover { transform: scale(1.1); transition: all 0.3s linear; cursor: pointer; @@ -402,6 +476,15 @@ async function searchPost () { color: var(--content-text-3); } +.switch-chan { + font-family: Genshin, serif; + background: var(--btn-bg-1); + height: 40px; + margin-right: 10px; + margin-top: 5px; + color: var(--content-text-3); +} + /* load more */ .load-news { font-family: Genshin, serif; @@ -423,4 +506,75 @@ async function searchPost () { width: 18px; height: 18px; } + +/* chan choice */ +.choice-box { + position: absolute; + top: calc(50vh - 200px); + left: calc(50vw - 140px); + width: 400px; + height: 280px; + background: var(--content-bg-2); + border-radius: 10px; + padding: 10px; +} + +.choice-title { + font-family: Genshin, serif; + font-size: 20px; + color: var(--content-text-3); + margin-bottom: 10px; +} + +.choice-list { + display: grid; + grid-template-columns: repeat(2, 1fr); + grid-gap: 10px; +} + +.choice-item { + cursor: pointer; + font-family: Genshin, serif; + background: rgb(0 0 0 / 30%); + color: var(--content-text-3); + height: 45px; + border-radius: 5px; + display: flex; + justify-content: space-around; + transition: all 0.3s linear; +} + +.choice-item:hover { + border-radius: 5px; + background: rgb(0 0 0 / 50%); + transition: all 0.5s linear; +} + +.choice-icon { + position: relative; + width: 45px; + height: 45px; + border-top-left-radius: 5px; + border-bottom-left-radius: 5px; +} + +.choice-icon img { + width: 45px; + height: 45px; + border-top-left-radius: 5px; + border-bottom-left-radius: 5px; +} + +.choice-name { + width: calc(100% - 50px); + height: 45px; + display: flex; + justify-content: center; + align-items: center; + margin-left: 5px; + position: relative; + color: #fff; + font-size: 12px; + font-family: Genshin-Light, serif; +}