221 lines
10 KiB
Plaintext
221 lines
10 KiB
Plaintext
@model CatherineLynwood.Models.Blog
|
||
@using System.Text.RegularExpressions
|
||
|
||
@{
|
||
ViewData["Title"] = $"{Model.Title}";
|
||
}
|
||
<div class="row">
|
||
<div class="col-12">
|
||
<partial name="_Breadcrumb" model="Model" />
|
||
</div>
|
||
</div>
|
||
<article>
|
||
@if (Model.ShowThanks)
|
||
{
|
||
<div class="row">
|
||
<div class="col-12">
|
||
<div class="alert alert-success alert-dismissible fade show">
|
||
<strong class="alert-heading">Success!</strong><button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button><br />
|
||
<p>
|
||
Your comments have been submitted and are awaiting approval. Thank you for your feedback.
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
}
|
||
<div class="row">
|
||
<div class="col-12">
|
||
<header>
|
||
<h1 class="d-inline-block">@Model.Title</h1> <h2 class="h1 d-inline-block">@Model.SubTitle</h2>
|
||
<p>Posted on @Model.PublishDate.ToString("MMMM d, yyyy") by Catherine Lynwood</p>
|
||
</header>
|
||
</div>
|
||
</div>
|
||
@if (!string.IsNullOrWhiteSpace(Model.AudioTranscriptUrl))
|
||
{
|
||
<div class="row justify-content-center p-3">
|
||
<div class="col-auto">
|
||
<audio controls>
|
||
<source src="/audio/@Model.AudioTranscriptUrl" type="audio/mpeg">
|
||
Your browser does not support the audio element.
|
||
</audio>
|
||
</div>
|
||
</div>
|
||
}
|
||
|
||
<div class="row">
|
||
|
||
<div class="col-md-12">
|
||
@if (Model.BlogImages.Count > 0)
|
||
{
|
||
<div class="float-md-start w-md-50">
|
||
<div id="carouselExampleCaptions" class="carousel slide px-3 pb-3" data-bs-ride="false">
|
||
<div class="carousel-indicators">
|
||
@{
|
||
int i = 0;
|
||
|
||
foreach (var image in Model.BlogImages)
|
||
{
|
||
if (image == Model.BlogImages.First())
|
||
{
|
||
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="@i" class="active" aria-current="true" aria-label="Slide @(i + 1)"></button>
|
||
}
|
||
else
|
||
{
|
||
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="@i" aria-label="Slide @(i + 1)"></button>
|
||
}
|
||
|
||
i++;
|
||
}
|
||
}
|
||
|
||
</div>
|
||
<div class="carousel-inner">
|
||
@foreach (var image in Model.BlogImages)
|
||
{
|
||
if (image == Model.BlogImages.First())
|
||
{
|
||
<div class="carousel-item active">
|
||
<responsive-image src="@image.ImageUrl" alt="@image.ImageCaption" class="d-block w-100 rounded-5 border border-3 border-dark shadow-lg" display-width-percentage="50"></responsive-image>
|
||
<div class="carousel-caption d-none d-md-block">
|
||
<p class="h5">@image.ImageCaption</p>
|
||
<p>@image.ImageText</p>
|
||
</div>
|
||
</div>
|
||
}
|
||
else
|
||
{
|
||
<div class="carousel-item">
|
||
<responsive-image src="@image.ImageUrl" alt="@image.ImageCaption" class="d-block w-100 rounded-5 border border-3 border-dark shadow-lg" display-width-percentage="50"></responsive-image>
|
||
<div class="carousel-caption d-none d-md-block">
|
||
<h5>@image.ImageCaption</h5>
|
||
<p>@image.ImageText</p>
|
||
</div>
|
||
</div>
|
||
};
|
||
}
|
||
|
||
</div>
|
||
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide="prev">
|
||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||
<span class="visually-hidden">Previous</span>
|
||
</button>
|
||
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide="next">
|
||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||
<span class="visually-hidden">Next</span>
|
||
</button>
|
||
</div>
|
||
</div>
|
||
}
|
||
@if (!string.IsNullOrWhiteSpace(Model.ContentTop))
|
||
{
|
||
@Html.Raw(Model.ContentTop)
|
||
}
|
||
@if (!string.IsNullOrWhiteSpace(Model.AudioTeaserUrl))
|
||
{
|
||
<div class="row justify-content-center bg-white text-dark rounded-3 p-3">
|
||
<div class="col-auto">
|
||
<audio controls>
|
||
<source src="/audio/@Model.AudioTeaserUrl" type="audio/mpeg">
|
||
Your browser does not support the audio element.
|
||
</audio>
|
||
</div>
|
||
@if (!string.IsNullOrWhiteSpace(Model.AudioTeaserText))
|
||
{
|
||
<div class="col-12" style="max-height: 120px; overflow-y: auto;">
|
||
@Html.Raw(Model.AudioTeaserText)
|
||
</div>
|
||
}
|
||
</div>
|
||
}
|
||
@if (!string.IsNullOrWhiteSpace(Model.ContentBottom))
|
||
{
|
||
@Html.Raw(Model.ContentBottom)
|
||
}
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row">
|
||
<div class="col-12">
|
||
@await Component.InvokeAsync("BlogCommentComponent", new { BlogID = Model.BlogID })
|
||
</div>
|
||
</div>
|
||
</article>
|
||
|
||
@section Meta {
|
||
<meta name="description" content="Explore the blog of Catherine Lynwood, author of *The Alpha Flame*, for updates, insights, and behind-the-scenes stories. Follow Catherine’s journey as a writer, discover inspiration for her novels, and delve into discussions on women’s fiction, mystery, and family secrets.">
|
||
<meta name="keywords" content="Catherine Lynwood blog, The Alpha Flame updates, women’s fiction blog, author Catherine Lynwood insights, mystery novel blog, family secrets stories, strong female protagonists, 1980s fiction blog, book updates and stories, author’s journey blog, Catherine Lynwood writing process">
|
||
<meta name="author" content="Catherine Lynwood">
|
||
|
||
@functions {
|
||
public static string StripHtml(string input)
|
||
{
|
||
return string.IsNullOrWhiteSpace(input) ? string.Empty : Regex.Replace(input, "<.*?>", string.Empty);
|
||
}
|
||
}
|
||
|
||
@{
|
||
string blogUrl = $"https://www.catherinelynwood.com/{Model.BlogUrl}";
|
||
string imageUrl = $"https://www.catherinelynwood.com/images/webp/{Model.DefaultWebpImage}";
|
||
string description = $"Listen to my new blog entry: {Model.Title} by Catherine Lynwood";
|
||
|
||
var contentTopPlainText = StripHtml(Model.ContentTop);
|
||
var contentBottomPlainText = StripHtml(Model.ContentBottom);
|
||
|
||
var blogPostJsonLd = $@"
|
||
{{
|
||
""@context"": ""https://schema.org"",
|
||
""@type"": ""BlogPosting"",
|
||
""headline"": ""{Model.Title}"",
|
||
""datePublished"": ""{Model.PublishDate:yyyy-MM-dd}"",
|
||
""author"": {{
|
||
""@type"": ""Person"",
|
||
""name"": ""Catherine Lynwood""
|
||
}},
|
||
""description"": ""{Model.IndexText}"",
|
||
""articleBody"": ""{contentTopPlainText} {contentBottomPlainText}"",
|
||
""url"": ""https://www.catherinelynwood.com/the-alpah-flame/blog/{Model.BlogUrl}"",
|
||
""image"": {{
|
||
""@type"": ""ImageObject"",
|
||
""url"": ""https://www.catherinelynwood.com/images/webp/{Model.DefaultWebpImage}"",
|
||
""description"": ""{Model.ImageDescription}""
|
||
}},
|
||
""interactionStatistic"": {{
|
||
""@type"": ""InteractionCounter"",
|
||
""interactionType"": {{
|
||
""@type"": ""http://schema.org/LikeAction""
|
||
}},
|
||
""userInteractionCount"": {Model.Likes}
|
||
}}
|
||
}}";
|
||
}
|
||
|
||
<meta property="og:title" content="The Alpha Flame by Catherine Lynwood" />
|
||
<meta property="og:description" content="@Model.IndexText" />
|
||
<meta property="og:type" content="article" />
|
||
<meta property="og:url" content="@blogUrl" />
|
||
<meta property="og:image" content="@imageUrl" />
|
||
<meta property="og:image:alt" content="@Model.ImageAlt" />
|
||
<meta property="og:site_name" content="Catherine Lynwood - The Alpha Flame" />
|
||
<meta property="article:author" content="https://www.catherinelynwood.com" />
|
||
<meta property="article:published_time" content="2024-11-19" />
|
||
<meta property="article:modified_time" content="2024-11-19" />
|
||
|
||
<meta name="twitter:card" content="player">
|
||
<meta name="twitter:title" content="@Model.Title" />
|
||
<meta name="twitter:description" content="@description">
|
||
<meta name="twitter:site" content="@@CathLynwood" />
|
||
<meta name="twitter:creator" content="@@CathLynwood" />
|
||
<meta name="twitter:image" content="@imageUrl" />
|
||
<meta name="twitter:image:alt" content="@Model.ImageAlt" />
|
||
<meta name="twitter:player" content="@blogUrl">
|
||
<meta name="twitter:player:width" content="480">
|
||
<meta name="twitter:player:height" content="80">
|
||
|
||
<script type="application/ld+json">
|
||
@Html.Raw(blogPostJsonLd)
|
||
</script>
|
||
|
||
}
|
||
|