Skip to content

Commit

Permalink
Merge pull request #108 from wethmiranasinghe/main
Browse files Browse the repository at this point in the history
Update on News
  • Loading branch information
wethmiranasinghe authored Sep 18, 2024
2 parents 361051b + ad9e8cc commit 1d89972
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion front-end/src/Pages/Gallery.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const Gallery = () => {
<input type="url" id="albumURL" placeholder="Enter Album URL" name="albumURL" required />
</div>
<div className="form-group">
<label htmlFor="albumCoverImage">Cover Image (Choose images with size less than 64 kB):</label>
<label htmlFor="albumCoverImage">Cover Image:</label>
<input type="file" id="albumCoverImage" name="albumCoverImage" onChange={handleFileChange} required />
</div>
<div className="form-buttons">
Expand Down
4 changes: 2 additions & 2 deletions front-end/src/Pages/News.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const News = () => {
<input type="date" max={today} id="newsDate" name="newsDate" required />
</div>
<div className="form-group">
<label htmlFor="newsCoverImage">Cover Image (Choose images with size less than 64 kB):</label>
<label htmlFor="newsCoverImage">Cover Image:</label>
<input type="file" id="newsCoverImage" name="newsCoverImage" onChange={handleFileChange} required />
</div>
<div className="form-buttons">
Expand All @@ -169,7 +169,7 @@ const News = () => {
<p>{item.newsDescription}</p> {/* News description */}
<b><p>Date: {item.newsDate}</p></b> {/* News date */}
<b><p>Author: {item.newsAuthor}</p></b> {/* News author */}
<a href={item.newsUrl} target="_blank" rel="noopener noreferrer">Read more</a> {/* Link to full news */}
{/* <a href={item.newsUrl} target="_blank" rel="noopener noreferrer">Read more</a> Link to full news */}

{/* Show edit and delete buttons only if user is logged in */}
{loggedInUser.isLoggedIn && (
Expand Down
1 change: 1 addition & 0 deletions front-end/src/components/News.css
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
opacity: 0.8;
}


/* Responsive styles for screens smaller than 768px */
@media (max-width: 768px) {
.add-news-form {
Expand Down

0 comments on commit 1d89972

Please sign in to comment.