use crate::utils::types::{HTMLResult, RUMString, SharedAppState};
use crate::{rumtk_web_get_config, rumtk_web_render_html, RUMWebTemplate};
#[derive(RUMWebTemplate)]
#[template(
source = "
<meta charset='UTF-8'>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<meta name='viewport' content='width=device-width, initial-scale=1.0' />
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'/>
<meta name='description' content='{{description}}'>
<title>{{title}}</title>
<link rel='icon' type='image/png' href='/static/img/icon.png'>
",
ext = "html"
)]
pub struct Meta<'a> {
title: &'a str,
description: &'a str,
}
pub fn meta(state: SharedAppState) -> HTMLResult {
rumtk_web_render_html!(Meta {
title: rumtk_web_get_config!(state).title.as_str(),
description: rumtk_web_get_config!(state).description.as_str()
})
}