michalusio / KuneKune

An informational site about KuneKunes
0 stars 0 forks source link

Create the blog component for the start page #12

Open majarzabek opened 5 months ago

majarzabek commented 5 months ago

It should look as follow:

image

mobile version is a bit different:

image

helpful css' concepts:

https://www.w3schools.com/css/css3_object-fit.asp https://css-tricks.com/snippets/css/a-guide-to-flexbox/

michalusio commented 5 months ago

[!NOTE] It will be useful to compartmentalize - first create a BlogItem (picture + text + button), then combine two items into a BlogComponent

majarzabek commented 5 months ago

Yes, also to achieve this view you will have to mock the data. It will look something like this:

<h1>Our blog</h1>
<h2>Introduction text bla bla</h2>
<BlogSubComponent imageUrl={something} title={something} heading={something} articleUrl={something}/>
<BlogSubComponent imageUrl={something} title={something} heading={something} articleUrl={something}/>

if we had real data, it would look differently:

<h1>Our blog</h1>
<h2>Introduction text bla bla</h2>
{articleList.length>0 && articleList.length.map((article: BlogArticle) => (
<BlogSubComponent key={article.url} imageUrl={article.imageUrl} title={article.title} heading={article.heading} articleUrl={article.url}/>
)) }

Micha will tell you more about Types and keys :D

Gyllenberg commented 5 months ago

This will probably take me way to long to achieve, but imma start it