Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 73 additions & 6 deletions packages/devui-vue/docs/.vitepress/devui-theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ const becomeContributor = () => {

<div class="container-contributors" v-if="enableHome">
<div class="contributors-inner">
<h2>贡献者✨</h2>
<h2>贡献者✨</h2>
<PageContributor
v-if="contributors && contributors.length > 0"
:contributors="contributors"
Expand Down Expand Up @@ -251,21 +251,22 @@ const becomeContributor = () => {
}
}

// iPad/PC
.container-contributors {
margin-top: 120px;
padding: 120px 0;
padding: 2rem 0;
background: var(--devui-global-bg, #f3f6f8);

.contributors-inner {
max-width: 544px;
max-width: 564px;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;

h2 {
margin-bottom: 4rem;
margin-top: 1rem;
margin-bottom: 2rem;
text-align: center;
font-size: 2rem;
border: 0;
Expand All @@ -276,9 +277,75 @@ const becomeContributor = () => {
}

.btn-become-contributor {
margin-top: 2rem;
margin-top: 1rem;
width: 80px;
}

.page-contributor {
padding: 0 20px;

& > a:nth-child(8n) > span {
margin: 0 !important;
}
}
}
}

// iPhone 6/7/8 Plus(414) Nexus 5X/6/6P(412)
@media (max-width: 420px) {
.container-contributors .contributors-inner {
h2 {
font-size: 1.6rem;
}

.page-contributor {
& > a > span {
margin: 0 12px 8px 0 !important;

& > img, & svg {
width: 40px !important;
height: 40px !important;
}
}

& > a:nth-child(8n) > span {
margin: 0 12px 8px 0 !important;
}

& > a:nth-child(7n) > span {
margin: 0 !important;
}
}
}
}

// iPhone 6/7/8/X(375) Nexus 4/5(384/360)
@media (max-width: 385px) {
.container-contributors .contributors-inner {
.page-contributor {
& > a:nth-child(7n) > span {
margin: 0 12px 8px 0 !important;
}

& > a:nth-child(6n) > span {
margin: 0 !important;
}
}
}
}

// iPhone 4/5/SE(320)
@media (max-width: 330px) {
.container-contributors .contributors-inner {
.page-contributor {
& > a:nth-child(6n) > span {
margin: 0 12px 8px 0 !important;
}

& > a:nth-child(5n) > span {
margin: 0 !important;
}
}
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ const heroText = computed(() => frontmatter.value.heroText || site.value.title)
height: 260px;
}

@media (max-width: 420px) {
.home-hero .image {
height: 180px;
}
}

.title {
margin-top: 2.5rem;
font-size: 2rem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { toRefs } from 'vue'
import { toRefs, computed } from 'vue'
import { Avatar } from '@devui/avatar'

const props = defineProps<{
Expand All @@ -18,11 +18,15 @@ const props = defineProps<{
}>()

const { contributors, spacing, avatarSize } = toRefs(props)

const validContributors = computed(() => {
return contributors.value.filter(item => item.avatar)
})
</script>

<template>
<div class="page-contributor">
<a v-for="contributor of contributors" :href="contributor.homepage" target="_blank">
<a v-for="contributor of validContributors" :href="contributor.homepage" target="_blank">
<Avatar v-if="contributor.avatar" class="contributor-avatar" :style="{
marginRight: `${spacing}px`,
marginBottom: `${spacing - 4}px`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
homepage: 'https://github.com/asdlml6'
},
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/2582/7746958_kagol_1606652460.png!avatar100',
avatar: 'https://avatars.githubusercontent.com/u/9566362?v=4',
homepage: 'https://github.com/kagol'
},
],
fullscreen: [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/640/1920569_micd_1633943788.png!avatar100',
homepage: 'https://gitee.com/micd'
avatar: 'https://avatars.githubusercontent.com/u/20532893?v=4',
homepage: 'https://github.com/MICD0704'
},
],
icon: [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/2582/7746958_kagol_1606652460.png!avatar100',
avatar: 'https://avatars.githubusercontent.com/u/9566362?v=4',
homepage: 'https://github.com/kagol',
}
],
Expand Down Expand Up @@ -63,7 +63,7 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
],
search: [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/615/1847969_laiweilun_1628090818.png!avatar100',
avatar: 'https://avatars.githubusercontent.com/u/29355875?v=4',
homepage: 'https://github.com/SituC'
},
],
Expand All @@ -75,7 +75,7 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
],
sticky: [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/2451/7354663_maizhiyuan_1647402812.png!avatar200',
avatar: '',
homepage: 'https://gitee.com/maizhiyuan'
},
],
Expand Down Expand Up @@ -105,7 +105,7 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
],
breadcrumb: [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/2528/7584294_Jecyu_1630023376.png!avatar100',
avatar: 'https://avatars.githubusercontent.com/u/28448589?v=4?s=100',
homepage: 'https://github.com/naluduo233'
},
],
Expand Down Expand Up @@ -135,8 +135,8 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
],
'steps-guide': [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/765/2295523_pupulus_1647268902.png!avatar200',
homepage: 'https://gitee.com/pupulus'
avatar: 'https://avatars.githubusercontent.com/u/30283065?v=4?s=100',
homepage: 'https://github.com/NidusP'
},
],
tabs: [
Expand All @@ -149,7 +149,7 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
// 反馈
alert: [
{
avatar: '',
avatar: 'https://avatars.githubusercontent.com/u/91681351?v=4',
homepage: 'https://github.com/chressYu'
},
{
Expand Down Expand Up @@ -199,8 +199,8 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
],
result: [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/727/2183498_icjs-cc_1647402518.png!avatar200',
homepage: 'https://gitee.com/icjs-cc'
avatar: 'https://avatars.githubusercontent.com/u/27618209?v=4',
homepage: 'https://github.com/icjs-cc'
},
],
tooltip: [
Expand All @@ -227,7 +227,7 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
],
cascader: [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/615/1847969_laiweilun_1628090818.png!avatar100',
avatar: 'https://avatars.githubusercontent.com/u/29355875?v=4',
homepage: 'https://github.com/SituC'
},
],
Expand Down Expand Up @@ -255,7 +255,7 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
],
'date-picker-pro': [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/2528/7584294_Jecyu_1630023376.png!avatar100',
avatar: 'https://avatars.githubusercontent.com/u/28448589?v=4?s=100',
homepage: 'https://github.com/naluduo233'
},
{
Expand All @@ -277,7 +277,7 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
],
input: [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/615/1847969_laiweilun_1628090818.png!avatar100',
avatar: 'https://avatars.githubusercontent.com/u/29355875?v=4',
homepage: 'https://github.com/SituC'
},
],
Expand All @@ -299,13 +299,13 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
homepage: 'https://github.com/brenner8023'
},
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/2722/8168765_xuehongjie_1647269846.png!avatar100',
avatar: 'https://avatars.githubusercontent.com/u/22795131?v=4',
homepage: 'https://github.com/xuehongjie'
}
],
select: [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/3181/9545863_lookforwhat_1628521673.png!avatar200',
avatar: '',
homepage: 'https://gitee.com/lookforwhat'
},
],
Expand All @@ -321,7 +321,7 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
homepage: 'https://github.com/brenner8023'
},
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/1826/5479448_vergil_lu_1626167392.png!avatar200',
avatar: '',
homepage: 'https://gitee.com/vergil_lu'
},
],
Expand All @@ -337,7 +337,7 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
],
textarea: [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/1747/5243550_afterain_1635492436.png!avatar200',
avatar: '',
homepage: 'https://gitee.com/afterain'
},
],
Expand Down Expand Up @@ -383,13 +383,13 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
homepage: 'https://github.com/duqingyu'
},
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/640/1920569_micd_1633943788.png!avatar200',
homepage: 'https://gitee.com/micd'
avatar: 'https://avatars.githubusercontent.com/u/20532893?v=4',
homepage: 'https://github.com/MICD0704'
},
],
card: [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/1826/5479448_vergil_lu_1626167392.png!avatar200',
avatar: '',
homepage: 'https://gitee.com/vergil_lu'
},
],
Expand Down Expand Up @@ -419,7 +419,7 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
],
gantt: [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/552/1658836_liuyingbin_1636725444.png!avatar200',
avatar: '',
homepage: 'https://gitee.com/liuyingbin'
},
],
Expand Down Expand Up @@ -447,7 +447,7 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
],
'quadrant-diagram': [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/3181/9544625_nowisfuture_1647414135.png!avatar200',
avatar: '',
homepage: 'https://gitee.com/nowisfuture'
},
],
Expand Down Expand Up @@ -483,7 +483,7 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
homepage: 'https://gitee.com/georgeleeo_jxd'
},
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/757/2273663_weban_1611113629.png!avatar200',
avatar: '',
homepage: 'https://gitee.com/weban'
},
{
Expand All @@ -505,19 +505,19 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
],
tree: [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/3271/9815056_sufuwang_1633233452.png!avatar200',
avatar: 'https://avatars.githubusercontent.com/u/46395105?v=4',
homepage: 'https://github.com/sufuwang'
},
{
avatar: '',
homepage: 'https://gitee.com/gxuud'
},
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/2582/7746958_kagol_1606652460.png!avatar100',
avatar: 'https://avatars.githubusercontent.com/u/9566362?v=4',
homepage: 'https://github.com/kagol'
},
{
avatar: '',
avatar: 'https://avatars.githubusercontent.com/u/87163017?v=4',
homepage: 'https://github.com/faq0192'
},
{
Expand All @@ -529,19 +529,19 @@ export const CONTRIBUTORS_MAP: IContributingMap = {
// 布局
grid: [
{
avatar: '',
avatar: 'https://avatars.githubusercontent.com/u/54826175?v=4',
homepage: 'https://github.com/ming-bin'
},
],
layout: [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/601/1804112_tanwenxue_1647402605.png!avatar200',
avatar: '',
homepage: 'https://gitee.com/tanwenxue'
},
],
splitter: [
{
avatar: 'https://portrait.gitee.com/uploads/avatars/user/2528/7584294_Jecyu_1630023376.png!avatar100',
avatar: 'https://avatars.githubusercontent.com/u/28448589?v=4?s=100',
homepage: 'https://github.com/naluduo233'
},
],
Expand Down