项目作者: WebPx

项目描述 :
AdminLTE Template Razor Class Libraries for ASP.net Core
高级语言: C#
项目地址: git://github.com/WebPx/WebPx.AdminLTE.AspNetCore.git
创建时间: 2020-02-25T14:59:11Z
项目社区:https://github.com/WebPx/WebPx.AdminLTE.AspNetCore

开源协议:MIT License

下载


WebPx.AdminLTE.AspNetCore Build status

AdminLTE 3 Template Razor Class Libraries for ASP.NET Core

Based on AdminLTE 3 Template by https://adminlte.io/, we decided to provide a ready to run versión adapted to ASP.NET Core Razor Pages

ColorLib’s Html Template Live Demo: https://adminlte.io/themes/dev/AdminLTE/index.html

WebPx Live Demo: Demo.AdminLTE3.WebPx.com

Features

  • Razor Class Library with Views required to function the template
  • Split in Views so that it allows to replace one or more parts for the whole site, any area or folder
  • Configuration for adjusting which features you wan’t to be called.
  • SideBar collapsible and persistent for the user
  • Layout includes various sections for extensibility
    • Header, for links and metadata
    • ThemeLinks, for replacing links to AdminLTE3 CSS files
    • PageEnd, for extra html at the end of the page, before scripts
    • Scripts, for additional javascript files/blocks
  • NEW! Two Libraries with Static Content:
    • WebPx.AdminLTE.AspNetCore.Statics contains all the files that the template includes (js, dist, plugins and Admin LTE Theme)
    • WebPxAdminLTE.AspNetCore.Statics.Shared contains the pictures and scripts included in the original theme for displaying demo daa
  • NEW! Breaking Change: Views have been changed from /Pages/Shared/AdminLTE3 to /Views/Shared/AdminLTE3 so that it can be shared between MVC and Razor Pages.

Folder Structure

The Template includes the Layout File (_Layout), and various Partial Views that you can replace to adjust your application. NEW! For flexibility in area development you can also change this files in the corresponding /Area/[AreaName]/Views/Shared/AdminLTE3 folder so that customization applies per area.

  1. /Views
  2. /Shared
  3. /AdminLTE3
  4. _Layout.cshtml
  5. Aside.cshtml
  6. Brand.cshtml
  7. Breadcrumbs.cshtml
  8. Footer.cshtml
  9. LeftMenu.cshtml
  10. MsgsDropDown.cshtml
  11. NavBar.cshtml
  12. NavBarLinks.cshtml
  13. Notifacations.cshtml
  14. Search.cshtml
  15. SideBar.cshtml
  16. UserPanel.cshtml

Partial Views

Name Description
Aside Aside Panel for setting up page of the right hand side
Brand Provides Logo and Name of the application
Breadcrumbs Shows a basic bread crumbs html for the root and the current page
Footer Shows the copyright for the current site. Refer to ——- for settings your Site Name and Copyright text
LeftMenu The main navigation menu on the left hand side
MsgsDropDown Placeholder for the Messages Drop Down
NavBar Contains the Top Navigation Bar with the Hamburger button, NavBarLinks & Search form
NavBarLinks The Links that are shown in the Top Navigation Bar
Notifications Placeholder for the Notifications Drop Down
Search the Search Form
SideBar The main container for the UserPanel & LeftMenu
UserPanel Shows the User picture and Name

Installation

You can add this template to your ASP.NET Core Web App, by adding the WebPx.AdminLTE.AspNetCore nuget package.

Microsoft VisualStudio 20017/2019

  1. Install-Package WebPx.AdminLTE.AspNetCore

Microsoft VisualStudio Code

  1. dotnet add package WebPx.AdminLTE.AspNetCore

Configure

Add to your Startup class:

  1. services.AddAdminLTE();
  2. services.AddAdminLTEStatics();

Customize how the template works:

  1. services.AddAdminLTE((o) => {
  2. o.SiteName = "Demo Site"; // Site Name
  3. o.SiteLogo = "/logo.png"; // Site Logo Path
  4. o.SearchPath = "/Search"; // Url to the Search Result's page
  5. o.Location = "AdminLITE3"; // Folder Name for the template (For future use)
  6. o.Aside = true; // Show/Hide Aside Menu
  7. o.Breadcrumbs = true; // Show/Hide Breadcrumbs
  8. o.Message = true; // Show/Hide Messages Drop Down;
  9. o.NavBarLinks = true; // Show/Hide Top Nav Bar Links
  10. o.Footer = true; // Show/Hide Footer
  11. o.SideBarCollapsed = true; // Show/Hide Side Bar Collapsed
  12. o.Search = true; // Show/Hide Search Field
  13. o.UserPanel = true; // Show/Hide User Panel
  14. o.StaticsPath = "//cdn.site.com/" // URL for reusing static content from a common location
  15. o.MessagesUrl = "/Messages"; // Url to the page to view messages
  16. o.NotificationsUrl = "/Notifications"; // Url to the page to view notifications
  17. });

Next Steps

  • Improve documentation
  • Create project templates to start from scratch with the template
  • Create item templates for the partial views
  • Create a Wizard for Visual Studio
  • Package it as a VSIX/Visual Studio Extension