64 lines
3.7 KiB
Plaintext
64 lines
3.7 KiB
Plaintext
@using PlotLine.Models.WritingSolver
|
||
@using PlotLine.Services
|
||
@model SolverDiagnosticPresentation
|
||
@inject WritingSolverResults Results
|
||
@inject IHelpService Help
|
||
@inject WritingProblemEditorial Editorial
|
||
@{ var tool=Model.Capability; var content=Model.Content; var signedIn=User.Identity?.IsAuthenticated==true; var permanent=Editorial.Find(Model.Solution.Id); var article=content.ArticleKey is null?null:Help.GetByContextKey(content.ArticleKey); }
|
||
<article class="solver-result solver-result-panel">
|
||
<header class="solver-result-heading">
|
||
@if(Model.Evidence.Count>0) { <p class="solver-resolution">✓ Here’s a useful way forward</p> }
|
||
else { <p class="marketing-eyebrow">Writing problems</p> }
|
||
<h1>@Model.Solution.Title</h1>
|
||
@if(Model.Evidence.Count>0 || permanent is null)
|
||
{
|
||
<div class="solver-result-evidence">
|
||
@foreach(var evidence in Model.Evidence) { <p>@evidence</p> }
|
||
<p class="solver-result-inference">@content.Explanation</p>
|
||
</div>
|
||
}
|
||
@if(permanent is not null) { <p class="solver-recognition">@permanent.Recognition</p> }
|
||
@if(Model.Evidence.Count>0 && permanent is not null) { <p><a class="editorial-link" href="#solver-start-heading">See where to start in PlotDirector →</a></p> }
|
||
</header>
|
||
@if(permanent is not null) { <partial name="Editorial" model="permanent" /> }
|
||
@if(permanent is null && !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>
|
||
}
|