Update css post + Add languages for highlight.min.js + Add mermaid
This commit is contained in:
parent
a31fa68e84
commit
9aa0c5a929
5 changed files with 2095 additions and 8 deletions
|
@ -14,13 +14,24 @@ pub fn App() -> impl IntoView {
|
|||
<Stylesheet id="leptos" href="/pkg/portfolio.css"/>
|
||||
<Link rel="shortcut icon" type_="image/ico" href="/favicon.ico"/>
|
||||
<Link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark-dimmed.min.css"/>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
||||
<script src="/js/highlight.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
|
||||
<Router>
|
||||
<Routes>
|
||||
<Route path="" view=pages::Home/>
|
||||
<Route path="posts" view=pages::PostList/>
|
||||
<Route path="posts/:slug" view=|| view! {
|
||||
<script>hljs.highlightAll();</script>
|
||||
<script>
|
||||
r#"
|
||||
document.onreadystatechange = () => {
|
||||
if (document.readyState === "complete") {
|
||||
hljs.highlightAll();
|
||||
mermaid.initialize();
|
||||
mermaid.run({ querySelector: ".language-mermaid" });
|
||||
}
|
||||
};
|
||||
"#
|
||||
</script>
|
||||
<pages::PostElement/>
|
||||
}/>
|
||||
</Routes>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue