Skip to content

Commit 9cf3c8b

Browse files
author
Farzin
committed
#281 Design - Refactoring Themes
1 parent 919c856 commit 9cf3c8b

5 files changed

Lines changed: 24 additions & 40 deletions

File tree

src/Blogifier.Admin/Pages/Settings/ThemesView.razor

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
<div class="section-content">
1313
<div class="themes">
1414
<div class="themes-item d-flex">
15-
<img src="@CurrentTheme.Cover" class="themes-thumbnail" alt="@CurrentTheme.Title">
16-
<!-- 4:5 -->
17-
<!-- 1024:1280 -->
18-
<!-- 1600:2000 -->
15+
<img src="@CurrentTheme.Cover" class="themes-thumbnail" alt="@CurrentTheme.Title"> <!-- 4:5 -->
1916
<div class="themes-info">
2017
<h3 class="themes-title">@CurrentTheme.Title (@_localizer["current"])</h3>
2118
<ul class="themes-meta d-flex">
@@ -31,18 +28,18 @@
3128
<div class="themes-item d-flex">
3229
<img src="@item.Cover" class="themes-thumbnail" alt="@item.Title">
3330
<div class="themes-info">
34-
<div class="themes-title">@item.Title</div>
31+
<h3 class="themes-title">@item.Title</h3>
3532
<ul class="themes-meta d-flex">
3633
<li class="themes-meta-item">@_localizer["version"] 2.1</li>
3734
<li class="themes-meta-item">@_localizer["by"] <a href="#">John Doe</a></li>
3835
</ul>
3936
<p class="themes-desc">This is the default theme that comes with the Blogifier 3.0 There are some customization you might enjoy.</p>
4037
<div class="d-flex">
4138
<button type="button" class="btn btn-default me-2" @onclick="()=> SelectTheme(item.Title)" @onclick:preventDefault>@_localizer["set-current-theme"]</button>
42-
<button type="button" class="btn btn-default me-2" title="@_localizer["delete"]">
39+
<button type="button" class="btn btn-default me-2" data-bs-toggle="tooltip" title="@_localizer["delete"]">
4340
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
4441
<path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z" />
45-
<path fill-rule="evenodd" d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z" />
42+
<path fill-rule="evenodd" d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z" />
4643
</svg>
4744
</button>
4845
</div>
@@ -53,33 +50,6 @@
5350
</div>
5451
}
5552

56-
<div class="modal fade" id="themeInfo" tabindex="-1" aria-labelledby="themeInfoLabel" aria-hidden="true">
57-
<div class="modal-dialog">
58-
<div class="modal-content">
59-
<div class="modal-header">
60-
<h5 class="modal-title" id="themeInfoLabel">@_localizer["info"]</h5>
61-
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
62-
</div>
63-
<div class="modal-body">
64-
<div class="themes-modal">
65-
<div class="themes-modal-title">Theme Name</div>
66-
<p class="themes-modal-desc">
67-
This is a test description, one paragraph long description for you guys, there should not be a break line in this description, otherwise, it doesn't look good, and it gets messy. Also, we have 3 links.
68-
</p>
69-
<ul class="themes-modal-info">
70-
<li>@_localizer["developer"] John Doe</li>
71-
<li>@_localizer["version"] 2.1</li>
72-
<li><a href="#">Website</a></li>
73-
<li><a href="#">GitHub</a></li>
74-
<li><a href="#">Other Link</a></li>
75-
</ul>
76-
<img src="themes/standard/screenshot.png" class="themes-modal-img" alt="Theme Name">
77-
</div>
78-
</div>
79-
</div>
80-
</div>
81-
</div>
82-
8353
<ToasterComponent @ref="Toaster" />
8454

8555
@code {

src/Blogifier.Admin/wwwroot/admin/css/app.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Blogifier.Admin/wwwroot/admin/css/app.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Blogifier.Admin/wwwroot/admin/scss/pages/settings/_themes.scss

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,41 @@
33
margin-bottom: 3rem;
44
}
55
&-thumbnail {
6-
border-radius: 0.325rem;
6+
border-radius: 0.5rem;
77
display: block;
88
// 4:5
99
width: 12.5rem;
1010
height: 15.625rem;
1111
object-fit: cover;
1212
object-position: center;
13+
border: 1px solid $gray-200;
1314
}
1415

1516
&-info {
1617
margin-left: 2rem;
17-
padding-top: 1rem;
18+
padding-top: 1.5rem;
1819
}
1920

2021
&-title {
21-
margin-bottom: 1.5rem;
22+
margin-bottom: 1.25rem;
2223
}
2324

2425
&-meta {
2526
list-style: none;
2627
padding: 0;
27-
margin: 0 0 1.5rem;
28+
margin: 0 0 1.25rem;
2829
color: $gray-600;
2930

31+
a[href] {
32+
color: $gray-600;
33+
border-bottom: 1px solid $gray-500;
34+
35+
&:hover {
36+
color: $blogifier;
37+
border-color: $blogifier;
38+
}
39+
}
40+
3041
&-item {
3142
margin-right: 1.5rem;
3243
}

src/Blogifier.Shared/Resources/Resource.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,4 +756,7 @@
756756
<data name="blog-settings" xml:space="preserve">
757757
<value>Blog settings</value>
758758
</data>
759+
<data name="set-current-theme" xml:space="preserve">
760+
<value>Set as current theme</value>
761+
</data>
759762
</root>

0 commit comments

Comments
 (0)