Notes/Views/Note/Index.cshtml

26 lines
693 B
Plaintext
Raw Normal View History

2023-05-12 16:38:13 +00:00
@model ContentModel
2022-11-29 15:14:15 +00:00
2023-05-12 16:38:13 +00:00
<textarea id="content" name="content" spellcheck="false">@Model.Text</textarea>
<div class="note-names">
2023-05-18 01:44:41 +00:00
@foreach (var note in Model.NoteNames.Order())
2023-05-12 16:38:13 +00:00
{
2023-05-18 01:44:41 +00:00
var css = note.Equals(Model.CurrentNote, StringComparison.OrdinalIgnoreCase) ? "current" : null;
<a href="@note" class="@css">@note</a>
2023-05-12 16:38:13 +00:00
}
</div>
2022-12-01 02:33:41 +00:00
2023-02-01 02:18:57 +00:00
<div class="toast" id="saved-indicator">Saved</div>
<div class="toast" id="update-indicator">Updated</div>
@section Scripts
{
<script>
2024-01-05 18:46:01 +00:00
var noteName = '@Model.CurrentNote';
</script>
2024-01-07 02:15:50 +00:00
<script src="~/lib/signalr/dist/browser/signalr.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
}