2023-08-14 00:57:46 +01:00
|
|
|
@using OliverBooth.Data.Blog
|
2024-02-25 15:57:59 +00:00
|
|
|
@using OliverBooth.Data.Web
|
2023-08-14 00:57:46 +01:00
|
|
|
@using OliverBooth.Services
|
|
|
|
@inject IBlogPostService BlogPostService
|
2024-02-25 15:57:59 +00:00
|
|
|
@inject IUserService UserService
|
|
|
|
@inject ISessionService SessionService
|
|
|
|
|
2023-08-14 00:57:46 +01:00
|
|
|
@{
|
|
|
|
HttpRequest request = Context.Request;
|
|
|
|
var url = new Uri($"{request.Scheme}://{request.Host}{request.Path}{request.QueryString}");
|
|
|
|
}
|
2023-08-05 23:27:50 +01:00
|
|
|
<!DOCTYPE html>
|
2023-08-06 13:54:34 +01:00
|
|
|
<html lang="en" data-bs-theme="dark">
|
2023-08-05 23:27:50 +01:00
|
|
|
<head>
|
2023-08-14 00:56:45 +01:00
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<meta name="color-scheme" content="dark">
|
2023-09-26 17:35:16 +01:00
|
|
|
<meta name="theme-color" content="#007EC6">
|
2023-09-26 20:40:03 +01:00
|
|
|
<meta property="og:image" content="@Url.Content("~/img/favicon.png")">
|
|
|
|
<meta property="twitter:image" content="@Url.Content("~/img/favicon.png")">
|
|
|
|
<meta property="og:url" content="@url">
|
|
|
|
<meta property="twitter:url" content="@url">
|
|
|
|
<meta property="twitter:card" content="summary">
|
2023-08-11 02:08:18 +01:00
|
|
|
@if (ViewData["Title"] != null)
|
|
|
|
{
|
|
|
|
<title>@ViewData["Title"] - Oliver Booth</title>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<title>Oliver Booth</title>
|
|
|
|
}
|
2023-08-14 00:57:46 +01:00
|
|
|
@if (ViewData["Post"] is IBlogPost post)
|
|
|
|
{
|
2024-02-25 15:58:21 +00:00
|
|
|
string excerpt = BlogPostService.RenderExcerpt(post, out _);
|
2023-08-14 00:57:46 +01:00
|
|
|
<meta name="title" content="@post.Title">
|
|
|
|
<meta name="description" content="@excerpt">
|
|
|
|
<meta property="og:title" content="@post.Title">
|
|
|
|
<meta property="og:description" content="@excerpt">
|
|
|
|
<meta property="og:type" content="article">
|
|
|
|
<meta property="twitter:title" content="@post.Title">
|
2023-09-26 17:33:59 +01:00
|
|
|
<meta property="twitter:creator" content="@post.Author.DisplayName">
|
2023-08-14 00:57:46 +01:00
|
|
|
<meta property="twitter:description" content="@excerpt">
|
2023-09-26 20:40:03 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<meta name="title" content="@(ViewData["Title"] != null ? $"{ViewData["Title"]} - Oliver Booth" : "Oliver Booth")">
|
|
|
|
<meta name="description" content="Coffee enthusiast and lover of all things tech. Tech enthusiast and lover of all things coffee.">
|
|
|
|
<meta property="og:title" content="@(ViewData["Title"] != null ? $"{ViewData["Title"]} - Oliver Booth" : "Oliver Booth")">
|
|
|
|
<meta property="og:description" content="Coffee enthusiast and lover of all things tech. Tech enthusiast and lover of all things coffee.">
|
|
|
|
<meta property="twitter:title" content="@(ViewData["Title"] != null ? $"{ViewData["Title"]} - Oliver Booth" : "Oliver Booth")">
|
|
|
|
<meta property="twitter:description" content="Coffee enthusiast and lover of all things tech. Tech enthusiast and lover of all things coffee.">
|
2023-08-14 00:57:46 +01:00
|
|
|
}
|
2023-08-12 20:30:10 +01:00
|
|
|
<link rel="shortcut icon" href="/img/favicon.png" asp-append-version="true">
|
2023-08-05 23:27:50 +01:00
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.1/css/bootstrap.min.css" integrity="sha512-Z/def5z5u2aR89OuzYcxmDJ0Bnd5V1cKqBEbvLOiUNWdg9PQeXVvXLI90SE4QOHGlfLqUnDNVAYyZi8UwUTmWQ==" crossorigin="anonymous" referrerpolicy="no-referrer">
|
2023-08-08 00:31:15 +01:00
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" integrity="sha512-7nTa5CnxbzfQgjQrNmHXB7bxGTUVO/DcYX6rpgt06MkzM0rVXP3EYCv/Ojxg5H0dKbY7llbbYaqgfZjnGOAWGA==" crossorigin="anonymous" referrerpolicy="no-referrer">
|
2023-08-11 13:52:43 +01:00
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer">
|
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" integrity="sha512-c42qTSw/wPZ3/5LBzD+Bw5f7bSF2oxou6wEb+I/lqeaKV5FDIfMvvRp772y4jcJLKuGUOpbJMdg/BTl50fJYAw==" crossorigin="anonymous" referrerpolicy="no-referrer">
|
2023-08-05 23:27:50 +01:00
|
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
|
|
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@100;400;700&display=swap" rel="stylesheet">
|
|
|
|
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;700&display=swap" rel="stylesheet">
|
2023-10-03 22:12:29 +01:00
|
|
|
<link href="https://fonts.googleapis.com/css2?family=Gabarito:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
|
2023-08-12 20:30:10 +01:00
|
|
|
<link rel="stylesheet" href="~/css/prism.min.css" asp-append-version="true">
|
2023-08-08 00:30:43 +01:00
|
|
|
<link rel="stylesheet" href="~/css/prism.vs.min.css" asp-append-version="true">
|
2023-08-12 20:30:10 +01:00
|
|
|
<link rel="stylesheet" href="~/css/app.min.css" asp-append-version="true">
|
2023-12-24 12:20:03 +00:00
|
|
|
<link rel="stylesheet" href="~/css/ribbon.min.css" asp-append-version="true">
|
2024-02-25 15:54:58 +00:00
|
|
|
@await RenderSectionAsync("Styles", required: false)
|
2023-08-05 23:27:50 +01:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header class="container" style="margin-top: 20px;">
|
|
|
|
<div id="site-title" class="text-center">
|
|
|
|
<h1>
|
|
|
|
<a href="/"><img src="~/img/ob-256x256.png" alt="Oliver Booth" height="128"> Oliver Booth</a>
|
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
<nav>
|
|
|
|
<ul class="site-nav">
|
|
|
|
<li>
|
2023-08-16 14:08:33 +01:00
|
|
|
<a asp-page="/Index">About</a>
|
2023-08-05 23:27:50 +01:00
|
|
|
</li>
|
|
|
|
<li>
|
2023-08-16 14:08:33 +01:00
|
|
|
<a asp-page="/Blog/Index">Blog</a>
|
2023-08-05 23:27:50 +01:00
|
|
|
</li>
|
|
|
|
<li>
|
2023-08-16 14:08:33 +01:00
|
|
|
<a asp-page="/Tutorials/Index">Tutorials</a>
|
2023-08-05 23:27:50 +01:00
|
|
|
</li>
|
|
|
|
<li>
|
2023-08-16 14:08:33 +01:00
|
|
|
<a asp-page="/Projects/Index">Projects</a>
|
2023-08-05 23:27:50 +01:00
|
|
|
</li>
|
|
|
|
<li>
|
2023-08-16 14:08:33 +01:00
|
|
|
<a asp-page="/Contact/Index">Contact</a>
|
2023-08-05 23:27:50 +01:00
|
|
|
</li>
|
|
|
|
<li>
|
2023-08-16 14:08:33 +01:00
|
|
|
<a asp-page="/Donate">Donate</a>
|
2023-08-05 23:27:50 +01:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2023-08-06 02:26:45 +01:00
|
|
|
|
|
|
|
<div style="margin:50px 0;"></div>
|
|
|
|
|
2024-02-23 05:04:50 +00:00
|
|
|
@if (DateTimeOffset.UtcNow < new DateTime(2024, 03, 08))
|
|
|
|
{
|
|
|
|
<div id="usa-countdown" class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-3 usa-countdown-element" id="usa-countdown-days">00</div>
|
|
|
|
<div class="col-3 usa-countdown-element" id="usa-countdown-hours">00</div>
|
|
|
|
<div class="col-3 usa-countdown-element" id="usa-countdown-minutes">00</div>
|
|
|
|
<div class="col-3 usa-countdown-element" id="usa-countdown-seconds">00</div>
|
|
|
|
</div>
|
2024-02-21 18:27:32 +00:00
|
|
|
</div>
|
2024-02-23 05:04:50 +00:00
|
|
|
}
|
2024-02-19 22:44:28 +00:00
|
|
|
|
|
|
|
<div style="margin:50px 0;"></div>
|
|
|
|
|
2023-08-05 23:27:50 +01:00
|
|
|
<div class="container">
|
|
|
|
<main role="main" class="pb-3">
|
|
|
|
@RenderBody()
|
|
|
|
</main>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<footer class="footer text-muted">
|
|
|
|
<div class="container text-center">
|
2023-09-25 19:56:00 +01:00
|
|
|
<hr>
|
|
|
|
|
2023-09-24 16:44:36 +01:00
|
|
|
<ul class="footer-nav">
|
2023-09-25 19:56:00 +01:00
|
|
|
<li><a title="@("@oliver@mastodon.olivr.me")" href="https://mastodon.olivr.me/@@oliver" rel="me" class="brand-mastodon"><i class="fa-brands fa-mastodon"></i></a></li>
|
|
|
|
<li><a title="LinkedIn/oliverlukebooth" href="https://www.linkedin.com/in/oliverlukebooth/" class="brand-linkedin"><i class="fa-brands fa-linkedin"></i></a></li>
|
|
|
|
<li><a title="Blog RSS Feed" asp-controller="Rss" asp-action="OnGet"><i class="fa-solid fa-rss text-orange"></i></a></li>
|
|
|
|
<li><a title="View Source" href="https://git.oliverbooth.dev/oliverbooth/oliverbooth.dev"><i class="fa-solid fa-code"></i></a></li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<ul class="footer-nav" style="margin-top: 20px;">
|
2023-09-24 16:44:36 +01:00
|
|
|
<li>© @DateTime.UtcNow.Year</li>
|
|
|
|
<li><a asp-page="/privacy/index">Privacy</a></li>
|
2024-02-25 15:57:59 +00:00
|
|
|
@if (SessionService.TryGetSession(Context.Request, out ISession? session) &&
|
|
|
|
UserService.TryGetUser(session.UserId, out _))
|
|
|
|
{
|
|
|
|
<li><a asp-page="/admin/index">Dashboard</a></li>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<li><a asp-page="/admin/login">Login</a></li>
|
|
|
|
}
|
2023-09-24 16:44:36 +01:00
|
|
|
</ul>
|
2023-08-05 23:27:50 +01:00
|
|
|
</div>
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.1/js/bootstrap.bundle.min.js" integrity="sha512-ToL6UYWePxjhDQKNioSi4AyJ5KkRxY+F1+Fi7Jgh0Hp5Kk2/s8FD7zusJDdonfe5B00Qw+B8taXxF6CFLnqNCw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
2023-08-08 00:31:15 +01:00
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.js" integrity="sha512-aoZChv+8imY/U1O7KIHXvO87EOzCuKO0GhFtpD6G2Cyjo/xPeTgdf3/bchB10iB+AojMTDkMHDPLKNxPJVqDcw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
2023-08-08 21:01:31 +01:00
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/js/all.min.js" integrity="sha512-uKQ39gEGiyUJl4AI6L+ekBdGKpGw4xJ55+xyJG7YFlJokPNYegn9KwQ3P8A7aFQAUtUsAQHep+d/lrGqrbPIDQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
2023-08-10 14:08:35 +01:00
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.7.8/handlebars.min.js" integrity="sha512-E1dSFxg+wsfJ4HKjutk/WaCzK7S2wv1POn1RRPGh8ZK+ag9l244Vqxji3r6wgz9YBf6+vhQEYJZpSjqWFPg9gg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
2023-08-10 16:16:29 +01:00
|
|
|
<script src="~/js/prism.min.js" asp-append-version="true" data-manual></script>
|
2023-08-05 23:27:50 +01:00
|
|
|
<script src="~/js/app.min.js" asp-append-version="true"></script>
|
|
|
|
|
2023-08-11 02:06:31 +01:00
|
|
|
<script id="loading-spinner-template" type="text/x-handlebars-template">
|
|
|
|
@await Html.PartialAsync("_LoadingSpinner")
|
|
|
|
</script>
|
|
|
|
|
2023-08-05 23:27:50 +01:00
|
|
|
@await RenderSectionAsync("Scripts", required: false)
|
|
|
|
</body>
|
|
|
|
</html>
|