advweb-grp1 / advanced-web-final-year-project

Final year advanced web develop unit project
MIT License
1 stars 0 forks source link

News section on home page #43

Closed AymanReh closed 1 year ago

AymanReh commented 1 year ago

Added 4 display cards to the home view, Right now only shows example data but when an API is found will replaced it. Contains a title, description, tags and image. Also contains a button which says "show more" when pressed 4 more cards will appear below the current ones

github-actions[bot] commented 1 year ago

Visit the preview URL for this PR (updated for commit bd0aec9):

https://adv-web-grp1--pr43-feature-news-75941ht0.web.app

(expires Mon, 01 May 2023 19:20:34 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: e45f8bd17b7de44787580bea572e36aa09784b8c

LiamSingh64 commented 1 year ago

Is it worth making the Cards it's own component? It could use v-for to generate the card-body and just pass in an array of objects which are API call responses

LiamSingh64 commented 1 year ago

Or should we just merge for now so there is a proof-of-concept on the site?

advweb-grp1 commented 1 year ago

Remove the prefix for each section like "title". Remove the hardcoded API key in code. Change that so it imports it from the .env.local file instead. Call addCard() manually to get the first 4 cards

rwx-yxu commented 1 year ago

current view: image

rwx-yxu commented 1 year ago

The cards have varying height, is it possible to make the heights the same for consistency?

advweb-grp1 commented 1 year ago

You have also not removed "Title:", "description" ect

rwx-yxu commented 1 year ago

The cards do not present themselves as clickable if you hover over them. You can click on them but they open in the same tab. I think it would be easier to have a "Open Article" button rather than make the entire card clickable in this case. Like this: image Do not need the h5 tag. Make the button stretch the card rather than the size of the text since the cards are narrow enough for it. Can do it by putting the button in a div with the class "col-12" I think. Refer to the query view with how I did it.

AymanReh commented 1 year ago

Final news view image When clicking go to news article opens up a new tab aswell