-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
60 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/DragonFly.BlockField.Razor/Pages/Blocks/ProgressBlockView.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@inherits BlockComponent<ProgressBlock> | ||
|
||
<div class="progess-block"> | ||
<div class="input-group"> | ||
<EnumView TEnum="ColorType" @bind-EnumValue="@Block.ColorType" /> | ||
<input class="form-control" type="number" @bind="@Block.Value" min="0" max="100" step="1" /> | ||
@*<div class="progress"> | ||
<div class="progress-bar bg-success" role="progressbar" style="width: @(Block.Value)%"></div> | ||
</div>*@ | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
|
||
namespace DragonFly.BlockField; | ||
|
||
public enum AlertType | ||
public enum ColorType | ||
{ | ||
Primary, | ||
Secondary, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (c) usercode | ||
// https://github.com/usercode/DragonFly | ||
// MIT License | ||
|
||
namespace DragonFly.BlockField; | ||
|
||
/// <summary> | ||
/// ProgressBlock | ||
/// </summary> | ||
public class ProgressBlock : Block | ||
{ | ||
public override string CssIcon => "fa-solid fa-bars-progress"; | ||
|
||
public int? Value { get; set; } | ||
|
||
public ColorType ColorType { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/DragonFlyTemplate/Pages/DisplayTemplates/ProgressBlock.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@model ProgressBlock | ||
|
||
<div class="block progress-block"> | ||
<div class="progress"> | ||
<div class="progress-bar bg-@(Model.ColorType.ToBootstrapCssClass())" role="progressbar" style="width: @(Model.Value)%" aria-valuenow="@Model.Value" aria-valuemin="0" aria-valuemax="100">@(Model.Value)%</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,4 +100,8 @@ article { | |
top: 1rem; | ||
font-size: 0.8rem; | ||
|
||
} | ||
|
||
.progress { | ||
height: 1.5rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.