27 lines
1.5 KiB
Plaintext
27 lines
1.5 KiB
Plaintext
@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="/">Home</a><span>›</span><a href="/problem-solver">Problem Solver</a>@if(Model.Area is not null) { <span>›</span><a href="/problem-solver/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="/problem-solver">Prefer a conversation? Find your way with the 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="/problem-solver/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="/problem-solver/@solution.Slug">@solution.Title</a></h2><p>@article.Distinction</p></li> }
|
||
}
|
||
</ul>
|
||
}
|
||
</div></section>
|