move goatcounter javascript to its own view or leptos does not accept it
This commit is contained in:
parent
ef2a46cdc3
commit
0f9fca5a3f
1 changed files with 12 additions and 7 deletions
|
|
@ -42,13 +42,7 @@ pub fn shell(title: &str, children: impl IntoAny) -> AnyView {
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
{stats().into_any()}
|
||||||
<script inner_html=r#"
|
|
||||||
window.goatcounter = {
|
|
||||||
path: function(p) { return location.host + p }
|
|
||||||
}
|
|
||||||
"#></script>
|
|
||||||
<script data-goatcounter="https://goatcounter.philt3r.eu/count" async src="https://goatcounter.philt3r.eu/count.js"></script>
|
|
||||||
</html>
|
</html>
|
||||||
}.into_any()
|
}.into_any()
|
||||||
}
|
}
|
||||||
|
|
@ -67,3 +61,14 @@ pub fn content_page(title: &str, children: impl IntoAny) -> AnyView {
|
||||||
)
|
)
|
||||||
.into_any()
|
.into_any()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn stats() -> impl IntoView {
|
||||||
|
view! {
|
||||||
|
<script inner_html=r#"
|
||||||
|
window.goatcounter = {
|
||||||
|
path: function(p) { return location.host + p }
|
||||||
|
};
|
||||||
|
"#></script>
|
||||||
|
<script data-goatcounter="https://goatcounter.philt3r.eu/count" async src="https://goatcounter.philt3r.eu/count.js"></script>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue