Merge pull request #1 from ifraimka1/feature/carousel

Feature/carousel
This commit is contained in:
Ifraim Solomonov authored and GitHub committed 2024-02-20 14:44:45 +03:00
commit ff52275e6e
9 files changed
+98 -8

No files matched your search

+21
View File
@@ -17,6 +17,7 @@
"react-scripts": "5.0.1", "react-scripts": "5.0.1",
"reactpress": "^1.0.0", "reactpress": "^1.0.0",
"sass": "^1.70.0", "sass": "^1.70.0",
"scroll-carousel-react": "^1.0.0",
"web-vitals": "^2.1.4", "web-vitals": "^2.1.4",
"wpapi": "^1.2.2" "wpapi": "^1.2.2"
} }
@@ -15720,6 +15721,26 @@
"url": "https://opencollective.com/webpack" "url": "https://opencollective.com/webpack"
} }
}, },
"node_modules/scroll-carousel": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/scroll-carousel/-/scroll-carousel-1.2.7.tgz",
"integrity": "sha512-tiXdee3QJgyaUXVA5cW4s1qUNdpPG3jGFsoJ1Jc2kDS4X8ipIvwkPwgZSF9SYszCvF9BRxGduJDQunMWBzavdw=="
},
"node_modules/scroll-carousel-react": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/scroll-carousel-react/-/scroll-carousel-react-1.0.0.tgz",
"integrity": "sha512-qx3YibxHxeHgtGn/RosDIDg9US1XZVvdPUnDA6DqXhyBRRxd0Dcmz8MbKBJOGcHS9TuHb0OuRGz4VvN6MUDxog==",
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"scroll-carousel": "^1.2.7"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"scroll-carousel": "^1.2.7"
}
},
"node_modules/select-hose": { "node_modules/select-hose": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
+1
View File
@@ -12,6 +12,7 @@
"react-scripts": "5.0.1", "react-scripts": "5.0.1",
"reactpress": "^1.0.0", "reactpress": "^1.0.0",
"sass": "^1.70.0", "sass": "^1.70.0",
"scroll-carousel-react": "^1.0.0",
"web-vitals": "^2.1.4", "web-vitals": "^2.1.4",
"wpapi": "^1.2.2" "wpapi": "^1.2.2"
}, },
+2
View File
@@ -0,0 +1,2 @@
export { default as petronas } from './petronas.jpeg';
export { default as porsche } from './porsche.svg';
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 565 38.8"><title>Porsche logotype logo</title><path d="M727.56,499.89v8.5H794.5v7.25H727.56v8.5H794.5v7.22H719v-38.7H794.5v7.22Zm-27.09,8.44H648.75V492.6h-8.5v38.69h8.5V516.85h51.72v14.45H709V492.6h-8.5ZM560.14,501.2v21.6a8.54,8.54,0,0,0,8.49,8.6h0l61.65-.06v-8.5h-60.5a1.14,1.14,0,0,1-1.11-1V502.36a1.37,1.37,0,0,1,1.39-1.2h60.22v-8.5H568.77a8.6,8.6,0,0,0-8.64,8.55Zm-18.74,7.17-54.31,0h0a1.35,1.35,0,0,1-1.43-1.27s0,0,0-.07v-5.8a1.37,1.37,0,0,1,1.37-1.37h61.69v-7.23h-63.2a8.5,8.5,0,0,0-8.4,8.59v5.8a8.6,8.6,0,0,0,8.6,8.6h0l54.31,0a1.37,1.37,0,0,1,1.43,1.32v0h0v5.82a1.35,1.35,0,0,1-1.36,1.34H478.28v7.22H541.4A8.58,8.58,0,0,0,550,522.8h0V517a8.63,8.63,0,0,0-8.6-8.6Zm-74.12,22.78v.1h-8.56v-1.52a8.6,8.6,0,0,0-8.6-8.6H402.69v10.18h-8.5V492.63h64.45a8.54,8.54,0,0,1,8.55,8.53h0v8.39a8.54,8.54,0,0,1-8.23,8.59,14.32,14.32,0,0,1,8.31,13Zm-8.61-28.52a1.48,1.48,0,0,0-1.45-1.47l-54.52,0v11.48h54.68a1.39,1.39,0,0,0,1.29-1.42h0Zm-74.74-1.45v21.6h0a8.52,8.52,0,0,1-8.47,8.56h-54.5a8.58,8.58,0,0,1-8.64-8.52V501.21a8.6,8.6,0,0,1,8.64-8.56h54.56A8.5,8.5,0,0,1,383.92,501.18Zm-8.48,1.45a1.51,1.51,0,0,0-1.49-1.46H322.26a1.37,1.37,0,0,0-1.39,1.2V521.8a1.14,1.14,0,0,0,1.11,1h52.09a1.45,1.45,0,0,0,1.37-1.42Zm-73.12-1.45v11.41a8.54,8.54,0,0,1-8.53,8.55H238v10.19h-8.5V492.64h64.23a8.54,8.54,0,0,1,8.59,8.5v0Zm-8.52,1.46a1.48,1.48,0,0,0-1.45-1.47l-54.33,0v11.48h54.5a1.37,1.37,0,0,0,1.29-1.42Z" transform="translate(-229.5 -492.6)"/></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@@ -1,12 +1,44 @@
import BlockHeading from '../BlockHeading'; import ScrollCarousel from 'scroll-carousel-react';
function Partners() { import BlockHeading from '../BlockHeading';
import PartnersLogo from './PartnersLogo';
import './Partners.styles.scss';
import { scb } from '../../../../images';
import { porsche } from '../../../../images/partners';
import { SCOPABLE_TYPES } from '@babel/types';
const mock = [
{
image: porsche,
},
{
image: scb,
},
{
image: porsche,
},
{
image: scb,
},
{
image: porsche,
},
{
image: scb,
},
];
function Partners({ partners = mock }) {
return ( return (
<div className="block partners"> <div className="block partners">
<BlockHeading heading="Наши партнеры" /> <BlockHeading heading="Наши партнеры" />
<div className="row"> <ScrollCarousel
autoplay
</div> autoplaySpeed={6}
speed={1}
>
{ partners.map(item => <PartnersLogo partner={ item } />) }
</ScrollCarousel>
</div> </div>
); );
} }
@@ -0,0 +1,26 @@
#page .content .partners {
margin-left: 0;
margin-right: 0;
.heading {
margin-left: 10%;
margin-right: 10%;
}
.scroll-carousel-viewport {
.partner {
height: 256px;
aspect-ratio: 1;
border-radius: 100%;
background: #D9D9D9;
.logo {
width: 100%;
height: 100%;
border-radius: 100%;
object-fit: contain;
}
}
}
}
@@ -0,0 +1,9 @@
function PartnersLogo({ partner }) {
return (
<div className="partner">
<img src={ partner.image } alt="" className="logo" />
</div>
);
}
export default PartnersLogo;
+1 -3
View File
@@ -37,12 +37,10 @@ $btn-dark: #585858;
} }
.content { .content {
width: 80%;
margin: 0 auto;
background: $secondary-bg; background: $secondary-bg;
.block { .block {
margin-bottom: 32px; margin: 0 10% 32px;
h1 { h1 {
font-family: Montserrat; font-family: Montserrat;