Comments (2)
The ProjectCard
component is very simple:
import Link from 'next/link';
import { Button } from '@components/buttons';
import { OptimizedImage } from '@components/images/OptimizedImage';
import { SpriteCategories } from '@enums';
import type { BasePageWithImageSelectionType } from '@shared/types/selections/Common';
import { cn } from '@utils/cn';
type Props = BasePageWithImageSelectionType & {
className?: string;
};
export const ProjectCard = ({ className = '', headline, image, slug, title, ...props }: Props) => (
<Link
passHref
className={cn('group', className)}
data-aos="fade-up"
href={`/projects/${slug}`}
{...props}
>
<article className="relative isolate h-full min-h-[400px] w-full overflow-hidden rounded-lg shadow-sm lg:h-80">
<OptimizedImage
fill
alt={title}
className="-z-10 object-cover object-center transition-all duration-500 ease-in-out group-hover:scale-125"
image={image}
/>
<div className="absolute inset-0 -z-10 bg-gradient-to-b from-transparent to-zinc-900" />
<div className="mt-auto flex h-full flex-col justify-end px-4 py-6 text-zinc-200">
<h3 className="mb-1 text-lg font-semibold text-zinc-50">{title}</h3>
{!!headline && <p className="line-clamp-3 text-sm">{headline}</p>}
<Button
className="mt-4 max-w-fit"
variant="text"
icon={{
category: SpriteCategories.ARROWS,
name: 'arrow-narrow-right',
position: 'suffix',
}}
>
Ver mais
</Button>
</div>
</article>
</Link>
);
from keen-slider.
The problem is solved, basically the problem is the display: flex
.
But now I have other problem.
'(min-width: 769px)': {
loop: false,
slides: {
number: Math.ceil(projects.length / 2),
perView: 2,
spacing: 10,
},
},
If I use this number
on slides to help me with navigation bullets (for example have 3 slides, should show 2 bullets - so length / 2
), the slides appear this way:
- the third slide don't work and the same for the bullets pagination
from keen-slider.
Related Issues (20)
- [VanillaJS][v5] translate3d values for slides are sometimes wrong
- How to avoid skipping slides when mouse scrolling? HOT 1
- moveToIdx does not work in certain conditions HOT 3
- Dynamic content makes slides jumping between loops
- Scrolling to a Specific Element in a Multi-Element Slide
- Weird Resize Happening to All Slides HOT 1
- Control end animation speed
- Autosroll issue
- Please update documentation
- Mobile URL bar resizing causes autoplaying carousel jump to the edge of a slide on initial scroll
- Gutenberg Block: TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. HOT 1
- Carousel card effect
- Any way to stop or pause autoplay?
- Unable to click inside slide item
- Change unselected slides back to initial position
- Can you offer the carousel to vue? HOT 1
- SolidJS HOT 1
- How to embed youtube video in slider using youtube video id?
- [Nuxt 3/ Vue 3] Change animation duration and easing type for swiping
- [Nuxt 3] Slides appear all at once without spacing on initial page load
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keen-slider.