Skip to content

React project for the Article preview component callenge of Frontend Mentor

Notifications You must be signed in to change notification settings

andresesaldar/FrontedMentor_ArticlePreviewComponent

Repository files navigation

Frontend Mentor - Article preview component solution

This is a solution to the Article preview component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the component depending on their device's screen size
  • See the social media share links when they click the share icon

Screenshot

Solution Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • React - JS library
  • Sass - CSS language
  • Bootstrap - CSS library
  • Vite - Webpack alternative

What I learned

Sass nested rules:

.btn-share
    background-color: $core-light
    & img
        @media screen and (max-width: $core-sm-size)
            filter: brightness(0) invert(1)
    &:hover
        background-color: $core-primary
        & img
            filter: brightness(0) invert(1)
    
    @media screen and (max-width: $core-sm-size)
        background-color: $core-primary !important 
        position: absolute
        right: 3rem
        top: 25%

Travis CI integration with github pages:

deploy:
  provider: pages
  skip_cleanup: true
  github_token: $GITHUB_TOKEN  # Set in the settings page of your repository, as a secure variable
  keep_history: true
  on:
    branch: main

Continued development

The HTML elements positioning was difficult for me when I work on the share options responsive. I have to learn more about the positioning concepts on HTML/CSS.

Author

About

React project for the Article preview component callenge of Frontend Mentor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published