Skip to content

Commit

Permalink
dark mode for tags admin
Browse files Browse the repository at this point in the history
  • Loading branch information
EdiWang committed Oct 2, 2024
1 parent d4277c6 commit d7603d0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Moonglade.Web/Pages/Admin/Tags.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@using Moonglade.Core.TagFeature
@inject IMediator Mediator
@{
ViewBag.ThemeSwitchReady = true;
ViewBag.Title = "Tags";
var tags = await Mediator.Send(new GetTagsQuery());
}
Expand Down Expand Up @@ -89,7 +90,7 @@
<ul class="list-unstyled ul-tag-mgr">
@foreach (var tag in tags.OrderBy(model => model.DisplayName))
{
<li id="[email protected]" class="border rounded bg-white shadow-sm">
<li id="[email protected]" class="admin-tag-item border rounded shadow-sm">
<span class="span-tagcontent-editable" contenteditable="true" spellcheck="false" data-tagid="@tag.Id">@tag.DisplayName</span>
<a class="btn-delete" data-tagid="@tag.Id">
<i class="bi-trash"></i>
Expand Down
20 changes: 19 additions & 1 deletion src/Moonglade.Web/wwwroot/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,10 @@ div.mce-fullscreen {
background-color: var(--bs-white);
}

.admin-tag-item {
background-color: var(--bs-white);
}

[data-bs-theme="dark"] .navbar-brand {
color: var(--bs-white);
}
Expand Down Expand Up @@ -414,4 +418,18 @@ div.mce-fullscreen {

[data-bs-theme="dark"] .mention-item-container {
background-color: var(--bs-body-bg);
}
}

[data-bs-theme="dark"] .admin-tag-item {
background-color: var(--bs-body-bg);
}

[data-bs-theme="dark"] .ul-tag-mgr li a {
background-color: var(--bs-secondary-bg);
color: var(--bs-white);
}

[data-bs-theme="dark"] .ul-tag-mgr li a:hover {
background-color: var(--bs-red);
color: var(--bs-white);
}

0 comments on commit d7603d0

Please sign in to comment.