Skip to content

lrmn7/anvain-seth

Repository files navigation

Connect with me:

romanromannya romanroman.nya lrmn_vp lrmn#6666

hey there 👋

👩‍💻 About Me

I'm L RMN from my mom

🔭 I’m working with PC
⚡ In my free time I sleep
💔 love has a cost, and both of us lost

What i'am listening to

Cloudinary Dark Art Photography

This template is a plug and play image gallery portfolio site using Next.js, Cloudinary, and Tailwind.

Take A Look!

Screenshot 2023-05-28 at 4 32 54 AM

Installation

Follow these steps to install and set up the Template on your local machine:

Clone the repository:

git clone https://github.com/lrmn7/anvain-seth.git .

Install Dependencies:

npm i or npm install

Create dotenv file with the following lines:

NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=yourcloudinarycloudname

CLOUDINARY_API_KEY=yourcloudinaryapikey

CLOUDINARY_API_SECRET=yourcloudinaryapisecret

Run on your local machine:

npm run dev

This will ensure the app will run with any new Cloudinary account. Please follow the steps below to view how to customize further.

Cloudinary Setup

Switching these folder paths will ensure that you can connect your own folders and images.

export async function getStaticProps() {
  const results = await cloudinary.v2.search
    .expression(`folder:samples/*`) // select folder that holds ALL images
    .sort_by("public_id", "desc")
    .max_results(400)
    .execute();
  let reducedResults: ImageProps[] = [];

  let i = 0;
  for (let result of results.resources) {
    reducedResults.push({
      id: i,
      height: result.height,
      width: result.width,
      public_id: result.public_id,
      format: result.format,
    });
    i++;
  }
  const fetchImagesByCategory = async (category: string) => {
    try {
      const res = await fetch(
        `/api/images?folder=samples/${encodeURIComponent(category)}` // Do the same here.
      );

Lastly, Make sure to switch out the categories in the Filter component. Keep in mind when creating your folders that it is case sensitive.

<Filter
          categories={[
            "Dark Photography",
            "Surreal",
            "Dark Art",
            "Pagan",
            "Witchcraft",
          ]}
          onCategorySelect={handleCategorySelect}
        />

What I Learned

Next.js

In this project, it was used to create a seamless user interface that provides an optimal experience across a wide variety of devices. It allowed for both client-side and server-side data fetching, ensuring that the images load quickly and efficiently.

Cloudinary

In this project, it was used to store, optimize, and deliver images for the portfolio. Cloudinary's API allowed for quick and easy fetching of images and its manipulation features were used to ensure the images are displayed in the optimal size and format.

TailwindCSS

For this project, TailwindCSS was used to create a modern and responsive UI. Its utility-first nature made it incredibly easy to customize the portfolio's design and create a unique look and feel.

Imagemin

Imagemin is a module to minify images. It was used in this project to compress the images before they were uploaded to Cloudinary. This step ensured that the image files were as small as possible without losing quality, which helped improve the site's performance.

TypeScript

It was used in this project to ensure type safety and improve tooling. It made the code more readable and maintainable.

References

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deployed on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

NOTE

*THIS TEMPLATE IS EXAPNDED ON TOP OF ANOTHER

**ADDED: FILTER, ABOUT, CONTACT.

** ORIGINAL CODE:

https://vercel.com/templates/next.js/image-gallery-starter

Support me

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published