vinitshahdeo / ProgressiveNewsApp

A simple Progressive Web App that brought news from a variety of sources using News API.
https://vinitshahdeo.github.io/ProgressiveNewsApp/
MIT License
41 stars 37 forks source link

Card, Index and app.js [Any logic code affected] update #22

Open patodm opened 2 years ago

patodm commented 2 years ago

Hi! @vinitshahdeo this is my update proposal:

Mobile Mockup

Mobile Mockup Showing Sticky Selector

And here my changes:

<div class="news-selector-wrapper">
    <select id="news-selector"></select>
</div>
  1. div with "header-wrapper" class: As wrapper for header section that includes image and title of card.
  2. div with "headline" class: The headline class initially was in p tag, but to have more freedom over the element and over the global style I changed it to the new div.
  3. div with "body-wrapper" class: As wrapper for body section that includes author and description of card.
function createArticle(article) {
  return `
    <a class="story" href="${article.url}">
      <div class="header-wrapper">
        <img class="story-image" src="${article.urlToImage}" alt="${article.title}">
        <div class="headline">
          <p>${article.title}</p>
        </div>
      </div>
      <div class="body-wrapper">
        <p class="author">${article.author ? article.author : ""}</p>
        <p class="description">${article.description}</p>
      </div>
    </a>
  `;
}
welcome[bot] commented 2 years ago

Thanks for opening this pull request! šŸ¤— Wishing you a great Hacktoberfest 2020 šŸ™Œ šŸŽ‰ āš”ļø Are you looking for more beginner-friendly issues? Check out this repo.

Hacktoberfest2020

šŸ“¢ Spread the word about @vinitshahdeo/Hacktoberfest2020 repo across your social media channels to help get others involved! Give a shoutout to DEV article. Retweet this.

Check out few other repos below šŸš€

PortScanner SimpleBio HBD Map Of India

Show some ā¤ļø

Say Hi on Twitter! šŸ‘‹

Twitter Follow

PS: Please add @vinitshahdeo as a reviewer if you haven't added.