Skip to content

tyrellcurry/photoSnap

Repository files navigation

Photosnap

Checkout The Live Project: HERE!

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for each page depending on their device's screen size
  • See hover states for all interactive elements throughout the site

Screenshots

Desktop Version

Tablet Version

Mobile Version

Links

My process

Built with

What I learned

Building a JSON Data file from scratch

{ "title": "The Mountains", "images": { "desktop":
"./assets/stories/desktop/mountains.jpg", "mobile":
"./assets/stories/mobile/mountains.jpg", "tablet":
"./assets/stories/tablet/mountains.jpg" }, "date": "April 16th 2020",
"photographer": "John Appleseed", "isHomepage": true, "id": 2 },

Using the Fill CSS property to fill a SVG

#tw:hover {
  fill: url(#gradientTW);
}

Using Map and Filter together to populate cards using the JSON data

{
  storiesItemsData
    .filter((media) => !media.isHomepage && !media.isMainCard)
    .map((media) => (
      <StoriesCards
        title={media.title}
        mobile={media.images.mobile}
        desktop={media.images.desktop}
        tablet={media.images.tablet}
        date={media.date}
        photographer={media.photographer}
        key={media.id}
      />
    ));
}

Using state to toggle between classes for tailwind styling and displaying text

const [isActive, setActive] = useState(false);

const toggleClass = () => {
  setActive(!isActive);

Continued development

I would like to learn more about working with JSON data in React & NextJS projects. I would also like to gain more experience creating reusable components.

Useful resources

Author

Acknowledgments

Special thanks to Rodderick Garland for collaborating on the project.

About

A mock marketing site for a photo-sharing app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •