Skip to content

Commit e2f9c8d

Browse files
committed
refact: removal of inline style to match bootstrap class
1 parent 4b71e59 commit e2f9c8d

File tree

8 files changed

+29
-31
lines changed

8 files changed

+29
-31
lines changed

src/LinkDotNet.Blog.Web/Features/AboutMe/Components/Skill/SkillTable.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
{
3030
@if (ShowAdminActions)
3131
{
32-
<div draggable="true" @ondrag="@(() => currentDragItem = skill)" style="cursor: grab"
33-
class="skill-tag">
32+
<div draggable="true" @ondrag="@(() => currentDragItem = skill)"
33+
class="skill-tag cursor-grab">
3434
<SkillTag Skill="@skill"
3535
ShowAdminActions="@true"
3636
DeleteSkill="@(() => DeleteSkill(skill))"/>

src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/CreateNewBlogPost.razor

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
<EditForm Model="@model" OnValidSubmit="OnValidBlogPostCreatedAsync">
3737
<DataAnnotationsValidator />
38-
38+
3939
<div class="row g-4">
4040
<div class="col-lg-8">
4141
<div class="card shadow-sm border-0 hover-shadow-lg transition">
@@ -45,19 +45,18 @@
4545
<div class="card-body p-0">
4646
<div class="p-4 border-bottom">
4747
<div class="form-floating">
48-
<input type="text" class="form-control form-control-lg border-0 shadow-none"
48+
<input type="text" class="form-control form-control-lg border-0 shadow-none fs-3 fw-semibold"
4949
id="title" placeholder="Enter your post title..."
50-
@oninput="args => model.Title = args.Value!.ToString()!"
51-
value="@model.Title"
52-
style="font-size: 1.5rem; font-weight: 600;" />
50+
@oninput="args => model.Title = args.Value!.ToString()!"
51+
value="@model.Title"/>
5352
<label for="title" class="fw-bold">Post Title</label>
5453
</div>
5554
<ValidationMessage For="() => model.Title" class="text-danger small mt-1"></ValidationMessage>
5655
</div>
5756

5857
<div class="p-4 border-bottom">
5958
<label class="form-label fw-bold text-dark mb-3">Short Description</label>
60-
<MarkdownTextArea Id="short" Class="form-control border-0 shadow-none"
59+
<MarkdownTextArea Id="short" Class="form-control border-0 shadow-none"
6160
Rows="4" Placeholder="Write a compelling summary..."
6261
@bind-Value="@model.ShortDescription"
6362
PreviewFunction="ReplaceShortCodes"></MarkdownTextArea>
@@ -69,15 +68,15 @@
6968
Content <span class="badge bg-secondary ms-2 fw-medium">@ReadingTimeCalculator.GetWordCount(model.Content) words</span>
7069
<span class="badge bg-info ms-1 fw-medium">~@GetEstimatedReadTime() min read</span>
7170
</label>
72-
<MarkdownTextArea Id="content" Class="form-control border-0 shadow-none"
71+
<MarkdownTextArea Id="content" Class="form-control border-0 shadow-none"
7372
Rows="25" Placeholder="Start writing your amazing content..."
7473
PreviewFunction="ReplaceShortCodes"
7574
@bind-Value="@model.Content"></MarkdownTextArea>
7675
<ValidationMessage For="() => model.Content" class="text-danger small mt-1"></ValidationMessage>
7776

7877
<div class="position-absolute top-0 end-0 m-3">
7978
<div class="btn-group">
80-
<button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button"
79+
<button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button"
8180
data-bs-toggle="dropdown" aria-expanded="false">
8281
Tools
8382
</button>
@@ -129,8 +128,8 @@
129128
</div>
130129
<div class="card-body">
131130
<div class="form-floating">
132-
<InputText type="text" class="form-control" id="tags"
133-
placeholder="technology, programming, tutorial"
131+
<InputText type="text" class="form-control" id="tags"
132+
placeholder="technology, programming, tutorial"
134133
@bind-Value="model.Tags" />
135134
<label for="tags">Tags (comma separated)</label>
136135
</div>
@@ -181,7 +180,7 @@
181180
}
182181
<ValidationMessage For="() => model.ScheduledPublishDate" class="text-danger small mt-1"></ValidationMessage>
183182
</div>
184-
183+
185184
@if (BlogPost is not null && !IsScheduled)
186185
{
187186
<div class="form-check form-switch">
@@ -202,17 +201,17 @@
202201
<div class="card-body">
203202
<div class="mb-3">
204203
<div class="form-floating">
205-
<InputText type="url" class="form-control" id="preview"
206-
placeholder="https://example.com/image.jpg"
204+
<InputText type="url" class="form-control" id="preview"
205+
placeholder="https://example.com/image.jpg"
207206
@bind-Value="model.PreviewImageUrl" />
208207
<label for="preview">Primary Image URL</label>
209208
</div>
210209
<ValidationMessage For="() => model.PreviewImageUrl" class="text-danger small mt-1"></ValidationMessage>
211210
</div>
212211
<div class="mb-3">
213212
<div class="form-floating">
214-
<InputText type="url" class="form-control" id="fallback-preview"
215-
placeholder="https://example.com/fallback.jpg"
213+
<InputText type="url" class="form-control" id="fallback-preview"
214+
placeholder="https://example.com/fallback.jpg"
216215
@bind-Value="model.PreviewImageUrlFallback" />
217216
<label for="fallback-preview">Fallback Image URL</label>
218217
</div>
@@ -306,25 +305,25 @@
306305
{
307306
return "Editing";
308307
}
309-
308+
310309
if (model.IsPublished)
311310
{
312311
return "Ready to Publish";
313312
}
314-
313+
315314
if (IsScheduled)
316315
{
317316
return "Scheduled";
318317
}
319-
318+
320319
return "Draft";
321320
}
322321

323322
private int GetEstimatedReadTime()
324323
{
325324
if (string.IsNullOrWhiteSpace(model.Content))
326325
return 1;
327-
326+
328327
return ReadingTimeCalculator.CalculateReadingTime(model.Content);
329328
}
330329

src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/FeatureInfoDialog.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
changes.</p>
55
<p>Use with caution and check the changelog</p>
66
<hr/>
7-
<h3 style="display:inline-block">Slide-Show</h3><i class="lab"></i>
7+
<h3 class="d-inline-block">Slide-Show</h3><i class="lab"></i>
88
<p>Will create a slide-show with images specified by the tag.</p>
99
<strong>Usage:</strong>
1010
<code><pre>&lt;slide-show&gt;
@@ -13,7 +13,7 @@
1313
&lt;slide-show-image src="https://picsum.photos/550/200" title="Title 3"&gt;&lt;/slide-show-image&gt;
1414
&lt;/slide-show&gt;</pre></code>
1515
<hr />
16-
<h3 style="display:inline-block">Convert To Markdown</h3><i class="lab"></i>
16+
<h3 class="d-inline-block">Convert To Markdown</h3><i class="lab"></i>
1717
<p>By clicking the button in the editor "Convert to Markdown", you will be able to transform HTML content into Markdown content. You will be also able to restore the original content</p>
1818
</ModalDialog>
1919

src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/ShortCodeDialog.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<tr @onclick="() => AddShortCode(shortCode)" style="cursor: pointer;">
2424
<td>@shortCode.Name</td>
2525
<td>
26-
<div style="max-height: 100px; overflow-y: auto;">
26+
<div class="overflow-auto mh-100px">
2727
@MarkdownConverter.ToMarkupString(shortCode.MarkdownContent)
2828
</div>
2929
</td>

src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Components/VisitCountPerPage.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
{
2323
<p id="total-clicks">Loading...</p>
2424
}
25-
<table class="table table-striped table-hover table-active" style="table-layout: fixed">
25+
<table class="table table-striped table-hover table-active table-fixed">
2626
<tbody>
2727
<tr>
2828
<th>Title</th>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<ModalDialog @ref="ModalDialog" Title="@Title">
22
<h3>@Content</h3>
33
<div class="d-flex justify-content-end gap-2 mt-4">
4-
<button id="ok" @onclick="OnYesButtonPressed" type="button" class="btn btn-primary" style="width: 125px;">Ok</button>
5-
<button id="cancel" @onclick="OnNoButtonPressed" type="button" class="btn btn-secondary" style="width: 125px;">Cancel</button>
4+
<button id="ok" @onclick="OnYesButtonPressed" type="button" class="btn btn-primary w-100">Ok</button>
5+
<button id="cancel" @onclick="OnNoButtonPressed" type="button" class="btn btn-secondary w-100" >Cancel</button>
66
</div>
77
</ModalDialog>
88

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="modal @modalClass" tabindex="-1" role="dialog" style="display:@modalDisplay; overflow-y: auto;">
1+
<div class="modal @modalClass overflow-auto" tabindex="-1" role="dialog" style="display:@modalDisplay;">
22
<div class="modal-dialog modal-lg" role="document">
33
<div class="modal-content">
44
<div class="modal-header">

src/LinkDotNet.Blog.Web/Features/SupportMe/Components/Patreon.razor

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<a href="https://www.patreon.com/@PatreonName" target="_blank" bind
2-
class="text-decoration-none border border-dark rounded p-2 link"
3-
style="background: #fb6856">
4-
<i class="me-2" style="color: white">
2+
class="text-decoration-none border border-dark rounded p-2 link bg-danger">
3+
<i class="me-2 text-white">
54
<svg style="height: 1em; width: 1em;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
65
<path d="M512 194.8c0 101.3-82.4 183.8-183.8 183.8-101.7 0-184.4-82.4-184.4-183.8 0-101.6 82.7-184.3 184.4-184.3C429.6 10.5 512 93.2 512 194.8zM0 501.5h90v-491H0v491z" fill="white"></path>
76
</svg>

0 commit comments

Comments
 (0)