main page footer mobile compatible

This commit is contained in:
KUN1007 2023-06-14 23:12:08 +08:00
parent 1d0772391a
commit bb43ec99e8
5 changed files with 35 additions and 8 deletions

View file

@ -14,7 +14,7 @@ export const useKUNGalgamerStore = defineStore({
persist: true, persist: true,
state: (): UserState => ({ state: (): UserState => ({
id: ref<number>(0), id: ref<number>(0),
token: ref<string>(''), token: ref<string>('KUNGalgamer'),
roles: ref<string>(''), roles: ref<string>(''),
}), }),
getters: {}, getters: {},

View file

@ -62,7 +62,7 @@ const width = computed(() => {
display: none; display: none;
} }
.content-container { .content-container {
width: 70%; width: 80%;
border: none; border: none;
background-color: var(--kungalgame-trans-white-9); background-color: var(--kungalgame-trans-white-9);
} }
@ -73,7 +73,7 @@ const width = computed(() => {
display: none; display: none;
} }
.content-container { .content-container {
width: 95%; width: 100%;
border: none; border: none;
background-color: var(--kungalgame-trans-white-9); background-color: var(--kungalgame-trans-white-9);
} }

View file

@ -18,9 +18,9 @@ import KUNGalgameFooter from '@/components/KUNGalgameFooter.vue'
<!-- 左侧下方的信息 --> <!-- 左侧下方的信息 -->
<div class="bottom"> <div class="bottom">
<!-- 联系方式 --> <!-- 联系方式 -->
<Contacts /> <Contacts class="contacts" />
<!-- 版权描述,版本号 --> <!-- 版权描述,版本号 -->
<KUNGalgameFooter style="margin: 0 auto" /> <KUNGalgameFooter class="footer" />
</div> </div>
</div> </div>
@ -58,9 +58,21 @@ import KUNGalgameFooter from '@/components/KUNGalgameFooter.vue'
flex-direction: column; flex-direction: column;
} }
.footer {
margin: 0 auto;
}
@media (max-width: 1000px) { @media (max-width: 1000px) {
.top { .contacts {
display: none; margin: 20px 0;
width: 100%;
justify-content: center;
}
.footer {
margin: 20px 0;
}
.container {
flex-direction: column;
} }
} }
</style> </style>

View file

@ -7,6 +7,7 @@ interface FooterInfoItem {
interface FooterInfo { interface FooterInfo {
index: number index: number
mobile?: string
title: string title: string
list: FooterInfoItem[] list: FooterInfoItem[]
} }
@ -15,6 +16,7 @@ const info: FooterInfo[] = [
{ {
index: 1, index: 1,
title: `communicate`, title: `communicate`,
mobile: 'mobile',
list: [ list: [
{ {
index: 1, index: 1,
@ -94,7 +96,13 @@ const link: FooterInfoItem[] = [
<template> <template>
<div class="info"> <div class="info">
<!-- galgame 交流 --> <!-- galgame 交流 -->
<div class="catalog" v-for="kun in info" :key="kun.index"> <!-- 这里为了适配手机端,带有 mobile 属性的节点将会媒体查询时被隐藏 -->
<div
class="catalog"
v-for="kun in info"
:key="kun.index"
:class="kun.mobile"
>
<!-- 每个信息类别的标题 --> <!-- 每个信息类别的标题 -->
<h2> <h2>
<span>{{ $t(`mainPage.footer.title['${kun.title}']`) }}</span> <span>{{ $t(`mainPage.footer.title['${kun.title}']`) }}</span>
@ -148,4 +156,10 @@ const link: FooterInfoItem[] = [
} }
} }
} }
@media (max-width: 1000px) {
.mobile {
display: none;
}
}
</style> </style>

View file

@ -11,6 +11,7 @@ import { useKUNGalgameMessageStore } from '@/store/modules/message'
const info = useKUNGalgameMessageStore() const info = useKUNGalgameMessageStore()
const isShowPanel = ref('') const isShowPanel = ref('')
const loginForm = reactive({ const loginForm = reactive({
username: '', username: '',
password: '', password: '',