Skip to content

Commit

Permalink
feat: contributor style
Browse files Browse the repository at this point in the history
  • Loading branch information
lisha committed Aug 1, 2024
1 parent 731c478 commit 3d4dbe3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/pages/contributors/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const rangerwhyRender = (isMobile) => {
method: 'get',
}).then(response => response.json())
.then(res => {
setList(res.data)
setList([...res.data,...res.data,...res.data])
})
}

Expand All @@ -46,11 +46,11 @@ const rangerwhyRender = (isMobile) => {
<div className={styles.title}>Why join in <div className={styles.s_title}>Seeed Ranger?</div></div>
<div className={styles.why_container}>
<Swiper
modules={[Navigation, Pagination]}
modules={[Navigation]}
autoplay={true}
navigation
slidesPerView={isMobile ? 1 : 4} // 每次显示的幻灯片数量
spaceBetween={40}
spaceBetween={24}
pagination={{ clickable: true }} // 显示分页器
>
{list.map((item, index) => {
Expand Down Expand Up @@ -541,16 +541,16 @@ const wishRender = (isMobile) => {
}
export default function Ranger(): JSX.Element {
function getContributorUuid() {
let uuid = localStorage.getItem('wiki_contributor_uuid')
let uuid = window.localStorage.getItem('wiki_contributor_uuid')
if (!uuid) {
uuid = generateUUID()
localStorage.setItem('wiki_contributor_uuid', uuid)
window.localStorage.setItem('wiki_contributor_uuid', uuid)
}
return uuid
}
client_key = getContributorUuid()
const [isMobile, setIsMobile] = useState(false)
useEffect(() => {
client_key = getContributorUuid()
setIsMobile(judgeIsMobile())
}, [])
return (
Expand Down
6 changes: 4 additions & 2 deletions src/pages/contributors/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
.claim_page .swiper-slide {
height: auto;
}

.claim_page .swiper-button-next:after,.claim_page .swiper-rtl .swiper-button-prev:after,
.claim_page .swiper-button-prev:after, .claim_page .swiper-rtl .swiper-button-next:after{
font-size: 24px;}
.claim_page .swiper-wrapper {
margin-bottom: 40px;
}
Expand Down Expand Up @@ -86,7 +88,7 @@ margin-bottom: 10px;}

.claim_page .swiper-button-prev:after,
.claim_page .swiper-button-next:after {
font-size: 30px;
font-size: 20px;
}

.claim_page .person .swiper-button-next {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/contributors/styles.module.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/pages/contributors/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
color: #000;
margin-top: 3.5%;
overflow: hidden;
padding: 0 3.5%;
padding: 0 24px;
box-sizing: border-box;

.why_item {
Expand Down

0 comments on commit 3d4dbe3

Please sign in to comment.