@using OliverBooth.Common.Data.Web.Users @using OliverBooth.Common.Services @using OliverBooth.Common.Data.Blog @inject IBlogPostService BlogPostService @inject IUserService UserService @inject ISessionService SessionService @{ HttpRequest request = Context.Request; var url = new Uri($"{request.Scheme}://{request.Host}{request.Path}{request.QueryString}"); var currentPage = ViewContext.RouteData.Values["page"]?.ToString(); SessionService.TryGetSession(request, out ISession? session); IUser? user = null; if (session is not null) { UserService.TryGetUser(session.UserId, out user); } } @if (ViewData["Title"] != null) { @ViewData["Title"] - Oliver Booth } else { Oliver Booth } @if (ViewData["Post"] is IBlogPost post) { string excerpt = BlogPostService.RenderExcerpt(post, out bool trimmed); } else { } @await RenderSectionAsync("Styles", required: false)
Oliver Booth

@RenderBody()
@await RenderSectionAsync("Scripts", required: false)