Skip to content

Commit

Permalink
Update news title size
Browse files Browse the repository at this point in the history
  • Loading branch information
fscek committed Mar 15, 2024
1 parent eee7bae commit 7261cb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ footer {
max-width: 95%; /* width of the news container */
}

.news-title {
font-size: 24px;
}

.news-container h2 {
text-align: center;
margin-bottom: 20px;
Expand Down
3 changes: 2 additions & 1 deletion assets/js/news-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ fetch('../assets/data/news.json')
const newsItem = document.createElement('div');
newsItem.className = 'news-item';

let newsContent = `<h3>${item.title}</h3>`;
// Here the "news-title" class is applied to the title
let newsContent = `<h3 class="news-title">${item.title}</h3>`;
if (item.image) {
newsContent += `<img src="${item.image}" alt="${item.title}" style="width:100%;max-width:600px;height:auto;">`;
}
Expand Down

0 comments on commit 7261cb3

Please sign in to comment.