Skip to content

Commit 0ba4921

Browse files
committed
Feature info in own component
1 parent efb7540 commit 0ba4921

File tree

3 files changed

+26
-15
lines changed

3 files changed

+26
-15
lines changed

LinkDotNet.Blog.Web/Shared/Admin/CreateNewBlogPost.razor

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,8 @@
6161
</div>
6262
</div>
6363
</div>
64+
<FeatureInfoDialog @ref="FeatureDialog"></FeatureInfoDialog>
6465

65-
<ModalDialog @ref="FeatureDialog" Title="Additional Features">
66-
<p>Here you will find a comprehensive list over feature you can use additional to classic markdown</p>
67-
<p>Features marked with <i class="fas fa-flask"></i> are experimental and can change heavily, get removed or the usage changes.</p>
68-
<p>Use with caution and check the changelog</p>
69-
<hr>
70-
<h3 style="display:inline-block">Slide-Show</h3><i class="fas fa-flask"></i>
71-
<p>Will create a slide-show with images specified by the tag.</p>
72-
<strong>Usage:</strong>
73-
<code><pre>&lt;slide-show&gt;
74-
&lt;slide-show-image src="https://picsum.photos/600/200" title="Title 1"&gt;&lt;/slide-show-image&gt;
75-
&lt;slide-show-image src="https://picsum.photos/500/200" title="Title 2"&gt;&lt;/slide-show-image&gt;
76-
&lt;slide-show-image src="https://picsum.photos/550/200" title="Title 3"&gt;&lt;/slide-show-image&gt;
77-
&lt;/slide-show&gt;</pre></code>
78-
</ModalDialog>
7966
@code {
8067
[Parameter]
8168
public BlogPost BlogPost { get; set; }
@@ -89,7 +76,7 @@
8976
[Parameter]
9077
public bool ClearAfterCreated { get; set; } = true;
9178

92-
private ModalDialog FeatureDialog { get; set; }
79+
private FeatureInfoDialog FeatureDialog { get; set; }
9380

9481
private CreateNewModel model = new();
9582

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<ModalDialog @ref="FeatureDialog" Title="Additional Features">
2+
<p>Here you will find a comprehensive list over feature you can use additional to classic markdown</p>
3+
<p>Features marked with <i class="fas fa-flask"></i> are experimental and can change heavily, get removed or the usage changes.</p>
4+
<p>Use with caution and check the changelog</p>
5+
<hr>
6+
<h3 style="display:inline-block">Slide-Show</h3><i class="fas fa-flask"></i>
7+
<p>Will create a slide-show with images specified by the tag.</p>
8+
<strong>Usage:</strong>
9+
<code><pre>&lt;slide-show&gt;
10+
&lt;slide-show-image src="https://picsum.photos/600/200" title="Title 1"&gt;&lt;/slide-show-image&gt;
11+
&lt;slide-show-image src="https://picsum.photos/500/200" title="Title 2"&gt;&lt;/slide-show-image&gt;
12+
&lt;slide-show-image src="https://picsum.photos/550/200" title="Title 3"&gt;&lt;/slide-show-image&gt;
13+
&lt;/slide-show&gt;</pre></code>
14+
</ModalDialog>
15+
16+
@code {
17+
private ModalDialog FeatureDialog { get; set; }
18+
19+
public void Open()
20+
{
21+
FeatureDialog.Open();
22+
}
23+
}

LinkDotNet.Blog.Web/Shared/ModalDialog.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
modalDisplay = "block";
3636
modalClass = "show";
3737
showBackdrop = true;
38+
StateHasChanged();
3839
}
3940

4041
public void Close()

0 commit comments

Comments
 (0)