Add PageNoteButton to various components for enhanced note management
This commit is contained in:
@@ -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}";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user