Git Product home page Git Product logo

Comments (2)

tutods avatar tutods commented on September 23, 2024

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.

tutods avatar tutods commented on September 23, 2024

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:
image

  • the third slide don't work and the same for the bullets pagination

from keen-slider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.