71 lines
4.9 KiB
Plaintext
71 lines
4.9 KiB
Plaintext
@using PlotLine.Models.WritingSolver
|
|
@using PlotLine.Services
|
|
@model SolverDiagnosticPresentation
|
|
@inject WritingSolverResults Results
|
|
@inject IHelpService Help
|
|
@inject WritingProblemEditorial Editorial
|
|
@inject WritingSolverPayoff Payoff
|
|
@{ var treatment=Payoff.For(Model.Solution.Id); var personal=Model.Evidence.Count>0; var wide=new[]{"plot-map","chronology","progression","trace"}.Contains(treatment.Family); ViewData["SolverVisualSizes"]=wide?"(max-width: 700px) calc(100vw - 40px), (max-width: 1190px) calc(100vw - 48px), 1140px":"(max-width: 700px) calc(100vw - 40px), (max-width: 1190px) 55vw, 650px"; 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 solver-payoff solver-payoff--@treatment.Family" data-result-family="@treatment.Family">
|
|
<header class="solver-result-heading">
|
|
@if(personal) { <p class="solver-resolution">✓ What we think is happening</p> }
|
|
else { <p class="marketing-eyebrow">Writing problems</p> }
|
|
<h1>@Model.Solution.Title</h1>
|
|
@if(personal)
|
|
{
|
|
<div class="solver-result-evidence solver-listening">
|
|
<p class="solver-result-inference">@content.Explanation</p>
|
|
<div><h2>Why we think that</h2><ul>@foreach(var evidence in Model.Evidence){<li>@evidence</li>}</ul></div>
|
|
</div>
|
|
}
|
|
else if(permanent is not null){<p class="solver-recognition">@permanent.Recognition</p>}
|
|
</header>
|
|
<aside class="solver-author-action"><strong>Your next step</strong><p>@treatment.Action</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">
|
|
@if(treatment.Family=="progression"){<div class="solver-graph-intro"><h3>@tool.Name</h3><p class="solver-specific-help">@content.Reason</p></div><partial name="ResultVisual" model="tool" />}
|
|
<div class="solver-start-copy">
|
|
@if(treatment.Family!="progression"){<p class="marketing-eyebrow">Start here</p><h3>@tool.Name</h3><p class="solver-specific-help">@content.Reason</p>}
|
|
<p class="solver-view-shows">@tool.Shows</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>
|
|
@if(treatment.Family!="progression"){<partial name="ResultVisual" model="tool" />}
|
|
</div>
|
|
</section>
|
|
@if(content.Secondary is not null)
|
|
{
|
|
var secondary=Results.Capability(content.Secondary);
|
|
<aside class="solver-also solver-workflow-next"><strong>Then check</strong><h3><a href="@secondary.Tour">@secondary.Name →</a></h3><p>@content.SecondaryReason</p>
|
|
@if(treatment.Family=="workflow"){ ViewData["SolverVisualSizes"]="(max-width: 700px) calc(100vw - 40px), (max-width: 900px) calc(100vw - 48px), 850px"; <partial name="ResultVisual" model="secondary" />}
|
|
</aside>
|
|
}
|
|
@if(treatment.Family=="progression"){<aside class="solver-principle solver-principle--compact"><strong>Evidence, not a target</strong><p>Read the scenes behind a rise, pause or dip. A graph does not need to be smooth for a novel to work.</p></aside>}
|
|
@if(permanent is not null)
|
|
{
|
|
<section class="solver-deeper-editorial" aria-label="Understand this writing problem">
|
|
@if(personal){<p class="solver-recognition">@permanent.Recognition</p>}
|
|
<partial name="Editorial" model="permanent" />
|
|
</section>
|
|
}
|
|
@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>
|
|
}
|