26 lines
1.4 KiB
Plaintext
26 lines
1.4 KiB
Plaintext
@using PlotLine.Models.WritingSolver
|
|
@model SolverCapability
|
|
@inject PlotLine.Services.WritingSolverResults Results
|
|
@{ var sizes=ViewData["SolverVisualSizes"] as string??"(max-width: 700px) calc(100vw - 40px), (max-width: 978px) calc((100vw - 80px) / 2), 449px"; }
|
|
<figure class="solver-tool-visual">
|
|
@if(Results.HasImage(Model))
|
|
{
|
|
<a class="solver-image-link" href="@Model.Image" data-solver-image aria-haspopup="dialog" aria-controls="solver-image-dialog">
|
|
<picture>
|
|
<source type="image/avif" srcset="@Results.ImageSourceSet(Model,"avif")" sizes="@sizes" />
|
|
<img src="@Model.Image" srcset="@Results.ImageSourceSet(Model,"webp")" sizes="@sizes" alt="@Model.ImageAlt" width="@Model.ImageWidth" height="@Model.ImageHeight" loading="lazy" decoding="async" />
|
|
</picture>
|
|
</a>
|
|
}
|
|
else
|
|
{
|
|
<div class="solver-visual-placeholder">
|
|
<svg viewBox="0 0 48 40" width="48" height="40" fill="none" stroke="currentColor" stroke-width="1.4" aria-hidden="true"><path d="M4 9h10l4-6h12l4 6h10v28H4z"/><circle cx="24" cy="22" r="9"/></svg>
|
|
<span class="marketing-eyebrow">Application preview unavailable</span>
|
|
<strong>@Model.Name</strong>
|
|
<p>This application image is temporarily unavailable.</p>
|
|
</div>
|
|
}
|
|
<figcaption>@Model.PreviewCaption</figcaption>
|
|
</figure>
|