|
31 | 31 | @bind-Value="@model.Content"></MarkdownTextArea>
|
32 | 32 | <ValidationMessage For="() => model.Content"></ValidationMessage>
|
33 | 33 |
|
34 |
| - <div class="btn-group position-absolute bottom-0 end-0 m-5 extra-buttons"> |
35 |
| - <button class="btn btn-primary btn-outlined btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false"> |
36 |
| - More |
37 |
| - </button> |
38 |
| - <ul class="dropdown-menu"> |
39 |
| - @if (shortCodes.Count > 0) |
40 |
| - { |
41 |
| - <li> |
42 |
| - <button type="button" @onclick="OpenShortCodeDialog" class="dropdown-item"> |
43 |
| - <span>Get shortcode</span> |
44 |
| - </button> |
45 |
| - </li> |
46 |
| - } |
47 |
| - <li><button type="button" class="dropdown-item" @onclick="FeatureDialog.Open">Experimental Features</button></li> |
| 34 | + <div class="btn-group position-absolute bottom-0 end-0 m-5 extra-buttons"> |
| 35 | + <button class="btn btn-primary btn-outlined btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false"> |
| 36 | + More |
| 37 | + </button> |
| 38 | + <ul class="dropdown-menu"> |
| 39 | + @if (shortCodes.Count > 0) |
| 40 | + { |
| 41 | + <li> |
| 42 | + <button type="button" @onclick="OpenShortCodeDialog" class="dropdown-item"> |
| 43 | + <span>Get shortcode</span> |
| 44 | + </button> |
| 45 | + </li> |
| 46 | + } |
| 47 | + <li><button type="button" class="dropdown-item" @onclick="FeatureDialog.Open">Experimental Features</button></li> |
48 | 48 | <li><button id="convert" type="button" class="dropdown-item" @onclick="ConvertContent">@ConvertLabel <i class="lab"></i></button></li>
|
49 |
| - </ul> |
50 |
| - </div> |
51 |
| - </div> |
52 |
| - <div class="form-floating mb-3"> |
53 |
| - <InputText type="url" class="form-control" id="preview" placeholder="Preview-Url" @bind-Value="model.PreviewImageUrl" /> |
54 |
| - <label for="preview">Preview-Url</label> |
55 |
| - <small for="preview" class="form-text text-body-secondary">The primary image which will be used.</small> |
56 |
| - <ValidationMessage For="() => model.PreviewImageUrl"></ValidationMessage> |
57 |
| - </div> |
58 |
| - <div class="form-floating mb-3"> |
59 |
| - <InputText type="url" class="form-control" id="fallback-preview" placeholder="Fallback Preview-Url" @bind-Value="model.PreviewImageUrlFallback" /> |
60 |
| - <label for="fallback-preview">Fallback Preview-Url</label> |
61 |
| - <small for="fallback-preview" class="form-text text-body-secondary"> |
62 |
| - Optional: Used as a fallback if the preview image can't be used by the browser. |
63 |
| - <br>For example using a jpg or png as fallback for avif which is not supported in Safari or Edge. |
64 |
| - </small> |
65 |
| - <ValidationMessage For="() => model.PreviewImageUrlFallback"></ValidationMessage> |
66 |
| - </div> |
67 |
| - <div class="form-floating mb-3"> |
68 |
| - <InputDate Type="InputDateType.DateTimeLocal" class="form-control" id="scheduled" |
69 |
| - placeholder="Scheduled Publish Date" @bind-Value="model.ScheduledPublishDate" |
70 |
| - @bind-Value:after="@(() => model.IsPublished &= !IsScheduled)" /> |
71 |
| - <label for="scheduled">Scheduled Publish Date</label> |
72 |
| - <small for="scheduled" class="form-text text-body-secondary"> |
73 |
| - If set the blog post will be published at the given date. |
74 |
| - A blog post with a schedule date can't be set to published. |
75 |
| - </small> |
76 |
| - <ValidationMessage For="() => model.ScheduledPublishDate"></ValidationMessage> |
77 |
| - </div> |
78 |
| - <div class="form-check form-switch mb-3"> |
79 |
| - <InputCheckbox class="form-check-input" id="published" @bind-Value="model.IsPublished" /> |
80 |
| - <label class="form-check-label" for="published">Publish</label><br /> |
81 |
| - <small for="published" class="form-text text-body-secondary">If this blog post is only draft or it will be scheduled, uncheck the box.</small> |
82 |
| - <ValidationMessage For="() => model.IsPublished"></ValidationMessage> |
83 |
| - </div> |
84 |
| - <div class="form-floating mb-3"> |
85 |
| - <InputText type="text" class="form-control" id="tags" placeholder="Tags" @bind-Value="model.Tags" /> |
86 |
| - <label for="tags">Tags (Comma separated)</label> |
87 |
| - </div> |
88 |
| - @if (BlogPost is not null && !IsScheduled) |
89 |
| - { |
90 |
| - <div class="form-check form-switch mb-3"> |
91 |
| - <InputCheckbox class="form-check-input" id="updatedate" @bind-Value="model.ShouldUpdateDate" /> |
92 |
| - <label class="form-check-label" for="updatedate">Update Publish Date</label><br /> |
93 |
| - <small for="updatedate" class="form-text text-body-secondary"> |
94 |
| - If set the publish date is set to now, |
95 |
| - otherwise its original date. |
96 |
| - </small> |
97 |
| - </div> |
98 |
| - } |
99 |
| - <div class="mb-3"> |
100 |
| - <button class="btn btn-primary position-relative" type="submit" disabled="@(!canSubmit)">Submit</button> |
101 |
| - <div class="alert alert-info text-muted form-text mt-3 mb-3"> |
102 |
| - The first page of the blog is cached. Therefore, the blog post is not immediately visible. |
103 |
| - Head over to <a href="/settings">settings</a> to invalidate the cache or enable the checkmark. |
104 |
| - <br> |
105 |
| - The option should be enabled if you want to publish the blog post immediately and it should be visible on the first page. |
106 |
| - </div> |
107 |
| - <div class="form-check form-switch mb-3"> |
108 |
| - <InputCheckbox class="form-check-input" id="invalidate-cache" @bind-Value="model.ShouldInvalidateCache" /> |
109 |
| - <label class="form-check-label" for="invalidate-cache">Make it visible immediately</label><br /> |
110 |
| - </div> |
111 |
| - </div> |
112 |
| - </EditForm> |
| 49 | + </ul> |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + <div class="form-floating mb-3"> |
| 53 | + <InputText type="url" class="form-control" id="preview" placeholder="Preview-Url" @bind-Value="model.PreviewImageUrl"/> |
| 54 | + <label for="preview">Preview-Url</label> |
| 55 | + <small for="preview" class="form-text text-body-secondary">The primary image which will be used.</small> |
| 56 | + <ValidationMessage For="() => model.PreviewImageUrl"></ValidationMessage> |
| 57 | + </div> |
| 58 | + <div class="form-floating mb-3"> |
| 59 | + <InputText type="url" class="form-control" id="fallback-preview" placeholder="Fallback Preview-Url" @bind-Value="model.PreviewImageUrlFallback"/> |
| 60 | + <label for="fallback-preview">Fallback Preview-Url</label> |
| 61 | + <small for="fallback-preview" class="form-text text-body-secondary">Optional: Used as a fallback if the preview image can't be used by the browser. |
| 62 | + <br>For example using a jpg or png as fallback for avif which is not supported in Safari or Edge.</small> |
| 63 | + <ValidationMessage For="() => model.PreviewImageUrlFallback"></ValidationMessage> |
| 64 | + </div> |
| 65 | + <div class="form-floating mb-3"> |
| 66 | + <InputDate Type="InputDateType.DateTimeLocal" class="form-control" id="scheduled" |
| 67 | + placeholder="Scheduled Publish Date" @bind-Value="model.ScheduledPublishDate" |
| 68 | + @bind-Value:after="@(() => model.IsPublished &= !IsScheduled)"/> |
| 69 | + <label for="scheduled">Scheduled Publish Date</label> |
| 70 | + <small for="scheduled" class="form-text text-body-secondary">If set the blog post will be published at the given date. |
| 71 | + A blog post with a schedule date can't be set to published.</small> |
| 72 | + <ValidationMessage For="() => model.ScheduledPublishDate"></ValidationMessage> |
| 73 | + </div> |
| 74 | + <div class="form-check form-switch mb-3"> |
| 75 | + <InputCheckbox class="form-check-input" id="published" @bind-Value="model.IsPublished"/> |
| 76 | + <label class="form-check-label" for="published">Publish</label><br/> |
| 77 | + <small for="published" class="form-text text-body-secondary">If this blog post is only draft or it will be scheduled, uncheck the box.</small> |
| 78 | + <ValidationMessage For="() => model.IsPublished"></ValidationMessage> |
| 79 | + </div> |
| 80 | + <div class="form-floating mb-3"> |
| 81 | + <InputText type="text" class="form-control" id="tags" placeholder="Tags" @bind-Value="model.Tags"/> |
| 82 | + <label for="tags">Tags</label> |
| 83 | + </div> |
| 84 | + <div class="form-check form-switch mb-3"> |
| 85 | + <InputCheckbox class="form-check-input" id="members-only" @bind-Value="model.IsMembersOnly" /> |
| 86 | + <label class="form-check-label" for="members-only">Members only?</label><br/> |
| 87 | + <small for="updatedate" class="form-text text-body-secondary">The blog post can only be read by members.</small> |
| 88 | + </div> |
| 89 | + @if (BlogPost is not null && !IsScheduled) |
| 90 | + { |
| 91 | + <div class="form-check form-switch mb-3"> |
| 92 | + <InputCheckbox class="form-check-input" id="updatedate" @bind-Value="model.ShouldUpdateDate" /> |
| 93 | + <label class="form-check-label" for="updatedate">Update Publish Date</label><br/> |
| 94 | + <small for="updatedate" class="form-text text-body-secondary">If set the publish date is set to now, |
| 95 | + otherwise its original date.</small> |
| 96 | + </div> |
| 97 | + } |
| 98 | + <div class="mb-3"> |
| 99 | + <button class="btn btn-primary position-relative" type="submit" disabled="@(!canSubmit)">Submit</button> |
| 100 | + <div class="alert alert-info text-muted form-text mt-3 mb-3"> |
| 101 | + The first page of the blog is cached. Therefore, the blog post is not immediately visible. |
| 102 | + Head over to <a href="/settings">settings</a> to invalidate the cache or enable the checkmark. |
| 103 | + <br> |
| 104 | + The option should be enabled if you want to publish the blog post immediately and it should be visible on the first page. |
| 105 | + </div> |
| 106 | + <div class="form-check form-switch mb-3"> |
| 107 | + <InputCheckbox class="form-check-input" id="invalidate-cache" @bind-Value="model.ShouldInvalidateCache"/> |
| 108 | + <label class="form-check-label" for="invalidate-cache">Make it visible immediately</label><br/> |
| 109 | + </div> |
| 110 | + </div> |
| 111 | + </EditForm> |
113 | 112 | </div>
|
114 | 113 |
|
115 | 114 | <FeatureInfoDialog @ref="FeatureDialog"></FeatureInfoDialog>
|
|
0 commit comments