Skip to content

Commit 13a1399

Browse files
committed
refact: replaced custom css class to bootstrap 5 counterpart
1 parent 164d6c2 commit 13a1399

File tree

2 files changed

+9
-35
lines changed

2 files changed

+9
-35
lines changed

src/LinkDotNet.Blog.Web/Features/Components/ShortBlogPost.razor

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
<ul class="details">
1515
@if (BlogPost.IsScheduled)
1616
{
17-
<li class="schedule">Scheduled</li>
17+
<li class="bg-success text-white px-2 py-1 rounded">Scheduled</li>
1818
}
1919
else if (!BlogPost.IsPublished)
2020
{
21-
<li class="draft">Draft</li>
21+
<li class="text-white px-2 py-1 rounded" style="background-color: #ff8700;">Draft</li>
2222
}
2323
<li class="date me-4"><span>@BlogPost.UpdatedDate.ToShortDateString()</span></li>
2424
@if (BlogPost.Tags.Any())
@@ -32,15 +32,18 @@
3232
</ul>
3333
</li>
3434
}
35-
<li class="read-time me-4">@BlogPost.ReadingTimeInMinutes minute read</li>
35+
<li class="me-4">
36+
<span class="me-1" style="font-family: 'icons'; font-weight: 900;">&#xe94f;</span>
37+
@BlogPost.ReadingTimeInMinutes minute read
38+
</li>
3639
</ul>
3740
</div>
3841
<div class="description">
3942
<div class="header">
40-
<h4 class="card-title">@BlogPost.Title</h4>
43+
<h4 class="fw-semibold lh-sm me-4">@BlogPost.Title</h4>
4144
<BookmarkButton IsBookmarked="isBookmarked" Bookmarked="ToggleBookmark"></BookmarkButton>
4245
</div>
43-
<p class="card-content">@MarkdownConverter.ToMarkupString(BlogPost.ShortDescription)</p>
46+
<p class="fw-light">@MarkdownConverter.ToMarkupString(BlogPost.ShortDescription)</p>
4447
<p class="read-more">
4548
<a href="/blogPost/@BlogPost.Id/@BlogPost.Slug" aria-label="@BlogPost.Title">Read the whole article</a>
4649
</p>

src/LinkDotNet.Blog.Web/wwwroot/css/basic.css

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,6 @@ code {
112112
content: "\e9d5";
113113
}
114114

115-
.read-time:before {
116-
font-family: 'icons';
117-
font-weight: 900;
118-
content: "\e94f";
119-
}
120-
121115
.copy-btn {
122116
border-color: whitesmoke !important;
123117
}
@@ -428,12 +422,6 @@ i {
428422
display: inline-block;
429423
}
430424

431-
.blog-card .read-time:before {
432-
font-family: 'icons';
433-
font-weight: 900;
434-
content: "\e94f";
435-
}
436-
437425
.blog-card p {
438426
position: relative;
439427
margin: 1rem 0 0;
@@ -451,6 +439,7 @@ i {
451439
top: -0.75rem;
452440
border-radius: 3px;
453441
}
442+
454443
.blog-card:hover .details {
455444
left: 0;
456445
}
@@ -463,24 +452,6 @@ i {
463452
color: #D7D7D7 !important;
464453
}
465454

466-
.schedule {
467-
background-color: #28a745;
468-
}
469-
470-
.draft {
471-
background-color: #ff8700;
472-
}
473-
474-
.card-title {
475-
font-weight: 600;
476-
line-height: 1.3;
477-
margin-right: 1rem;
478-
}
479-
480-
.card-content {
481-
font-weight: 300;
482-
}
483-
484455
@media (min-width: 640px) {
485456
.blog-card {
486457
flex-direction: row;

0 commit comments

Comments
 (0)