Skip to content

Commit

Permalink
Merge pull request #216 from rudrapratap63/Fix/content_not_visible
Browse files Browse the repository at this point in the history
fix dark theme mode in blog(post) section
  • Loading branch information
Kritika30032002 authored Oct 20, 2024
2 parents 4a9efc9 + 6554db8 commit f778cb2
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 16 deletions.
48 changes: 33 additions & 15 deletions public/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -297,56 +297,74 @@ body {
color: #bbb;
}

.detail-container{
.detail-container {
width: 80%;
display: flex;
margin: 3% 30px 5%;
padding: 30px 0 40px;
box-shadow: 0 0 3px 0 #cccccc;
background-color: #fff;
background-color: #fff;
flex-direction: column;
align-items: center;
justify-content: space-between;
transition: background-color 0.5s, color 0.5s;
}

.detail-title{
color: #000;
color: #000;
margin: 30px 0;
padding: 0 10px;
font-size: 5rem;
text-align: center;
font-family: Georgia, serif;
transition: color 0.5s;
}

.detail-author{
color: #545151;
font-family: Georgia , Helvetica, Arial, sans-serif;
color: #545151;
font-family: Georgia, Helvetica, Arial, sans-serif;
font-size: 17px;
font-weight: 100;
font-style: italic;
margin-bottom: 10px;
padding: 0;
}

.detail-author span {
padding: 0 10px;
transition: color 0.5s;
}

.detail-image {
width: 80%;
height: 30%;
height: auto; /* Maintain aspect ratio */
object-fit: cover;
object-position: center;
margin: 10px 40px;
}

.detail-content{
margin: 20px 10%;
font-size: 18px;
line-height: 1.8;
font-family: Helvetica, Arial, sans-serif;
.detail-content {
margin: 20px 10%;
font-size: 18px;
line-height: 1.8;
font-family: Helvetica, Arial, sans-serif;
transition: color 0.5s;
}

/* Dark Mode Styles for Post.ejs*/
body.dark-mode .detail-container {
background-color: #333;
}

body.dark-mode .detail-title {
color: #90caf9;
}

body.dark-mode .detail-author {
color: #bbb;
}

body.dark-mode .detail-content {
color: #e0e0e0;
}


.btn-primary {
background-color: #1abc9c;
color: #fff;
Expand Down
2 changes: 1 addition & 1 deletion views/post.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>
<img class="detail-image" src="<%=nextBlogImage%>" alt="Image not Available"/>
<div class="detail-content">
<p> <%=nextBlog%> </p>
<p class="detail-text"> <%=nextBlog%> </p>
</div>
</div>

Expand Down

0 comments on commit f778cb2

Please sign in to comment.