27 lines
1.5 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
@model WritingProblemBrowse
@{ Layout="_PublicLayout"; }
<section class="solver-space solver-space--article"><div class="solver-content">
<nav class="solver-trail" aria-label="Breadcrumb"><a href="/writing-problems">Writing Problem Solver</a>@if(Model.Area is not null) { <span>›</span><a href="/writing-problems/browse">Browse writing problems</a> }</nav>
<h1>@(Model.Area?.Title??"Browse writing problems")</h1>
<p class="solver-recognition">@(Model.Area?.Description??"Find a familiar difficulty, understand what may be happening, and choose what to inspect in your manuscript.")</p>
<p><a class="editorial-link" href="/writing-problems">Prefer a conversation? Find your way with the Writing Problem Solver →</a></p>
@if(Model.Area is null)
{
<div class="solver-browse-areas">
@foreach(var area in Model.Catalog.Areas)
{ <section><h2><a href="/writing-problems/browse/@area.Id">@area.Title →</a></h2><p>@area.Description</p></section> }
</div>
}
else
{
<ul class="solver-problem-links">
@foreach(var article in Model.Catalog.Pages.Where(p=>p.Area==Model.Area.Id))
{
var solution=Model.Graph.Solutions.FirstOrDefault(s=>s.Id==article.Solution&&s.Active);
@if(solution is not null) { <li><h2><a href="/writing-problems/@solution.Slug">@solution.Title</a></h2><p>@article.Distinction</p></li> }
}
</ul>
}
</div></section>