Skip to main content

sevenmark_html/
classes.rs

1//! CSS class name constants for SevenMark HTML rendering
2//!
3//! All class names use the `sm-` prefix for namespacing.
4//! Frontend CSS should target these classes for styling.
5
6pub const FOOTNOTE_LIST: &str = "sm-footnotes";
7
8// Headers
9pub const HEADER: &str = "sm-header";
10pub const HEADER_1: &str = "sm-h1";
11pub const HEADER_2: &str = "sm-h2";
12pub const HEADER_3: &str = "sm-h3";
13pub const HEADER_4: &str = "sm-h4";
14pub const HEADER_5: &str = "sm-h5";
15pub const HEADER_6: &str = "sm-h6";
16
17// Text formatting
18pub const BOLD: &str = "sm-bold";
19pub const ITALIC: &str = "sm-italic";
20pub const STRIKETHROUGH: &str = "sm-strike";
21pub const UNDERLINE: &str = "sm-underline";
22pub const SUPERSCRIPT: &str = "sm-sup";
23pub const SUBSCRIPT: &str = "sm-sub";
24
25// Block elements
26pub const BLOCKQUOTE: &str = "sm-blockquote";
27pub const FOLD: &str = "sm-fold";
28pub const FOLD_SUMMARY: &str = "sm-fold-summary";
29pub const STYLED: &str = "sm-styled";
30pub const LITERAL: &str = "sm-literal";
31
32// Code and TeX
33pub const CODE: &str = "sm-code";
34pub const CODE_INLINE: &str = "sm-code-inline";
35pub const CODE_BLOCK: &str = "sm-code-block";
36pub const TEX: &str = "sm-tex";
37pub const TEX_INLINE: &str = "sm-tex-inline";
38pub const TEX_BLOCK: &str = "sm-tex-block";
39
40// Lists
41pub const LIST: &str = "sm-list";
42pub const LIST_ORDERED: &str = "sm-list-ordered";
43pub const LIST_UNORDERED: &str = "sm-list-unordered";
44
45// Tables
46pub const TABLE_WRAPPER: &str = "sm-table-wrapper";
47pub const TABLE: &str = "sm-table";
48
49// Media
50pub const MEDIA: &str = "sm-media";
51pub const MEDIA_IMAGE: &str = "sm-image";
52pub const MEDIA_IMAGE_BROKEN: &str = "sm-image-broken";
53pub const MEDIA_LINK: &str = "sm-link";
54pub const MEDIA_LINK_INVALID: &str = "sm-link-invalid";
55
56// External Media Embeds
57pub const EMBED: &str = "sm-embed";
58pub const EMBED_YOUTUBE: &str = "sm-embed-youtube";
59pub const EMBED_VIMEO: &str = "sm-embed-vimeo";
60pub const EMBED_NICOVIDEO: &str = "sm-embed-nicovideo";
61pub const EMBED_SPOTIFY: &str = "sm-embed-spotify";
62pub const EMBED_DISCORD: &str = "sm-embed-discord";
63
64// Footnotes
65pub const FOOTNOTE: &str = "sm-footnote";
66pub const FOOTNOTE_REF: &str = "sm-fn-ref";
67pub const FOOTNOTE_CONTENT: &str = "sm-fn-content";
68pub const FOOTNOTE_BACK: &str = "sm-fn-back";
69/// Footnote ID prefix (e.g., "fn1", "fn2")
70pub const FOOTNOTE_ID_PREFIX: &str = "fn";
71/// Footnote reference ID prefix (e.g., "rn1", "rn2")
72pub const FOOTNOTE_REF_ID_PREFIX: &str = "rn";
73
74// Section structure
75pub const SECTION: &str = "sm-section";
76pub const SECTION_FOLDED: &str = "sm-folded";
77pub const SECTION_CONTENT: &str = "sm-section-content";
78pub const SECTION_PATH: &str = "sm-section-path";
79pub const HEADER_CONTENT: &str = "sm-header-content";
80pub const EDIT_LINK: &str = "sm-edit-link";
81/// Section ID prefix (e.g., "s-1", "s-1.1")
82pub const SECTION_ID_PREFIX: &str = "s-";
83
84// Ruby
85pub const RUBY: &str = "sm-ruby";
86
87// Macros (client-rendered)
88pub const AGE: &str = "sm-age";
89pub const TIMENOW: &str = "sm-timenow";
90
91// Variables
92pub const VARIABLE: &str = "sm-variable";
93
94// Mentions
95pub const MENTION_USER: &str = "sm-mention-user";
96pub const MENTION_DISCUSSION: &str = "sm-mention-discussion";
97
98// Include
99pub const INCLUDE: &str = "sm-include";
100
101// Errors
102pub const ERROR: &str = "sm-error";