Skip to content

Commit ec724d6

Browse files
committed
refact: initial process of CSS classes to Bootstrap 5
1 parent 50659e5 commit ec724d6

File tree

4 files changed

+29
-26
lines changed

4 files changed

+29
-26
lines changed

src/LinkDotNet.Blog.Web/Features/AboutMe/Components/Profile.razor

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44

55
@inject IRepository<ProfileInformationEntry> Repository
66
@inject ISortOrderCalculator SortOrderCalculator
7-
<div class="profile-card">
8-
<div class="profile-name">
7+
8+
<div class="card shadow-sm w-100 rounded">
9+
<div class="px-4 py-3 fs-5 lh-base" style="background: var(--tag-background);">
910
<span>@ProfileInformation.Name</span>
1011
<br/>
1112
<span>@ProfileInformation.Heading</span>
1213
</div>
13-
<div class="profile-image">
14-
<img src="@ProfileInformation.ProfilePictureUrl" alt="Profile Picture" />
14+
<div class="p-4" style="background: var(--tag-background);">
15+
<img src="@ProfileInformation.ProfilePictureUrl" alt="Profile Picture"
16+
class="w-100 mx-auto d-block rounded-circle"/>
1517
</div>
16-
<ul class="profile-keypoints"
18+
<ul class="list-unstyled px-4 pt-2 mb-0" style="background: var(--tag-background);"
1719
ondragover="event.preventDefault();">
1820
@foreach (var entry in profileInformationEntries)
1921
{

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

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,41 @@
99
<AddSkillDialog @ref="AddSkillDialog" SkillAdded="@AddSkill"></AddSkillDialog>
1010
}
1111
</div>
12-
<div class="table-container">
13-
<table class="skill-table" id="skill-table">
12+
<div class="table-responsive">
13+
<table class="table w-100 mt-3 align-top" id="skill-table">
14+
<thead>
15+
<tr>
16+
<th class="w-10">Capability</th>
17+
<th class="w-30">Familiar with</th>
18+
<th class="w-30">Proficient</th>
19+
<th class="w-30">Expert</th>
20+
</tr>
21+
</thead>
1422
<tbody>
15-
<tr>
16-
<th>Capability</th>
17-
<th>Familiar with</th>
18-
<th>Proficient</th>
19-
<th>Expert</th>
20-
</tr>
2123
@foreach (var skillCapabilityGroup in skills.GroupBy(s => s.Capability))
2224
{
2325
<tr ondragover="event.preventDefault();">
2426
<td>@skillCapabilityGroup.Key</td>
2527
@foreach (var skillLevel in ProficiencyLevel.All)
2628
{
27-
<td @ondrop="@(() => HandleDrop(skillLevel))" class="proficiency-level">
29+
<td @ondrop="@(() => HandleDrop(skillLevel))" class="border-top align-top" style="min-width: 100px;">
2830
@foreach (var skill in skillCapabilityGroup.Where(s => s.ProficiencyLevel == skillLevel))
2931
{
30-
@if (ShowAdminActions)
32+
if (ShowAdminActions)
3133
{
32-
<div draggable="true" @ondrag="@(() => currentDragItem = skill)" style="cursor: grab"
33-
class="skill-tag">
34+
<div draggable="true"
35+
@ondrag="@(() => currentDragItem = skill)"
36+
class="d-inline-block me-2 my-2 px-2 py-1 rounded bg-light"
37+
style="background-color: var(--tag-background); cursor: grab; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
38+
3439
<SkillTag Skill="@skill"
3540
ShowAdminActions="@true"
3641
DeleteSkill="@(() => DeleteSkill(skill))"/>
3742
</div>
3843
}
3944
else
4045
{
41-
<div>
46+
<div class="d-inline-block me-2 my-2">
4247
<SkillTag Skill="@skill"/>
4348
</div>
4449
}
@@ -49,9 +54,10 @@
4954
}
5055
</tbody>
5156
</table>
57+
5258
@if (ShowAdminActions)
5359
{
54-
<small for="skill-table">You can drag and drop your skills from one proficiency to another</small>
60+
<small class="form-text text-muted">You can drag and drop your skills from one proficiency to another</small>
5561
}
5662
</div>
5763
@code {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@using LinkDotNet.Blog.Domain
2-
<span class="skill-tag">
2+
<span class="d-inline-flex align-items-center rounded px-2 py-1 me-2 my-2"
3+
style="background-color: var(--tag-background); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
34
@if (!string.IsNullOrEmpty(Skill.IconUrl))
45
{
56
<img src="@Skill.IconUrl" alt="icon" max-width="48px"/>

src/LinkDotNet.Blog.Web/Pages/_Layout.cshtml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@
2525
<link rel="preload" href="css/fonts/icons.woff2" as="font" type="font/woff2" crossorigin />
2626
<link rel="preload" href="css/fonts/icons.woff" as="font" type="font/woff" crossorigin />
2727
<link href="css/basic.css" rel="stylesheet" />
28-
<link href="css/icons.css" rel="stylesheet" />
29-
<link href="css/aboutme.css" rel="stylesheet" />
30-
<link href="css/admin.css" rel="stylesheet" />
31-
<link href="css/components.css" rel="stylesheet" />
32-
<link href="css/home.css" rel="stylesheet" />
33-
<link href="css/blogpost.css" rel="stylesheet" />
3428
<link rel="preload" href="LinkDotNet.Blog.Web.styles.css" as="style">
3529
<link href="LinkDotNet.Blog.Web.styles.css" rel="stylesheet"/>
3630
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==" crossorigin="anonymous" referrerpolicy="no-referrer" />

0 commit comments

Comments
 (0)