Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions Components/Layout/NavMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
NavMenu.razor.css at the 48rem breakpoint - this markup is identical
either way, so there is no second copy of the links to keep in step.

Each link is an icon plus a label. The icon spans are written here
Each link is an icon plus a label; the tail of the two longest labels
is wrapped so the tab bar can drop it and the rail can keep it. The
aria-label holds the full name at either width. The icon spans are written here
rather than inside NavLink so they pick up this component's scope
attribute; the <a> that NavLink renders does not, which is why the
stylesheet reaches it through ::deep.
Expand All @@ -32,24 +34,19 @@
<span class="nav-label">Financial</span>
</NavLink>

<NavLink class="nav-link" href="physical-assets">
<NavLink class="nav-link" href="physical-assets" aria-label="Physical Assets">
<span class="nav-icon bi-plus-square-fill-nav-menu" aria-hidden="true"></span>
<span class="nav-label">Physical Assets</span>
<span class="nav-label">Physical<span class="nav-label-rest"> Assets</span></span>
</NavLink>

<NavLink class="nav-link" href="inventory">
<span class="nav-icon bi-backpack-fill-nav-menu" aria-hidden="true"></span>
<span class="nav-label">Inventory</span>
</NavLink>

<NavLink class="nav-link" href="human-capital">
<NavLink class="nav-link" href="human-capital" aria-label="Human Capital">
<span class="nav-icon bi-mortarboard-fill-nav-menu" aria-hidden="true"></span>
<span class="nav-label">Human Capital</span>
</NavLink>

<NavLink class="nav-link" href="/market-potential" Match="NavLinkMatch.All">
<span class="nav-icon bi-bar-chart-line-fill-nav-menu" aria-hidden="true"></span>
<span class="nav-label">Market Potential</span>
<span class="nav-label">Human<span class="nav-label-rest"> Capital</span></span>
</NavLink>

</nav>
Expand Down
11 changes: 11 additions & 0 deletions Components/Layout/NavMenu.razor.css
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@
text-align: center;
}

/* A five-tab row has no width for "Physical Assets" or "Human Capital", so
the tab bar shows only the first word. The rail below restores the rest;
the aria-label on the link carries the full name at either width. */
.nav-label-rest {
display: none;
}

/* ===================================================================
* Side rail
* =================================================================== */
Expand Down Expand Up @@ -255,6 +262,10 @@
line-height: 1.3;
text-align: left;
}

.nav-label-rest {
display: inline;
}
}

/* ===================================================================
Expand Down
2 changes: 1 addition & 1 deletion Components/Pages/Financials/NetWorthCalculator.razor
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</div>
<div class="breakdown-item">
<dt>Physical capital</dt>
<dd>@TotalPhysicalCapital.ToString("C0") <a href="/inventory">View inventory</a></dd>
<dd>@TotalPhysicalCapital.ToString("C0")</dd>
</div>
<div class="breakdown-item breakdown-liability">
<dt>Total liabilities</dt>
Expand Down
8 changes: 0 additions & 8 deletions Components/Pages/Financials/NetWorthCalculator.razor.css
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,6 @@ button {
color: var(--negative-text);
}

.breakdown-item a {
display: block;
margin: 0.15rem 0 0;
color: var(--brand);
font-size: 0.75rem;
font-weight: 500;
}

/* ===================================================================
* Segmented control
* =================================================================== */
Expand Down
2 changes: 1 addition & 1 deletion Features/Dashboard/Dashboard.razor
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
based on @_occupationCount matched occupation@(_occupationCount == 1 ? "" : "s")
</p>
}
<NavLink href="/market-potential" Match="NavLinkMatch.All" class="btn btn-outline-success">View Market Potential</NavLink>
<NavLink href="/human-capital" class="btn btn-outline-success">View Market Potential</NavLink>
</div>
</div>
</div>
Expand Down
Loading
Loading