Notes/Views/Note/Index.cshtml

26 lines
693 B
Plaintext
Raw Normal View History

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