Skip to content

Commit

Permalink
Minor adjustments to the layout and style of the (React) blog-client.
Browse files Browse the repository at this point in the history
  • Loading branch information
semsion committed Jul 1, 2024
1 parent 7357c66 commit 496d27b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
5 changes: 5 additions & 0 deletions blog-client/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
text-align: center;
}

.blog-title {
margin-bottom: 0;
margin-top: 0;
}

4 changes: 2 additions & 2 deletions blog-client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const App: React.FC = () => {

return (
<div>
<h1>Blog Client</h1>
<p>Blog Client is a React application that consumes an API from Ruby on Rails.</p>
<h1 className='blog-title' >Blog Client</h1>
<p>Blog Client is a React application that consumes an article API from Ruby on Rails</p>
<Articles articles={articles} title={''} body={''} />
</div>
);
Expand Down
9 changes: 9 additions & 0 deletions blog-client/src/articles.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
.articles-ul {
padding-left: 0;
margin-top: 83px;
}

.article-body {
font-size: 0.75rem;
}

.article-header {
margin-top: 0;
margin-bottom: 0;
}
4 changes: 2 additions & 2 deletions blog-client/src/components/articles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const Articles: React.FunctionComponent<ArticleProps> = (props) => {
<ul className='articles-ul' >
{props.articles.map((article, index) => (
<div key={index}>
<h2>{article.title}</h2>
<p>{article.body}</p>
<h2 className='article-header'>{article.title}</h2>
<p className="article-body">{article.body}</p>
</div>
))}
</ul>
Expand Down

0 comments on commit 496d27b

Please sign in to comment.