GithubHelp home page GithubHelp logo

webpx / webpx.adminlte.aspnetcore Goto Github PK

View Code? Open in Web Editor NEW
36.0 5.0 18.0 15.06 MB

AdminLTE Template Razor Class Libraries for ASP.net Core

License: MIT License

C# 74.71% Less 25.29%
asp-net-core razor-pages razor-class-library adminlte3 bootstrap boostrap4 nuget-package

webpx.adminlte.aspnetcore's Introduction

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.

/Views
    /Shared
        /AdminLTE3
            _Layout.cshtml
            Aside.cshtml
            Brand.cshtml
            Breadcrumbs.cshtml
            Footer.cshtml
            LeftMenu.cshtml
            MsgsDropDown.cshtml
            NavBar.cshtml
            NavBarLinks.cshtml
            Notifacations.cshtml
            Search.cshtml
            SideBar.cshtml
            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

Install-Package WebPx.AdminLTE.AspNetCore

Microsoft VisualStudio Code

dotnet add package WebPx.AdminLTE.AspNetCore

Configure

Add to your Startup class:

services.AddAdminLTE();
services.AddAdminLTEStatics();

Customize how the template works:

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

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

webpx.adminlte.aspnetcore's People

Contributors

jlchavez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

webpx.adminlte.aspnetcore's Issues

Exception

Error while validating the service descriptor 'ServiceType: WebPx.AdminLTE.IAdminLTE Lifetime: Scoped ImplementationType: WebPx.AdminLTE.AdminLTE': Unable to resolve service for type 'Microsoft.AspNetCore.Http.IHttpContextAccessor' while attempting to activate 'WebPx.AdminLTE.AdminLTE'.

Files not installed with package install

Hello, I run the installer, "Install-Package WebPx.AdminLTE.AspNetCore".

The package gets installed and the installer completes. However, no files actually get written to the project except the Nuget package.

No pages, scripts or anything. No new folders. Any assistance is appreciated.

Screen Shot 2020-05-06 at 1 40 23 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.