/art-gallery

Challenge from frontendmantor.io using React, Tailwind and ionic

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

Frontend Mentor - Art gallery website solution

This is a solution to the Art gallery website challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Note: Delete this note and update the table of contents based on what sections you keep.

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
  • Bonus: Use Leaflet JS to create an interactive location map with custom location pin

Screenshot

Links

My process

Built with

  • Ionic UI utilities to frame the interface
  • TailwindCSS to format the specific detais
  • Split large, medium and small sizes is separate files
  • React - JS library
  • TailwindCSS - CSS utility classes
  • Ionic - Render JS code to native APPs to Web, IOS and Android

What I learned

More learning about the context of React, Tailwind and Ionic. How to render React components using the window object width propertie. That is a better approach than media qqueryes.

if (typeof window !== "undefined") {
  // Handler to call on window resize
  function handleResize() {
    // Set window width/height to state
    setWindowSize({
      width: window.innerWidth,
      height: window.innerHeight,
    });
  }
}

Continued development

Ionic framework do offer much help to build UIs and style them to Web, IOs and Android, but when a desing must be followed one will need to make use of Tailwind (or plain CSS) as Ionic format can get in the way.

Useful resources

Author

Acknowledgments

That thread at StackOferflow was very usefull