naive-ui/demo/pages/home/Footer.vue

192 lines
4.6 KiB
Vue
Raw Normal View History

2020-02-27 18:09:23 +08:00
<template>
2021-05-04 02:27:16 +08:00
<n-layout-footer
bordered
class="footer"
:class="{
['footer--centered']: centered
}"
>
<div class="footer-links">
<div class="footer-links-col">
<n-text depth="1" class="col-header">{{ t('resources') }}</n-text>
2021-06-03 01:26:08 +08:00
<n-button disabled text>{{ t('designResources') }}</n-button>
2021-06-09 14:23:27 +08:00
<n-button text tag="a" target="_blank" href="https://www.xicons.org">{{
2021-06-03 01:26:08 +08:00
t('icons')
}}</n-button>
2021-05-04 02:27:16 +08:00
</div>
<div class="footer-links-col">
<n-text depth="1" class="col-header">{{ t('help') }}</n-text>
2021-06-03 01:15:27 +08:00
<n-button text @click="push('/docs/common-issues')">{{
t('commonIssues')
}}</n-button>
<n-button text @click="push('/docs/changelog')">{{
t('changelog')
}}</n-button>
2021-06-05 10:19:46 +08:00
<n-button
text
tag="a"
target="_blank"
href="https://naive-ui.github.io/issue-helper/"
2021-06-05 10:19:46 +08:00
>
{{ t('reportBug') }}
</n-button>
2021-05-04 02:27:16 +08:00
</div>
<div class="footer-links-col">
<n-text depth="1" class="col-header">{{ t('community') }}</n-text>
2021-06-05 04:20:31 +08:00
<n-button text tag="a" target="_blank" :href="repoUrl">
GitHub
2021-06-03 01:26:08 +08:00
</n-button>
2021-06-05 04:20:31 +08:00
<n-button
text
tag="a"
href="https://discord.gg/Pqv7Mev5Dd"
target="_blank"
>
Discord
</n-button>
<n-tooltip>
<template #trigger>
<n-button text>{{ t('dingTalk') }}</n-button>
</template>
{{ t('dingTalkGroupChat') }} 33482509
</n-tooltip>
2021-05-04 02:27:16 +08:00
</div>
<div class="footer-links-col footer-links-col--last">
<n-text depth="1" class="col-header">{{ t('contact') }}</n-text>
2021-06-03 01:15:27 +08:00
<n-button
text
tag="a"
target="_blank"
href="https://www.tusimple.com/"
>{{ t('tusimple') }}</n-button
>
2021-06-08 13:49:17 +08:00
<n-button text tag="a" target="_blank" :href="t('joinUsLink')">{{
t('joinUs')
}}</n-button>
2021-05-04 02:27:16 +08:00
</div>
</div>
<n-divider class="footer-divider" />
<div style="text-align: center; padding: 20px">
2021-06-09 02:21:58 +08:00
<n-text depth="3">Naive UI {{ version }} · Made by TuSimple</n-text>
2021-05-04 02:27:16 +08:00
</div>
</n-layout-footer>
2020-02-27 18:09:23 +08:00
</template>
2020-03-05 23:01:27 +08:00
<script>
2021-05-04 02:27:16 +08:00
import { i18n } from '../../utils/composables'
2021-06-03 01:15:27 +08:00
import { push } from '../../store'
2021-06-05 04:20:31 +08:00
import { repoUrl } from '../../utils/github-url'
2021-06-02 18:29:54 +08:00
import { version } from 'naive-ui'
2021-05-04 02:27:16 +08:00
2020-03-05 23:01:27 +08:00
export default {
props: {
2021-05-04 02:27:16 +08:00
centered: Boolean
},
setup () {
2021-06-02 18:29:54 +08:00
return {
version,
2021-06-05 04:20:31 +08:00
repoUrl,
2021-06-03 01:15:27 +08:00
push,
2021-06-02 18:29:54 +08:00
...i18n({
'zh-CN': {
resources: '资源',
designResources: '设计资源',
help: '帮助',
community: '社区',
contact: '联系我们',
changelog: '更新日志',
commonIssues: '常见问题',
tusimple: '图森未来',
2021-06-03 01:26:08 +08:00
joinUs: '加入我们',
icons: '图标库',
dingTalk: '钉钉',
2021-06-05 10:19:46 +08:00
dingTalkGroupChat: '钉钉交流群',
2021-06-08 13:49:17 +08:00
reportBug: '报告 Bug',
joinUsLink: 'https://app.mokahr.com/campus_apply/tusenweilai/3232#/'
2021-06-02 18:29:54 +08:00
},
'en-US': {
resources: 'Resources',
designResources: 'Design Resources',
help: 'Help',
community: 'Community',
contact: 'Contact Us',
changelog: 'Change Log',
commonIssues: 'Common Issues',
tusimple: 'TuSimple',
2021-06-03 01:26:08 +08:00
joinUs: 'Join Us',
icons: 'Icon Library',
dingTalk: 'DingTalk',
2021-06-05 10:19:46 +08:00
dingTalkGroupChat: 'DingTalk Group Chat',
2021-06-08 13:49:17 +08:00
reportBug: 'Report Bug',
joinUsLink:
'https://boards.greenhouse.io/tusimplerelocationjobs/jobs/5137805002?gh_src=7908a9242us'
2021-06-02 18:29:54 +08:00
}
})
}
2020-03-05 23:01:27 +08:00
}
}
</script>
2020-02-27 18:09:23 +08:00
<style scoped>
.footer {
2021-05-04 02:27:16 +08:00
--x-padding: 56px;
2021-06-02 16:17:13 +08:00
margin-top: auto;
2021-05-04 02:27:16 +08:00
}
.footer.footer--centered .footer-links {
margin: auto;
max-width: 960px;
--x-padding: 36px;
}
.footer-links {
box-sizing: border-box;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: var(--x-padding);
padding-bottom: 0;
padding-top: 32px;
}
.footer-links-col {
flex: 1 0 0;
display: flex;
flex-direction: column;
align-items: flex-start;
padding-right: 24px;
padding-bottom: 24px;
}
.col-header {
white-space: nowrap;
}
@media only screen and (min-width: 1024px) {
.footer.footer--centered .footer-links-col.footer-links-col--last {
flex: 0 0 0;
}
}
.footer.footer--centered .footer-links-col {
width: initial;
}
.footer-divider {
margin: 0;
padding: 0 var(--x-padding);
}
.footer-links-col > * {
line-height: 2;
}
.col-header {
font-weight: 500;
2020-02-27 18:09:23 +08:00
}
2020-03-03 19:25:25 +08:00
.link {
text-decoration: none;
}
2020-02-27 18:09:23 +08:00
</style>