| | | 1 | | @inherits MainLayoutBase |
| | | 2 | | @using Pomodoro.Web.Components |
| | | 3 | | @inject LayoutPresenterService LayoutPresenter |
| | | 4 | | |
| | | 5 | | <div class="app-wrapper"> |
| | | 6 | | <header class="app-header"> |
| | | 7 | | <div class="header-content-wrapper"> |
| | | 8 | | <div class="header-left"> |
| | | 9 | | <div class="header-title"> |
| | 88 | 10 | | <span class="header-icon">@Constants.Layout.AppIcon</span> |
| | 88 | 11 | | <span class="header-text">@Constants.Layout.AppTitle</span> |
| | | 12 | | </div> |
| | 88 | 13 | | <p class="header-tagline">@Constants.Layout.Tagline</p> |
| | | 14 | | </div> |
| | | 15 | | <div class="header-nav"> |
| | 536 | 16 | | @foreach (var navLink in LayoutPresenter.GetNavigationLinks()) |
| | 136 | 17 | | { |
| | | 18 | | <NavLink href="@navLink.Href" Match="@navLink.Match" title="@navLink.Title"> |
| | 136 | 19 | | <span>@navLink.Icon</span> |
| | | 20 | | </NavLink> |
| | 136 | 21 | | } |
| | | 22 | | </div> |
| | | 23 | | </div> |
| | | 24 | | </header> |
| | | 25 | | |
| | | 26 | | <main class="app-content"> |
| | 83 | 27 | | <ErrorBoundary @ref="_errorBoundary"> |
| | 83 | 28 | | <ChildContent> |
| | 88 | 29 | | @Body |
| | 83 | 30 | | </ChildContent> |
| | 83 | 31 | | <ErrorContent Context="exception"> |
| | 83 | 32 | | <ErrorDisplay Exception="exception" OnRetry="RecoverError" /> |
| | | 33 | | </ErrorContent> |
| | | 34 | | </ErrorBoundary> |
| | | 35 | | </main> |
| | | 36 | | |
| | | 37 | | <footer class="app-footer"> |
| | | 38 | | <div class="footer-content"> |
| | 88 | 39 | | <p class="footer-made">@Constants.Layout.FooterMadeWithText</p> |
| | 176 | 40 | | <p class="footer-copy">© @LayoutPresenter.GetCurrentYear() @Constants.Layout.FooterCopyrightOwner</p> |
| | | 41 | | </div> |
| | | 42 | | </footer> |
| | | 43 | | </div> |
| | | 44 | | |
| | | 45 | | @code { |
| | | 46 | | private ErrorBoundary? _errorBoundary; |
| | | 47 | | |
| | | 48 | | public void RecoverError() |
| | 3 | 49 | | { |
| | 3 | 50 | | _errorBoundary?.Recover(); |
| | 3 | 51 | | } |
| | | 52 | | } |