34 lines
2.0 KiB
Plaintext
34 lines
2.0 KiB
Plaintext
@using PlotLine.Models.WritingSolver
|
||
@model SolverPageView
|
||
@{ Layout="_PublicLayout"; }
|
||
<div class="solver-space solver-space--article">
|
||
<div class="solver-content">
|
||
<nav class="solver-trail" aria-label="Breadcrumb"><a href="/">Home</a><span>›</span><a href="@(Model.IsFeature ? "/features" : "/writing-problems")">@(Model.IsFeature ? "Features" : "Writing Problem Solver")</a></nav>
|
||
@if(Model.Graph.IsDemo) { <p class="solver-demo">Demonstration content · The curated collection is on its way.</p> }
|
||
@if(Model.IsFeature)
|
||
{
|
||
var feature=(SolverFeature)Model.Page;
|
||
<h1>@feature.Title</h1>
|
||
<p class="solver-intro">@feature.Summary</p>
|
||
@foreach(var paragraph in feature.Content.Split("\n\n")) { <p class="solver-editorial">@paragraph</p> }
|
||
@if(feature.Screenshot is not null) { <img class="solver-screenshot" src="@feature.Screenshot" alt="@feature.Title workspace in PlotDirector" width="1200" height="750" /> }
|
||
<h2>Writing problems this can help with</h2>
|
||
@foreach(var solution in Model.Graph.Solutions.Where(s=>s.Active && s.Features.Any(f=>f.Feature==feature.Id))) { <p><a href="/writing-problems/@solution.Slug">@solution.PageTitle</a></p> }
|
||
<p><a class="marketing-btn marketing-btn--primary" href="/features">See PlotDirector in action →</a></p>
|
||
}
|
||
else
|
||
{
|
||
<partial name="Solution" model="Model" />
|
||
var solution=(SolverSolution)Model.Page;
|
||
@if(solution.Related.Count>0) { <h2>You might also find this useful</h2> }
|
||
@foreach(var id in solution.Related)
|
||
{
|
||
var related=Model.Graph.Solutions.Single(s=>s.Id==id && s.Active);
|
||
<p><a href="/writing-problems/@related.Slug">@related.PageTitle</a></p>
|
||
}
|
||
}
|
||
@if(Model.Page.Questions.Count>0) { <h2>Questions this helps answer</h2><ul>@foreach(var question in Model.Page.Questions) { <li>@question</li> }</ul> }
|
||
<a class="editorial-link" href="/writing-problems">Find a way through your writing problem →</a>
|
||
</div>
|
||
</div>
|