diff --git a/CHANGELOG.md b/CHANGELOG.md index 71a6c4f..380dbd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,81 @@ +# 1.3.0 (2023-11-14) + +### Feat + ++ add pagination component ++ update profiles content + - [Amrit Anand](https://github.com/aamrits) + - [Iván Alonso](https://github.com/neverbot) + - [tortorootoeot](https://github.com/totoroterror) + - [®️BYLICKILABS™️](https://github.com/bylickilabs) + - [Ariba Memon](https://github.com/Ariba-memon) + - [Maksym Vovk](https://github.com/MaksimVovk) + - [vito.mohagheghian](https://github.com/vito-mohagheghian) + - [Ahmed Adebayo](https://github.com/Huangdi-599) + - [Aditya Dharmawan Saputra](https://github.com/adityadees) + - [Vikrant Bhat](https://github.com/bhatvikrant) + - [Filimonov Alexey](https://github.com/FilimonovAlexey) + - [Anser Waseem](https://github.com/anserwaseem) + - [Ryota](https://github.com/RyotaOku) + - [Lucifer_Bhiya](https://github.com/Lucifer-00007) + - [Jiganesh Patil](https://github.com/Jiganesh) + - [Rachit Pal](https://github.com/Rachit-Pal) + - [James Mbugua](https://github.com/AwesomeJim) + - [Fabian Herrera Martinez](https://github.com/FabianHMzz) + - [Yoshiyuki Hisamatsu](https://github.com/hisasann) + - [Kera Cudmore](https://github.com/kera-cudmore) + - [Imani "K!ΠG" Niyigena](https://github.com/ImaniAN) + - [Gustavo Santana](https://github.com/Gustavosta) + - [Anuj trivedi](https://github.com/aasn0119) + - [Arlettebrook](https://github.com/Arlettebrook) + - [ngdream](https://github.com/ngdream) + - [Ismael Miah](https://github.com/ismaelmiah) + - [mat-0](https://github.com/mat-0) + - [Amrit Raj](https://github.com/amritmaurya1504) + - [Mushlih Almubarak](https://github.com/mushlih-almubarak) + - [Shreyas Chavhan](https://github.com/shreyaschavhan) + - [Senior Software Engineer](https://github.com/Big-Silver) + - [二丫讲梵](https://github.com/eryajf) + - [Adam Kostarelas](https://github.com/AdamXweb) + - [Shaan Khan](https://github.com/ShaanCoding) + - [UltraLion](https://github.com/UltraLionfr) + - [Lucas](https://github.com/Somfic) + - [Yogesh Yadav](https://github.com/yogeshdecodes) + - [Hein Thant](https://github.com/IndieCoderMM) + - [Anmol Baranwal](https://github.com/Anmol-Baranwal) + - [Vishwa Gaurav](https://github.com/VishwaGauravIn) + - [frozendark](https://github.com/frozendark01) + - [Henry](https://github.com/henryhkb) + - [Bruno Brito](https://github.com/brunobritodev) + - [Zetao Zhuang](https://github.com/zzetao) + - [Fiel Mangginimba](https://github.com/fiellogramontemangginimba) + - [Hemant Joshi](https://github.com/mayhemantt) + - [「 Rajkumar™ 」](https://github.com/Awesome-RJ) + - [Jack Halloween](https://github.com/jackhallloween21) + - [Martín Couso](https://github.com/martinCouso) + - [Aman](https://github.com/king04aman) + - [Luis Zubia](https://github.com/luigirazum) + - [KasRoudra](https://github.com/KasRoudra) + - [Md: Ij](https://github.com/Md-Ij) + - [Sanajit Jana](https://github.com/sanajitjana) + - [ABU SAID](https://github.com/said7388) + - [Darin Joshua D](https://github.com/DarinJoshua-dev) + - [Aaquib Ali](https://github.com/imaaquibali) + - [Harsh Jobanputra](https://github.com/harsh2201) + - [Adil Akhmetov](https://github.com/weeebdev) + - [Ben](https://github.com/bgonzales17) + - [Mahmudul Hassan](https://github.com/ProMahmudul) + - [Avinash Kumar](https://github.com/rock12231) + - [Aman Kumar Dewangan](https://github.com/amandewatnitrr) + - [Ismail Changezi](https://github.com/IsmailChangezi) + - [Marcos Vas](https://github.com/marcos-inja) + - [Deepak Bhatt](https://github.com/deathook007) + - [Noman iqbal](https://github.com/thenomaniqbal) + - [edapess](https://github.com/edapess) + - [Gökhan Ayrancıoğlu](https://github.com/G-khan) ++ update components content + - [Buy Me a Coffee](https://www.buymeacoffee.com) + # 1.2.0 (2023-11-13) ### Feat diff --git a/README.md b/README.md index 5085677..b88f97b 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,75 @@ Link: [https://bubble-awesome-profile.vercel.app/](https://bubble-awesome-profil Profiles ++ [Amrit Anand](https://github.com/aamrits) ++ [Iván Alonso](https://github.com/neverbot) ++ [tortorootoeot](https://github.com/totoroterror) ++ [®️BYLICKILABS™️](https://github.com/bylickilabs) ++ [Ariba Memon](https://github.com/Ariba-memon) ++ [Maksym Vovk](https://github.com/MaksimVovk) ++ [vito.mohagheghian](https://github.com/vito-mohagheghian) ++ [Ahmed Adebayo](https://github.com/Huangdi-599) ++ [Aditya Dharmawan Saputra](https://github.com/adityadees) ++ [Vikrant Bhat](https://github.com/bhatvikrant) ++ [Filimonov Alexey](https://github.com/FilimonovAlexey) ++ [Anser Waseem](https://github.com/anserwaseem) ++ [Ryota](https://github.com/RyotaOku) ++ [Lucifer_Bhiya](https://github.com/Lucifer-00007) ++ [Jiganesh Patil](https://github.com/Jiganesh) ++ [Rachit Pal](https://github.com/Rachit-Pal) ++ [James Mbugua](https://github.com/AwesomeJim) ++ [Fabian Herrera Martinez](https://github.com/FabianHMzz) ++ [Yoshiyuki Hisamatsu](https://github.com/hisasann) ++ [Kera Cudmore](https://github.com/kera-cudmore) ++ [Imani "K!ΠG" Niyigena](https://github.com/ImaniAN) ++ [Gustavo Santana](https://github.com/Gustavosta) ++ [Anuj trivedi](https://github.com/aasn0119) ++ [Arlettebrook](https://github.com/Arlettebrook) ++ [ngdream](https://github.com/ngdream) ++ [Ismael Miah](https://github.com/ismaelmiah) ++ [mat-0](https://github.com/mat-0) ++ [Amrit Raj](https://github.com/amritmaurya1504) ++ [Mushlih Almubarak](https://github.com/mushlih-almubarak) ++ [Shreyas Chavhan](https://github.com/shreyaschavhan) ++ [Senior Software Engineer](https://github.com/Big-Silver) ++ [二丫讲梵](https://github.com/eryajf) ++ [Adam Kostarelas](https://github.com/AdamXweb) ++ [Shaan Khan](https://github.com/ShaanCoding) ++ [UltraLion](https://github.com/UltraLionfr) ++ [Lucas](https://github.com/Somfic) ++ [Yogesh Yadav](https://github.com/yogeshdecodes) ++ [Hein Thant](https://github.com/IndieCoderMM) ++ [Anmol Baranwal](https://github.com/Anmol-Baranwal) ++ [Vishwa Gaurav](https://github.com/VishwaGauravIn) ++ [frozendark](https://github.com/frozendark01) ++ [Henry](https://github.com/henryhkb) ++ [Bruno Brito](https://github.com/brunobritodev) ++ [Zetao Zhuang](https://github.com/zzetao) ++ [Fiel Mangginimba](https://github.com/fiellogramontemangginimba) ++ [Hemant Joshi](https://github.com/mayhemantt) ++ [「 Rajkumar™ 」](https://github.com/Awesome-RJ) ++ [Jack Halloween](https://github.com/jackhallloween21) ++ [Martín Couso](https://github.com/martinCouso) ++ [Aman](https://github.com/king04aman) ++ [Luis Zubia](https://github.com/luigirazum) ++ [KasRoudra](https://github.com/KasRoudra) ++ [Md: Ij](https://github.com/Md-Ij) ++ [Sanajit Jana](https://github.com/sanajitjana) ++ [ABU SAID](https://github.com/said7388) ++ [Darin Joshua D](https://github.com/DarinJoshua-dev) ++ [Aaquib Ali](https://github.com/imaaquibali) ++ [Harsh Jobanputra](https://github.com/harsh2201) ++ [Adil Akhmetov](https://github.com/weeebdev) ++ [Ben](https://github.com/bgonzales17) ++ [Mahmudul Hassan](https://github.com/ProMahmudul) ++ [Avinash Kumar](https://github.com/rock12231) ++ [Aman Kumar Dewangan](https://github.com/amandewatnitrr) ++ [Ismail Changezi](https://github.com/IsmailChangezi) ++ [Marcos Vas](https://github.com/marcos-inja) ++ [Deepak Bhatt](https://github.com/deathook007) ++ [Noman iqbal](https://github.com/thenomaniqbal) ++ [edapess](https://github.com/edapess) ++ [Gökhan Ayrancıoğlu](https://github.com/G-khan) + [Wyatt Walsh](https://github.com/wyattowalsh) + [Peter Strick](https://github.com/PeterStrick) + [trinib](https://github.com/trinib) diff --git a/README.zh.md b/README.zh.md index 9e2e548..cd59c69 100644 --- a/README.zh.md +++ b/README.zh.md @@ -70,6 +70,75 @@ Link: [https://bubble-awesome-profile.vercel.app/](https://bubble-awesome-profil Profiles ++ [Amrit Anand](https://github.com/aamrits) ++ [Iván Alonso](https://github.com/neverbot) ++ [tortorootoeot](https://github.com/totoroterror) ++ [®️BYLICKILABS™️](https://github.com/bylickilabs) ++ [Ariba Memon](https://github.com/Ariba-memon) ++ [Maksym Vovk](https://github.com/MaksimVovk) ++ [vito.mohagheghian](https://github.com/vito-mohagheghian) ++ [Ahmed Adebayo](https://github.com/Huangdi-599) ++ [Aditya Dharmawan Saputra](https://github.com/adityadees) ++ [Vikrant Bhat](https://github.com/bhatvikrant) ++ [Filimonov Alexey](https://github.com/FilimonovAlexey) ++ [Anser Waseem](https://github.com/anserwaseem) ++ [Ryota](https://github.com/RyotaOku) ++ [Lucifer_Bhiya](https://github.com/Lucifer-00007) ++ [Jiganesh Patil](https://github.com/Jiganesh) ++ [Rachit Pal](https://github.com/Rachit-Pal) ++ [James Mbugua](https://github.com/AwesomeJim) ++ [Fabian Herrera Martinez](https://github.com/FabianHMzz) ++ [Yoshiyuki Hisamatsu](https://github.com/hisasann) ++ [Kera Cudmore](https://github.com/kera-cudmore) ++ [Imani "K!ΠG" Niyigena](https://github.com/ImaniAN) ++ [Gustavo Santana](https://github.com/Gustavosta) ++ [Anuj trivedi](https://github.com/aasn0119) ++ [Arlettebrook](https://github.com/Arlettebrook) ++ [ngdream](https://github.com/ngdream) ++ [Ismael Miah](https://github.com/ismaelmiah) ++ [mat-0](https://github.com/mat-0) ++ [Amrit Raj](https://github.com/amritmaurya1504) ++ [Mushlih Almubarak](https://github.com/mushlih-almubarak) ++ [Shreyas Chavhan](https://github.com/shreyaschavhan) ++ [Senior Software Engineer](https://github.com/Big-Silver) ++ [二丫讲梵](https://github.com/eryajf) ++ [Adam Kostarelas](https://github.com/AdamXweb) ++ [Shaan Khan](https://github.com/ShaanCoding) ++ [UltraLion](https://github.com/UltraLionfr) ++ [Lucas](https://github.com/Somfic) ++ [Yogesh Yadav](https://github.com/yogeshdecodes) ++ [Hein Thant](https://github.com/IndieCoderMM) ++ [Anmol Baranwal](https://github.com/Anmol-Baranwal) ++ [Vishwa Gaurav](https://github.com/VishwaGauravIn) ++ [frozendark](https://github.com/frozendark01) ++ [Henry](https://github.com/henryhkb) ++ [Bruno Brito](https://github.com/brunobritodev) ++ [Zetao Zhuang](https://github.com/zzetao) ++ [Fiel Mangginimba](https://github.com/fiellogramontemangginimba) ++ [Hemant Joshi](https://github.com/mayhemantt) ++ [「 Rajkumar™ 」](https://github.com/Awesome-RJ) ++ [Jack Halloween](https://github.com/jackhallloween21) ++ [Martín Couso](https://github.com/martinCouso) ++ [Aman](https://github.com/king04aman) ++ [Luis Zubia](https://github.com/luigirazum) ++ [KasRoudra](https://github.com/KasRoudra) ++ [Md: Ij](https://github.com/Md-Ij) ++ [Sanajit Jana](https://github.com/sanajitjana) ++ [ABU SAID](https://github.com/said7388) ++ [Darin Joshua D](https://github.com/DarinJoshua-dev) ++ [Aaquib Ali](https://github.com/imaaquibali) ++ [Harsh Jobanputra](https://github.com/harsh2201) ++ [Adil Akhmetov](https://github.com/weeebdev) ++ [Ben](https://github.com/bgonzales17) ++ [Mahmudul Hassan](https://github.com/ProMahmudul) ++ [Avinash Kumar](https://github.com/rock12231) ++ [Aman Kumar Dewangan](https://github.com/amandewatnitrr) ++ [Ismail Changezi](https://github.com/IsmailChangezi) ++ [Marcos Vas](https://github.com/marcos-inja) ++ [Deepak Bhatt](https://github.com/deathook007) ++ [Noman iqbal](https://github.com/thenomaniqbal) ++ [edapess](https://github.com/edapess) ++ [Gökhan Ayrancıoğlu](https://github.com/G-khan) + [Wyatt Walsh](https://github.com/wyattowalsh) + [Peter Strick](https://github.com/PeterStrick) + [trinib](https://github.com/trinib) diff --git a/src/app/page.tsx b/src/app/page.tsx index 74c8007..b206669 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -8,6 +8,7 @@ import ComponentList from '@/components/componentList'; import TopJumper from '@/components/topJumper'; import Tabs from '@/components/tabs'; import ProfileList from '@/components/profileList'; +import Pagination from '@/components/pagination'; import { useList } from '@/context/list'; import { tabTitles } from '@/common/config'; @@ -29,7 +30,10 @@ const Home = () => { ) : ( - + <> + + + )} diff --git a/src/common/components.ts b/src/common/components.ts index 723ab80..9112172 100644 --- a/src/common/components.ts +++ b/src/common/components.ts @@ -36,6 +36,18 @@ export const Categories = { }; export const ComponentCardList: Array = [ + { + name: 'Buy Me a Coffee', + previewImage: + 'https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png', + github: 'https://www.buymeacoffee.com', + example: ` + + + + `, + category: [Categories.OnlyImage] + }, { name: 'Steam Card', previewImage: diff --git a/src/common/locales/en/descripts.ts b/src/common/locales/en/descripts.ts index 5b5d8ce..c9cad51 100644 --- a/src/common/locales/en/descripts.ts +++ b/src/common/locales/en/descripts.ts @@ -151,5 +151,9 @@ export const descripts: Record = { '1. Generate Your Steam Profile Card Quickly', '2. Multiple themes and multiple language configurations are built in, with support for more than 10 customizations. Preview available at https://card.yuy1n.io/.', '3. Support deploy it with Vercel, Netlify, Railway or Docker.' + ], + 'Buy Me a Coffee': [ + '1. If you are looking for some micro-sponsorship to motivate your open source project to go further, "Buy Me a Coffee" is a great option.', + '2. Simply register at https://www.buymeacoffee.com and embed this image and your link to the location you wish to display it.' ] }; diff --git a/src/common/locales/zh/descripts.ts b/src/common/locales/zh/descripts.ts index 052cd0a..32ed288 100644 --- a/src/common/locales/zh/descripts.ts +++ b/src/common/locales/zh/descripts.ts @@ -142,5 +142,9 @@ export const descripts: Record = { '1. 生成你的 Steam 资料卡片。', '2. 内置多种主题和多种语言配置,支持超过10项的个性化设置,并可通过 https://card.yuy1n.io/ 进行预览。', '3. 支持以Vercel、Netlify、Railway或 Docker 方式进行部署。' + ], + 'Buy Me a Coffee': [ + '1. 如果你希望获得一些小额赞助,以激励你的开源项目更进一步,Buy Me a Coffee 是一个不错的选择。', + '2. 只需在 https://www.buymeacoffee.com 注册,然后将这张图片和你的链接嵌入到你希望展示的位置即可。' ] }; diff --git a/src/common/profiles.ts b/src/common/profiles.ts index db96afa..42df761 100644 --- a/src/common/profiles.ts +++ b/src/common/profiles.ts @@ -2,11 +2,487 @@ import { IProfileCard } from '@/types/config'; export const ProfileCardList: IProfileCard[] = [ { - name: 'Wyatt Walsh', - snapshootTime: '2023/11/13 22:00', + name: 'Amrit Anand', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/81.jpg', + githubUrl: 'https://github.com/aamrits' + }, + { + name: 'Iván Alonso', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/82.jpg', + githubUrl: 'https://github.com/neverbot' + }, + { + name: 'tortorootoeot', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/83.jpg', + githubUrl: 'https://github.com/totoroterror' + }, + { + name: '®️BYLICKILABS™️', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/84.jpg', + githubUrl: 'https://github.com/bylickilabs' + }, + { + name: 'Ariba Memon', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/85.jpg', + githubUrl: 'https://github.com/Ariba-memon' + }, + { + name: 'Maksym Vovk', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/86.jpg', + githubUrl: 'https://github.com/MaksimVovk' + }, + { + name: 'vito.mohagheghian', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/87.jpg', + githubUrl: 'https://github.com/vito-mohagheghian' + }, + { + name: 'Ahmed Adebayo', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/88.jpg', + githubUrl: 'https://github.com/Huangdi-599' + }, + { + name: 'Aditya Dharmawan Saputra', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/89.jpg', + githubUrl: 'https://github.com/adityadees' + }, + { + name: 'Vikrant Bhat', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/90.jpg', + githubUrl: 'https://github.com/bhatvikrant' + }, + { + name: 'Filimonov Alexey', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/91.jpg', + githubUrl: 'https://github.com/FilimonovAlexey' + }, + { + name: 'Anser Waseem', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/92.jpg', + githubUrl: 'https://github.com/anserwaseem' + }, + { + name: 'Ryota', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/93.jpg', + githubUrl: 'https://github.com/RyotaOku' + }, + { + name: 'Lucifer_Bhiya', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/94.jpg', + githubUrl: 'https://github.com/Lucifer-00007' + }, + { + name: 'Jiganesh Patil', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/95.jpg', + githubUrl: 'https://github.com/Jiganesh' + }, + { + name: 'Rachit Pal', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/96.jpg', + githubUrl: 'https://github.com/Rachit-Pal' + }, + { + name: 'James Mbugua', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/97.jpg', + githubUrl: 'https://github.com/AwesomeJim' + }, + { + name: 'Fabian Herrera Martinez', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/98.jpg', + githubUrl: 'https://github.com/FabianHMzz' + }, + { + name: 'Yoshiyuki Hisamatsu', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/99.jpg', + githubUrl: 'https://github.com/hisasann' + }, + { + name: 'Kera Cudmore', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/100.jpg', + githubUrl: 'https://github.com/kera-cudmore' + }, + { + name: 'Imani "K!ΠG" Niyigena', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/101.jpg', + githubUrl: 'https://github.com/ImaniAN' + }, + { + name: 'Gustavo Santana', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/102.jpg', + githubUrl: 'https://github.com/Gustavosta' + }, + { + name: 'Anuj trivedi', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/103.jpg', + githubUrl: 'https://github.com/aasn0119' + }, + { + name: 'Arlettebrook', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/104.jpg', + githubUrl: 'https://github.com/Arlettebrook' + }, + { + name: 'ngdream', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/105.jpg', + githubUrl: 'https://github.com/ngdream' + }, + { + name: 'Ismael Miah', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/106.jpg', + githubUrl: 'https://github.com/ismaelmiah' + }, + { + name: 'mat-0', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/107.jpg', + githubUrl: 'https://github.com/mat-0' + }, + { + name: 'Amrit Raj', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/108.jpg', + githubUrl: 'https://github.com/amritmaurya1504' + }, + { + name: 'Mushlih Almubarak', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/109.jpg', + githubUrl: 'https://github.com/mushlih-almubarak' + }, + { + name: 'Shreyas Chavhan', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/110.jpg', + githubUrl: 'https://github.com/shreyaschavhan' + }, + { + name: 'Senior Software Engineer', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/111.jpg', + githubUrl: 'https://github.com/Big-Silver' + }, + { + name: '二丫讲梵', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/112.jpg', + githubUrl: 'https://github.com/eryajf' + }, + { + name: 'Adam Kostarelas', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/113.jpg', + githubUrl: 'https://github.com/AdamXweb' + }, + { + name: 'Shaan Khan', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/114.jpg', + githubUrl: 'https://github.com/ShaanCoding' + }, + { + name: 'UltraLion', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/115.jpg', + githubUrl: 'https://github.com/UltraLionfr' + }, + { + name: 'Lucas', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/116.jpg', + githubUrl: 'https://github.com/Somfic' + }, + { + name: 'Yogesh Yadav', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/117.jpg', + githubUrl: 'https://github.com/yogeshdecodes' + }, + { + name: 'Hein Thant', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/118.jpg', + githubUrl: 'https://github.com/IndieCoderMM' + }, + { + name: 'Anmol Baranwal', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/119.jpg', + githubUrl: 'https://github.com/Anmol-Baranwal' + }, + { + name: 'Vishwa Gaurav', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/120.jpg', + githubUrl: 'https://github.com/VishwaGauravIn' + }, + { + name: 'frozendark', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/121.jpg', + githubUrl: 'https://github.com/frozendark01' + }, + { + name: 'Henry', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/122.jpg', + githubUrl: 'https://github.com/henryhkb' + }, + { + name: 'Bruno Brito', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/123.jpg', + githubUrl: 'https://github.com/brunobritodev' + }, + { + name: 'Zetao Zhuang', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/124.jpg', + githubUrl: 'https://github.com/zzetao' + }, + { + name: 'Fiel Mangginimba', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/125.jpg', + githubUrl: 'https://github.com/fiellogramontemangginimba' + }, + { + name: 'Hemant Joshi', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/126.jpg', + githubUrl: 'https://github.com/mayhemantt' + }, + { + name: '「 Rajkumar™ 」', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/127.jpg', + githubUrl: 'https://github.com/Awesome-RJ' + }, + { + name: 'Jack Halloween', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/128.jpg', + githubUrl: 'https://github.com/jackhallloween21' + }, + { + name: 'Martín Couso', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/129.jpg', + githubUrl: 'https://github.com/martinCouso' + }, + { + name: 'Aman', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/130.jpg', + githubUrl: 'https://github.com/king04aman' + }, + { + name: 'Luis Zubia', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/131.jpg', + githubUrl: 'https://github.com/luigirazum' + }, + { + name: 'KasRoudra', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/132.jpg', + githubUrl: 'https://github.com/KasRoudra' + }, + { + name: 'Md: Ij', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/133.jpg', + githubUrl: 'https://github.com/Md-Ij' + }, + { + name: 'Sanajit Jana', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/134.jpg', + githubUrl: 'https://github.com/sanajitjana' + }, + { + name: 'ABU SAID', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/135.jpg', + githubUrl: 'https://github.com/said7388' + }, + { + name: 'Darin Joshua D', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/136.jpg', + githubUrl: 'https://github.com/DarinJoshua-dev' + }, + { + name: 'Aaquib Ali', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/137.jpg', + githubUrl: 'https://github.com/imaaquibali' + }, + { + name: 'Harsh Jobanputra', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/138.jpg', + githubUrl: 'https://github.com/harsh2201' + }, + { + name: 'Adil Akhmetov', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/139.jpg', + githubUrl: 'https://github.com/weeebdev' + }, + { + name: 'Ben', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/140.jpg', + githubUrl: 'https://github.com/bgonzales17' + }, + { + name: 'Mahmudul Hassan', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/141.jpg', + githubUrl: 'https://github.com/ProMahmudul' + }, + { + name: 'Avinash Kumar', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/142.jpg', + githubUrl: 'https://github.com/rock12231' + }, + { + name: 'Aman Kumar Dewangan', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/143.jpg', + githubUrl: 'https://github.com/amandewatnitrr' + }, + { + name: 'Ismail Changezi', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/144.jpg', + githubUrl: 'https://github.com/IsmailChangezi' + }, + { + name: 'Marcos Vas', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/145.jpg', + githubUrl: 'https://github.com/marcos-inja' + }, + { + name: 'Deepak Bhatt', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/146.jpg', + githubUrl: 'https://github.com/deathook007' + }, + { + name: 'Noman iqbal', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/147.jpg', + githubUrl: 'https://github.com/thenomaniqbal' + }, + { + name: 'edapess', + snapshootTime: '2023/11/14 22:00', + imageUrl: + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/148.jpg', + githubUrl: 'https://github.com/edapess' + }, + { + name: 'Gökhan Ayrancıoğlu', + snapshootTime: '2023/11/14 22:00', imageUrl: - 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/62.jpg', - githubUrl: 'https://github.com/wyattowalsh' + 'https://raw.githubusercontent.com/LHRUN/file-store/main/bubble/149.jpg', + githubUrl: 'https://github.com/G-khan' }, { name: 'Peter Strick', diff --git a/src/components/pagination/index.module.scss b/src/components/pagination/index.module.scss new file mode 100644 index 0000000..8a31cd5 --- /dev/null +++ b/src/components/pagination/index.module.scss @@ -0,0 +1,32 @@ +.container { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: center; + margin-bottom: 50px; + + .item { + display: flex; + align-items: center; + justify-content: center; + width: 58px; + height: 50px; + font-size: 24px; + cursor: pointer; + background-color: #5C8374; + border: solid 4px #183D3D; + border-radius: 12px; + + &:not(:first-child) { + margin-left: 10px; + } + + &:hover { + border-color: $tertiary-color; + } + + &.activity { + border-color: $tertiary-color; + } + } +} diff --git a/src/components/pagination/index.tsx b/src/components/pagination/index.tsx new file mode 100644 index 0000000..aa3a16c --- /dev/null +++ b/src/components/pagination/index.tsx @@ -0,0 +1,46 @@ +import classNames from 'classnames'; +import { ProfileCardList } from '@/common/profiles'; +import { ACTION_TYPE } from '@/context/list/reducer'; +import { useList } from '@/context/list'; +import styles from './index.module.scss'; +import { LobsterFont } from '@/common/font'; + +const list = Array.from( + { length: Math.ceil(ProfileCardList.length / 20) }, + (_, index) => index + 1 +); + +const Pagination = () => { + const { data, dispatch } = useList(); + const clickPage = (index: number) => { + const tabs = document.querySelector(`#tabs`) as HTMLDivElement; + window.scrollTo({ + top: tabs?.offsetTop ? tabs?.offsetTop - 30 : 0, + behavior: 'smooth' + }); + dispatch({ + type: ACTION_TYPE.CHANGE_PAGE, + payload: index + }); + }; + + return ( +
+ {list.map((item, index) => ( +
clickPage(index)} + > + {item} +
+ ))} +
+ ); +}; + +export default Pagination; diff --git a/src/components/profileCard/index.tsx b/src/components/profileCard/index.tsx index 31c0812..4b19e2e 100644 --- a/src/components/profileCard/index.tsx +++ b/src/components/profileCard/index.tsx @@ -18,15 +18,16 @@ const ProfileCard: FC = ({ data }) => { useEffect(() => { const imageContainerHeight = imageContainerRef?.current?.offsetHeight; - if ( - imageContainerHeight && - imageHeight && - imageHeight > imageContainerHeight - ) { + if (imageContainerHeight && imageHeight) { const translateY = imageHeight - imageContainerHeight; - setAniTranslateY(translateY); + setAniTranslateY(translateY >= 0 ? translateY : 0); } - }, [aniTranslateY, imageContainerRef?.current?.offsetHeight, imageHeight]); + }, [ + aniTranslateY, + imageContainerRef?.current?.offsetHeight, + imageHeight, + data.imageUrl + ]); return ( { + const { data } = useList(); + const list = useMemo( + () => + ProfileCardList.slice( + data.currentPage * pageSize, + (data.currentPage + 1) * pageSize + ), + [data.currentPage] + ); + return ( -
- {ProfileCardList.map((item, index) => ( - - ))} -
+ <> +
+ {list.map((item, index) => ( + + ))} +
+ ); }; diff --git a/src/components/tabs/index.tsx b/src/components/tabs/index.tsx index e6d8264..937760d 100644 --- a/src/components/tabs/index.tsx +++ b/src/components/tabs/index.tsx @@ -18,7 +18,7 @@ const Tabs = () => { }; return ( -
+
{tabOptions.map((item, index) => (
{ return newState; }; +/** + * change page + */ +export const changePage = (oldState: ListState, currentPage: number) => { + const newState = { + ...oldState, + currentPage + }; + storage.set(CURRENT_PAGE_KEY, currentPage); + return newState; +}; + /** * get localStorage data */ @@ -108,12 +121,14 @@ export const initStorage = (oldState: ListState) => { const categoryActivityStorage = storage.get(CATEGORY_ACTIVITY_STORAGE_KEY) || Categories.All; const currentTabStorage = storage.get(CURRENT_TAB_KEY) || tabOptions[0].title; + const currentPageStorage = storage.get(CURRENT_PAGE_KEY) || 0; const newState = { ...oldState, categoryActivity: categoryActivityStorage, likes: likesStorage, language: languageStorage, - currentTab: currentTabStorage.toLowerCase() + currentTab: currentTabStorage.toLowerCase(), + currentPage: currentPageStorage }; return newState; }; diff --git a/src/context/list/index.tsx b/src/context/list/index.tsx index 593a1d9..78b0f4f 100644 --- a/src/context/list/index.tsx +++ b/src/context/list/index.tsx @@ -32,7 +32,8 @@ export const ListProvider: FC<{ children: ReactNode }> = ({ children }) => { currentData: null, likes: [], language: 'en', - currentTab: tabOptions[0].title + currentTab: tabOptions[0].title, + currentPage: 0 }); useEffect(() => { diff --git a/src/context/list/reducer.ts b/src/context/list/reducer.ts index 49f43d9..b421ea5 100644 --- a/src/context/list/reducer.ts +++ b/src/context/list/reducer.ts @@ -6,7 +6,8 @@ import { updateLikes, changeLanguage, changeTabs, - initStorage + initStorage, + changePage } from './actions'; export interface ListState { @@ -16,6 +17,7 @@ export interface ListState { likes: string[]; language: string; currentTab: string; + currentPage: number; } export interface ListAction { @@ -33,7 +35,8 @@ export const ACTION_TYPE = { HIDE_MODAL: 'hidenModal', UPDATE_LIKES: 'updateLikes', CHANGE_LANGUAGE: 'changeLanguage', - CHANGE_TAB: 'changeTab' + CHANGE_TAB: 'changeTab', + CHANGE_PAGE: 'changePage' }; export const listReducer: ListReducer = (state, action) => { @@ -52,6 +55,8 @@ export const listReducer: ListReducer = (state, action) => { return changeTabs(state, action.payload); case ACTION_TYPE.INIT_STORAGE: return initStorage(state); + case ACTION_TYPE.CHANGE_PAGE: + return changePage(state, action.payload); default: return state; } diff --git a/src/utils/storage.ts b/src/utils/storage.ts index da2975b..246d5ba 100644 --- a/src/utils/storage.ts +++ b/src/utils/storage.ts @@ -4,6 +4,7 @@ export const CATEGORY_ACTIVITY_STORAGE_KEY = 'CATEGORY_ACTIVITY'; export const LIKES_STORAGE_KEY = 'LIKES'; export const LANGUAGE_KEY = 'LANGUAGE'; export const CURRENT_TAB_KEY = 'CURRENT_TAB'; +export const CURRENT_PAGE_KEY = 'CURRENT_PAGE'; /** * localStorage