Notes/Views/Note/Index.cshtml
2024-01-06 21:15:50 -05:00

26 lines
693 B
Plaintext

@model ContentModel
<textarea id="content" name="content" spellcheck="false">@Model.Text</textarea>
<div class="note-names">
@foreach (var note in Model.NoteNames.Order())
{
var css = note.Equals(Model.CurrentNote, StringComparison.OrdinalIgnoreCase) ? "current" : null;
<a href="@note" class="@css">@note</a>
}
</div>
<div class="toast" id="saved-indicator">Saved</div>
<div class="toast" id="update-indicator">Updated</div>
@section Scripts
{
<script>
var noteName = '@Model.CurrentNote';
</script>
<script src="~/lib/signalr/dist/browser/signalr.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
}