mirror of https://github.com/abpframework/abp.git
committed by
GitHub
10 changed files with 449 additions and 315 deletions
@ -0,0 +1,53 @@ |
|||||
|
@using Volo.Docs.Pages.Documents.Shared.DocumentNotFoundComponent |
||||
|
@model DocumentNotFoundPageModel |
||||
|
@{ |
||||
|
} |
||||
|
<div class="row position-relative vh-100" style="background: #e8e8e8;"> |
||||
|
<div class="center"> |
||||
|
<span class="notfound-404">404</span> |
||||
|
<h1> |
||||
|
<strong>"@Model.DocumentName"</strong> not found in <strong>@Model.ProjectName</strong> documents, with <strong>@Model.Version</strong> version and <strong>@Model.LanguageCode</strong> language. |
||||
|
</h1> |
||||
|
<br /> |
||||
|
<a href="@(Model.DocumentsUrlPrefix + Model.LanguageCode + "/" +Model.ProjectName + "/" + Model.Version)" class="btn btn-primary px-4"> |
||||
|
Go Back |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<style> |
||||
|
h1 { |
||||
|
font-size: 1.75em; |
||||
|
line-height: 1.75; |
||||
|
color: #777; |
||||
|
font-weight: normal; |
||||
|
} |
||||
|
|
||||
|
h1 strong { |
||||
|
color: #222; |
||||
|
} |
||||
|
|
||||
|
.center { |
||||
|
position: absolute; |
||||
|
left: 50%; |
||||
|
top: 50%; |
||||
|
-webkit-transform: translate(-50%, -50%); |
||||
|
-ms-transform: translate(-50%, -50%); |
||||
|
transform: translate(-50%, -50%); |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
.notfound-404 { |
||||
|
font-size: 300px; |
||||
|
font-weight: 700; |
||||
|
line-height: 1.25; |
||||
|
margin: 0px; |
||||
|
color: #fff; |
||||
|
text-transform: uppercase; |
||||
|
display: block; |
||||
|
margin-bottom: -150px; |
||||
|
z-index: -1; |
||||
|
position: relative; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,15 @@ |
|||||
|
namespace Volo.Docs.Pages.Documents.Shared.DocumentNotFoundComponent |
||||
|
{ |
||||
|
public class DocumentNotFoundPageModel |
||||
|
{ |
||||
|
public string ProjectName { get; set; } |
||||
|
|
||||
|
public string LanguageCode { get; set; } |
||||
|
|
||||
|
public string Version { get; set; } |
||||
|
|
||||
|
public string DocumentName { get; set; } |
||||
|
|
||||
|
public string DocumentsUrlPrefix { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,26 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.Extensions.Options; |
||||
|
using Volo.Abp.AspNetCore.Mvc; |
||||
|
|
||||
|
namespace Volo.Docs.Pages.Documents.Shared.DocumentNotFoundComponent |
||||
|
{ |
||||
|
public class DocumentNotFoundViewComponent : AbpViewComponent |
||||
|
{ |
||||
|
private readonly DocsUiOptions _options; |
||||
|
|
||||
|
public DocumentNotFoundViewComponent(IOptions<DocsUiOptions> options) |
||||
|
{ |
||||
|
_options = options.Value; |
||||
|
} |
||||
|
public IViewComponentResult Invoke(DocumentNotFoundPageModel model, string defaultErrorMessageKey) |
||||
|
{ |
||||
|
model.DocumentsUrlPrefix = _options.RoutePrefix; |
||||
|
|
||||
|
return View("~/Pages/Documents/Shared/DocumentNotFoundComponent/Default.cshtml", model); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue