Skip to content

Commit

Permalink
Merge pull request #13 from Quolls/feat/multi-imgs-2
Browse files Browse the repository at this point in the history
feat(Image&Location): swiper, auto update location
  • Loading branch information
IlIIIIIIlI authored Apr 10, 2024
2 parents eb62445 + c6472ab commit 967b852
Show file tree
Hide file tree
Showing 5 changed files with 294 additions and 16 deletions.
190 changes: 179 additions & 11 deletions frontend/package-lock.json

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

7 changes: 6 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@
"@radix-ui/react-toast": "^1.1.5",
"@tanstack/react-query": "^4.36.1",
"@tanstack/react-query-devtools": "^4.35.7",
"@types/swiper": "^6.0.0",
"appwrite": "^13.0.0",
"attr-accept": "^2.2.2",
"axios": "^1.6.8",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"date-fns": "^3.6.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-tailwindcss": "^3.13.0",
"gsap": "^3.12.5",
"lucide-react": "^0.105.0-alpha.4",
"next-auth": "^4.24.7",
"prettier": "^3.0.3",
Expand All @@ -39,13 +42,15 @@
"react-slick": "^0.30.2",
"slick-carousel": "^1.8.1",
"solidjs-dropzone": "^1.0.0",
"styled-components": "^6.1.8",
"swiper": "^11.1.0",
"tailwind-merge": "^1.14.0",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/node": "^20.8.0",
"@types/react": "^18.2.15",
"@types/react": "^18.2.74",
"@types/react-dom": "^18.2.7",
"@types/react-slick": "^0.23.13",
"@typescript-eslint/eslint-plugin": "^6.0.0",
Expand Down
38 changes: 38 additions & 0 deletions frontend/src/components/StorySwiper/StorySwiper.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* .swiper {
width: 30%;
height: 30%;
} */

.swiper-slide {
text-align: center;
font-size: 18px;
background: #fff;

/* Center slide text vertically */
display: flex;
justify-content: center;
align-items: center;
}

.swiper-slide img {
display: block;
object-fit: cover;
}

.mySwiper {
width: 500px !important; /* 或者任何具体的宽度值 */
height: 500px !important; /* 根据你的需求调整高度 */
}

.mySwiper img {
width: 100%; /* 图片宽度占满容器 */
height: 100%; /* 图片高度占满容器 */
object-fit: cover; /* 保持宽高比,可能会裁剪图片 */
}

@media (max-width: 600px) {
.mySwiper {
width: 350px !important;
height: 200px !important; /* 在小屏幕上减小高度 */
}
}
Loading

0 comments on commit 967b852

Please sign in to comment.