posts: more work on rought draft

This commit is contained in:
Stevan Freeborn
2024-11-11 16:07:42 -06:00
parent 284c8d5d7a
commit e60f7c9afb
12 changed files with 215 additions and 12 deletions
+15 -2
View File
@@ -23,14 +23,27 @@
{
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-5JM0TZTRHF');
</script>
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<noscript><img src="https://queue.simpleanalyticscdn.com/noscript.gif" alt="" referrerpolicy="no-referrer-when-downgrade" /></noscript>
<noscript><img src="https://queue.simpleanalyticscdn.com/noscript.gif" alt=""
referrerpolicy="no-referrer-when-downgrade" /></noscript>
}
<script src="_framework/blazor.web.js"></script>
<script>
// NOTE: This is a workaround for the issue with FocusOnNavigate in Blazor
// not playing nicely with static site generation.
// read more here: https://github.com/dotnet/aspnetcore/issues/52412
window.Blazor.addEventListener("enhancedload", () => {
if (window.location.pathname === "/") {
return;
}
window.scroll({ top: 0, left: 0, behavior: 'instant' });
});
</script>
</body>
</html>
+3 -8
View File
@@ -17,12 +17,7 @@ else
<HeadContent>
<meta name="description" content="@description">
<OpenGraph
PageTitle="@title"
Description="@description"
Type="article"
Image="@BlogPost.OpenGraphImage"
/>
<OpenGraph PageTitle="@title" Description="@description" Type="article" Image="@BlogPost.OpenGraphImage" />
<link rel="stylesheet" href="markdown.css">
<link rel="stylesheet" href="prism.css">
</HeadContent>
@@ -40,9 +35,9 @@ else
<PageScript Src="./Components/Pages/Post.razor.js" />
}
@code
@code
{
[Parameter]
[Parameter]
public string Slug { get; set; } = string.Empty;
private PostWithContent? BlogPost;