56 lines
3.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@using PlotLine.Models.WritingSolver
@using PlotLine.Services
@model SolverDiagnosticPresentation
@inject WritingSolverResults Results
@inject IHelpService Help
@{ var tool=Model.Capability; var content=Model.Content; var signedIn=User.Identity?.IsAuthenticated==true; var article=content.ArticleKey is null?null:Help.GetByContextKey(content.ArticleKey); }
<article class="solver-result solver-result-panel">
<header class="solver-result-heading">
<p class="solver-resolution">✓ Here’s a useful way forward</p>
<h1>@Model.Solution.Title</h1>
<div class="solver-result-evidence">
@foreach(var evidence in Model.Evidence) { <p>@evidence</p> }
<p class="solver-result-inference">@content.Explanation</p>
</div>
</header>
@if(!string.IsNullOrWhiteSpace(content.Principle))
{ <aside class="solver-principle solver-principle--compact"><strong>Worth remembering</strong><p>@content.Principle</p></aside> }
<section class="solver-start" aria-labelledby="solver-start-heading">
<h2 id="solver-start-heading">How PlotDirector can help</h2>
<div class="solver-start-grid">
<div class="solver-start-copy">
<p class="marketing-eyebrow">Start here</p>
<h3>@tool.Name</h3>
<p>@tool.Shows</p>
<p>@content.Reason</p>
<p class="solver-look-for"><strong>Look for</strong> @content.LookFor</p>
<a class="marketing-btn marketing-btn--primary solver-result-cta" href="@(signedIn ? "/writing-problems/workspace/"+tool.Id : tool.Tour)">@(signedIn ? "Open "+tool.Name+" in my workspace" : "See how "+tool.Name+" works") <span aria-hidden="true">→</span></a>
@if(signedIn) { <p class="solver-context-hint">Choose your project first@(tool.WorkspaceRoute.Contains("{characterId}") ? ", then the character you want to follow." : ".")</p> }
else { <p class="solver-context-hint">Explore the tool without signing in.</p> }
</div>
<partial name="ResultVisual" model="tool" />
</div>
</section>
@if(content.Secondary is not null)
{
var secondary=Results.Capability(content.Secondary);
<aside class="solver-also"><strong>Also useful</strong><h3><a href="@secondary.Tour">@secondary.Name →</a></h3><p>@content.SecondaryReason</p></aside>
}
@if(article is not null)
{
<aside class="solver-deeper"><p>Want to understand this problem in more depth?</p><a class="editorial-link" href="/help/@article.CategorySlug/@article.Slug">@article.Title →</a></aside>
}
</article>
@if(Model.Supporting.Count>0)
{
<section class="solver-supporting" aria-label="Other patterns indicated by your answers">
<h2>Also indicated by your answers</h2>
@foreach(var item in Model.Supporting)
{
<details class="solver-result solver-result--support"><summary>@item.Solution.Title</summary>
@foreach(var evidence in item.Evidence) { <p>@evidence</p> }
</details>
}
</section>
}