add meta theme-color
This commit is contained in:
parent
9fe91ebd2a
commit
2c55a5ac14
|
@ -522,3 +522,16 @@ fn test_twitter_cards() {
|
|||
frag.to_string()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_meta_theme() {
|
||||
use crate as axohtml;
|
||||
use crate::{dom::DOMTree, html};
|
||||
|
||||
let frag: DOMTree<String> = html!(<meta name="theme-color" content="#ff0000"/>);
|
||||
|
||||
assert_eq!(
|
||||
"<meta content=\"#ff0000\" name=\"theme-color\"/>",
|
||||
frag.to_string()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -254,6 +254,8 @@ pub enum Metadata {
|
|||
Robots,
|
||||
#[strum(to_string = "viewport")]
|
||||
Viewport,
|
||||
#[strum(to_string = "theme-color")]
|
||||
ThemeColor,
|
||||
// Twitter Social meta card tags -> https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup
|
||||
#[strum(to_string = "twitter:card")]
|
||||
TwitterCard,
|
||||
|
|
Loading…
Reference in New Issue