Add PageNoteButton to various components for enhanced note management

This commit is contained in:
2026-01-17 10:25:38 -05:00
parent 947d95893f
commit e6eb35ee67
15 changed files with 69 additions and 19 deletions
+12
View File
@@ -92,4 +92,16 @@ public static class MarkdownHelper
return plainText;
}
/// <summary>
/// Gets the CSS class name for a note's color based on its ID.
/// Uses modulo 3 to cycle through 3 pastel color classes.
/// </summary>
/// <param name="noteId">The note ID.</param>
/// <returns>CSS class name (e.g., "note-color-0", "note-color-1", "note-color-2"), or empty string if noteId is 0.</returns>
public static string GetNoteColorClass(int noteId)
{
if (noteId == 0) return string.Empty;
return $"note-color-{noteId % 3}";
}
}