Thank you for purchasing INSPINIA admin theme. If you have any questions about the template, please feel free to contact us via email: support@webapplayers.com.
Thanks very much!
This documentation is focused on ASP.NET MVC5 version. It assumes a minimum knowledge of asp.net technology. It describe mainly files and structure in project. Please note that this documentation is dedicated to the main element of the template. With each version, we will try to develop it. But if you have any questions going beyond what is described here don't hesitate to write to us.
Tool and Technologies used:
INSPINIA ASP.NET MVC template consists project files for Visual Studio 2013 with below structure:
Inspinia_MVC5/
├── App_Data/
├── App_Start/
├── bin/
├── CodeTemplates/
├── Content/
├── Controllers/
├── fonts/
├── Helpers/
├── Images/
├── Models/
├── obj/
├── Properties/
├── Scripts/
├── Views/
├── favicon.ico
├── Global.asax
├── Global.asax.cs
├── Inspinia_MVC5.csproj
├── Inspinia_MVC5.csproj.user
├── packages.config
├── Web.config
├── Web.Debug.config
├── Web.Release.config
Page <head />
contains Metadata and CSS bundle files for theme. We use special section AddLocalStyles, to import styles for specific plugins on pages that need it.
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>INSPINIA | @ViewBag.Title</title> <!-- Add local styles, mostly for plugins css file --> @if (IsSectionDefined("AddLocalStyles")) {@RenderSection("AddLocalStyles", required: false)} <!-- Primary Inspinia style --> @Styles.Render("~/Content/css") @Styles.Render("~/font-awesome/css") </head>
IMPORTANT - Main stucture of _Layout.cshtml file.
<!-- Skin configuration box --> @Html.Partial("_SkinConfig") <!-- Wrapper--> <!-- PageClass give you ability to specify custom style for specific view based on action --> <div id="wrapper" class="@Html.PageClass()"> <!-- Navigation --> @Html.Partial("_Navigation") <!-- Page wraper --> <div id="page-wrapper" class="gray-bg @ViewBag.SpecialClass"> <!-- Top Navbar --> @Html.Partial("_TopNavbar") <!-- Main view --> @RenderBody() <!-- Footer --> @Html.Partial("_Footer") </div> <!-- End page wrapper--> <!-- Right Sidebar --> @Html.Partial("_RightSidebar") </div> <!-- End wrapper-->
On bottom of file are bundle script located. _Layout.cshtml contains all major plugin scripts and Inspinia scripts. In section Scripts, will be import scripts for specific plugins on pages that need it.
<!-- Section for main scripts render --> @Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/bootstrap") @Scripts.Render("~/plugins/slimScroll") @Scripts.Render("~/bundles/inspinia") <!-- Skin config script - only for demo purpose--> @Scripts.Render("~/bundles/skinConfig") <!-- Handler for local scripts --> @RenderSection("scripts", required: false)
To add for example iCheck plugin (plugin for custom checkbox input) at the bottom of page (view) you have to specifie Styles and Scripts with name plugin as example below. Or if you want to add it to entire app you can add it to _Layout file.
@section Styles { @Styles.Render("~/plugins/iCheckStyles") } @section Scripts { @Scripts.Render("~/plugins/iCheck") <script type="text/javascript"> $(document).ready(function () { // Local scripts }); </script> }
If you need any help with render section feel free to write me at support@webapplayers.com.
Bundle contains all neccesery scripts and style. You can add it to any part of your app. With convention:
CSS styles: @Styles.Render("~/plugins/{PluginName}Styles")
JS scripts: @Scripts.Render("~/plugins/{PluginName}")
Please note that some plugin have own images so path to the bundle has to be relative for example ionRangeSlider plugins.
// CSS style (bootstrap/inspinia) bundles.Add(new StyleBundle("~/Content/css").Include( "~/Content/bootstrap.min.css", "~/Content/animate.css", "~/Content/style.css")); // Font Awesome icons bundles.Add(new StyleBundle("~/font-awesome/css").Include( "~/fonts/font-awesome/css/font-awesome.min.css", new CssRewriteUrlTransform())); // jQuery bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-3.1.1.min.js")); // jQueryUI CSS bundles.Add(new ScriptBundle("~/Scripts/plugins/jquery-ui/jqueryuiStyles").Include( "~/Scripts/plugins/jquery-ui/jquery-ui.min.css")); // jQueryUI bundles.Add(new StyleBundle("~/bundles/jqueryui").Include( "~/Scripts/plugins/jquery-ui/jquery-ui.min.js")); // Bootstrap bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( "~/Scripts/bootstrap.min.js")); // Inspinia script bundles.Add(new ScriptBundle("~/bundles/inspinia").Include( "~/Scripts/plugins/metisMenu/metisMenu.min.js", "~/Scripts/plugins/pace/pace.min.js", "~/Scripts/app/inspinia.min.js")); // Inspinia skin config script bundles.Add(new ScriptBundle("~/bundles/skinConfig").Include( "~/Scripts/app/skin.config.min.js")); // SlimScroll bundles.Add(new ScriptBundle("~/plugins/slimScroll").Include( "~/Scripts/plugins/slimscroll/jquery.slimscroll.min.js")); // Peity bundles.Add(new ScriptBundle("~/plugins/peity").Include( "~/Scripts/plugins/peity/jquery.peity.min.js")); // Video responsible bundles.Add(new ScriptBundle("~/plugins/videoResponsible").Include( "~/Scripts/plugins/video/responsible-video.js")); // Lightbox gallery css styles bundles.Add(new StyleBundle("~/Content/plugins/blueimp/css/").Include( "~/Content/plugins/blueimp/css/blueimp-gallery.min.css")); // Lightbox gallery bundles.Add(new ScriptBundle("~/plugins/lightboxGallery").Include( "~/Scripts/plugins/blueimp/jquery.blueimp-gallery.min.js")); // Sparkline bundles.Add(new ScriptBundle("~/plugins/sparkline").Include( "~/Scripts/plugins/sparkline/jquery.sparkline.min.js")); // Morriss chart css styles bundles.Add(new StyleBundle("~/plugins/morrisStyles").Include( "~/Content/plugins/morris/morris-0.4.3.min.css")); // Morriss chart bundles.Add(new ScriptBundle("~/plugins/morris").Include( "~/Scripts/plugins/morris/raphael-2.1.0.min.js", "~/Scripts/plugins/morris/morris.js")); // Flot chart bundles.Add(new ScriptBundle("~/plugins/flot").Include( "~/Scripts/plugins/flot/jquery.flot.js", "~/Scripts/plugins/flot/jquery.flot.tooltip.min.js", "~/Scripts/plugins/flot/jquery.flot.resize.js", "~/Scripts/plugins/flot/jquery.flot.pie.js", "~/Scripts/plugins/flot/jquery.flot.time.js", "~/Scripts/plugins/flot/jquery.flot.spline.js")); // Rickshaw chart bundles.Add(new ScriptBundle("~/plugins/rickshaw").Include( "~/Scripts/plugins/rickshaw/vendor/d3.v3.js", "~/Scripts/plugins/rickshaw/rickshaw.min.js")); // ChartJS chart bundles.Add(new ScriptBundle("~/plugins/chartJs").Include( "~/Scripts/plugins/chartjs/Chart.min.js")); // iCheck css styles bundles.Add(new StyleBundle("~/Content/plugins/iCheck/iCheckStyles").Include( "~/Content/plugins/iCheck/custom.css")); // iCheck bundles.Add(new ScriptBundle("~/plugins/iCheck").Include( "~/Scripts/plugins/iCheck/icheck.min.js")); // dataTables css styles bundles.Add(new StyleBundle("~/Content/plugins/dataTables/dataTablesStyles").Include( "~/Content/plugins/dataTables/dataTables.bootstrap.css", "~/Content/plugins/dataTables/dataTables.responsive.css", "~/Content/plugins/dataTables/dataTables.tableTools.min.css")); // dataTables bundles.Add(new ScriptBundle("~/plugins/dataTables").Include( "~/Scripts/plugins/dataTables/jquery.dataTables.js", "~/Scripts/plugins/dataTables/dataTables.bootstrap.js", "~/Scripts/plugins/dataTables/dataTables.responsive.js", "~/Scripts/plugins/dataTables/dataTables.tableTools.min.js")); // jeditable bundles.Add(new ScriptBundle("~/plugins/jeditable").Include( "~/Scripts/plugins/jeditable/jquery.jeditable.js")); // jqGrid styles bundles.Add(new StyleBundle("~/Content/plugins/jqGrid/jqGridStyles").Include( "~/Content/plugins/jqGrid/ui.jqgrid.css")); // jqGrid bundles.Add(new ScriptBundle("~/plugins/jqGrid").Include( "~/Scripts/plugins/jqGrid/i18n/grid.locale-en.js", "~/Scripts/plugins/jqGrid/jquery.jqGrid.min.js")); // codeEditor styles bundles.Add(new StyleBundle("~/plugins/codeEditorStyles").Include( "~/Content/plugins/codemirror/codemirror.css", "~/Content/plugins/codemirror/ambiance.css")); // codeEditor bundles.Add(new ScriptBundle("~/plugins/codeEditor").Include( "~/Scripts/plugins/codemirror/codemirror.js", "~/Scripts/plugins/codemirror/mode/javascript/javascript.js")); // codeEditor bundles.Add(new ScriptBundle("~/plugins/nestable").Include( "~/Scripts/plugins/nestable/jquery.nestable.js")); // validate bundles.Add(new ScriptBundle("~/plugins/validate").Include( "~/Scripts/plugins/validate/jquery.validate.min.js")); // fullCalendar styles bundles.Add(new StyleBundle("~/plugins/fullCalendarStyles").Include( "~/Content/plugins/fullcalendar/fullcalendar.css")); // fullCalendar bundles.Add(new ScriptBundle("~/plugins/fullCalendar").Include( "~/Scripts/plugins/fullcalendar/moment.min.js", "~/Scripts/plugins/fullcalendar/fullcalendar.min.js")); // vectorMap bundles.Add(new ScriptBundle("~/plugins/vectorMap").Include( "~/Scripts/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js", "~/Scripts/plugins/jvectormap/jquery-jvectormap-world-mill-en.js")); // ionRange styles bundles.Add(new StyleBundle("~/Content/plugins/ionRangeSlider/ionRangeStyles").Include( "~/Content/plugins/ionRangeSlider/ion.rangeSlider.css", "~/Content/plugins/ionRangeSlider/ion.rangeSlider.skinFlat.css")); // ionRange bundles.Add(new ScriptBundle("~/plugins/ionRange").Include( "~/Scripts/plugins/ionRangeSlider/ion.rangeSlider.min.js")); // dataPicker styles bundles.Add(new StyleBundle("~/plugins/dataPickerStyles").Include( "~/Content/plugins/datapicker/datepicker3.css")); // dataPicker bundles.Add(new ScriptBundle("~/plugins/dataPicker").Include( "~/Scripts/plugins/datapicker/bootstrap-datepicker.js")); // nouiSlider styles bundles.Add(new StyleBundle("~/plugins/nouiSliderStyles").Include( "~/Content/plugins/nouslider/jquery.nouislider.css")); // nouiSlider bundles.Add(new ScriptBundle("~/plugins/nouiSlider").Include( "~/Scripts/plugins/nouslider/jquery.nouislider.min.js")); // jasnyBootstrap styles bundles.Add(new StyleBundle("~/plugins/jasnyBootstrapStyles").Include( "~/Content/plugins/jasny/jasny-bootstrap.min.css")); // jasnyBootstrap bundles.Add(new ScriptBundle("~/plugins/jasnyBootstrap").Include( "~/Scripts/plugins/jasny/jasny-bootstrap.min.js")); // switchery styles bundles.Add(new StyleBundle("~/plugins/switcheryStyles").Include( "~/Content/plugins/switchery/switchery.css")); // switchery bundles.Add(new ScriptBundle("~/plugins/switchery").Include( "~/Scripts/plugins/switchery/switchery.js")); // chosen styles bundles.Add(new StyleBundle("~/Content/plugins/chosen/chosenStyles").Include( "~/Content/plugins/chosen/chosen.css")); // chosen bundles.Add(new ScriptBundle("~/plugins/chosen").Include( "~/Scripts/plugins/chosen/chosen.jquery.js")); // knob bundles.Add(new ScriptBundle("~/plugins/knob").Include( "~/Scripts/plugins/jsKnob/jquery.knob.js")); // wizardSteps styles bundles.Add(new StyleBundle("~/plugins/wizardStepsStyles").Include( "~/Content/plugins/steps/jquery.steps.css")); // wizardSteps bundles.Add(new ScriptBundle("~/plugins/wizardSteps").Include( "~/Scripts/plugins/staps/jquery.steps.min.js")); // dropZone styles bundles.Add(new StyleBundle("~/Content/plugins/dropzone/dropZoneStyles").Include( "~/Content/plugins/dropzone/basic.css", "~/Content/plugins/dropzone/dropzone.css")); // dropZone bundles.Add(new ScriptBundle("~/plugins/dropZone").Include( "~/Scripts/plugins/dropzone/dropzone.js")); // summernote styles bundles.Add(new StyleBundle("~/plugins/summernoteStyles").Include( "~/Content/plugins/summernote/summernote.css", "~/Content/plugins/summernote/summernote-bs3.css")); // summernote bundles.Add(new ScriptBundle("~/plugins/summernote").Include( "~/Scripts/plugins/summernote/summernote.min.js")); // toastr notification bundles.Add(new ScriptBundle("~/plugins/toastr").Include( "~/Scripts/plugins/toastr/toastr.min.js")); // toastr notification styles bundles.Add(new StyleBundle("~/plugins/toastrStyles").Include( "~/Content/plugins/toastr/toastr.min.css")); // color picker bundles.Add(new ScriptBundle("~/plugins/colorpicker").Include( "~/Scripts/plugins/colorpicker/bootstrap-colorpicker.min.js")); // color picker styles bundles.Add(new StyleBundle("~/Content/plugins/colorpicker/colorpickerStyles").Include( "~/Content/plugins/colorpicker/bootstrap-colorpicker.min.css")); // image cropper bundles.Add(new ScriptBundle("~/plugins/imagecropper").Include( "~/Scripts/plugins/cropper/cropper.min.js")); // image cropper styles bundles.Add(new StyleBundle("~/plugins/imagecropperStyles").Include( "~/Content/plugins/cropper/cropper.min.css")); // jsTree bundles.Add(new ScriptBundle("~/plugins/jsTree").Include( "~/Scripts/plugins/jsTree/jstree.min.js")); // jsTree styles bundles.Add(new StyleBundle("~/Content/plugins/jsTree").Include( "~/Content/plugins/jsTree/style.css")); // Diff bundles.Add(new ScriptBundle("~/plugins/diff").Include( "~/Scripts/plugins/diff_match_patch/javascript/diff_match_patch.js", "~/Scripts/plugins/preetyTextDiff/jquery.pretty-text-diff.min.js")); // Idle timer bundles.Add(new ScriptBundle("~/plugins/idletimer").Include( "~/Scripts/plugins/idle-timer/idle-timer.min.js")); // Tinycon bundles.Add(new ScriptBundle("~/plugins/tinycon").Include( "~/Scripts/plugins/tinycon/tinycon.min.js"));
Inspinia provide few option for you layout app. There are:
Fixed sidebar is a sidebar that is sticked on screen.
To add fixed sidebar you need to add .fixed-sidebar class to body.
<body class="fixed-sidebar">
Next we will need to add slimScroll handle for sidebar. Go to scripts/app/inspinia.js file and find // Fixed Sidebar comment and uncomment function below it so it will look like this:
// Fixed Sidebar // unComment this only whe you have a fixed-sidebar $(window).bind("load", function() { if($("body").hasClass('fixed-sidebar')) { $('.sidebar-collapse').slimScroll({ height: '100%', railOpacity: 0.9, }); } })
Be sure that you have included slimScroll plugin to your index.cshtml file:
@Scripts.Render("~/plugins/slimScroll")
Fixed navbar is a top navbar that is sticked on screen.
To add fixed sidebar you need to add .fixed-nav class to body.
<body class="fixed-nav">
Next we will need to change navbar from static to fixed in Shared/_TopNavbar.cshtml file. Change .navbar-static-top class to navbar-fixed-top
<nav class="navbar navbar-fixed-top" role="navigation">
Fixed navbar 2 is a top navbar that is sticked on screen and it's width is the same as the width of wrapper
To add fixed sidebar you need to add .fixed-nav class and .fixed-nav-basic class to body.
<body class="fixed-nav fixed-nav-basic">
Next we will need to change navbar from static to fixed in Shared/_TopNavbar.cshtml file. Change .navbar-static-top class to navbar-fixed-top
<nav class="navbar navbar-fixed-top" role="navigation">
Fixed navbar 2 works only on primary layout
Fixed footer is a bottom footer that is sticked on screen.
To add fixed bottom footer you just need to add .fixed class to footer class.
<div class="footer fixed">
Adding support for language written in a Right-To-Left (RTL) direction.
To add RTL support you will need to add new .rtls class to body element
<body class="rtls">
Next you will need to add new bootstrap rtl support library bootstrap-rtl. Add new link to css file just below the Content/css from bootstrap in index.cshtml page like this:
@Styles.Render("~/Content/css") <link href="~/Content/plugins/bootstrap-rtl/bootstrap-rtl.min.css" rel="stylesheet">
After that you will have RTL support similar to this:
Layout 2 is a top navigation with centered content layout.
For layout 2 we prepared special examples files in Shared folder
To use layout 2 all you need to do is to specify new layout in top of the page:
@{ Layout = "~/Views/Shared/_Layout_2.cshtml"; ViewBag.Title = "Dashboard v.4"; }
Layout 2 with example code look like this:
Off canvas menu is a menu that not change the width of main wrapper page. It appear on top of the page.
To use off canvas menu you just need to use _Layout4.cshtml. The body has special .canvas-manu
class and it include special _NavigationOffCanvas.
Inspinai theme has 3 diferent skins
To change skin you just have to add skin class to body element.
For example: to add skin Blue skin you just need to add .skin-1
class to body element.
In LESS files skins.less you can find style for the skin. Below is a representation of css classes demand color skin.
.skin-1
- Blue Light.skin-2
- Inspinia Ultra {for support with Inspinai Ultra please contact with support@webapplayers.com}.skin-3
- Yellow/purple.md-skin
- Material Design Skin (In demo Inspinia Material Design version has also fixed sidebar and fixed navbar option)Theme config is the configuration box for setting options in live preview. It is placed in the right side of page with green icon.
To not add html code to all pages we just add js script to append the config box. The function is located in Scripts/app/inspinia.js file with comment // Append config box / Only for demo purpose
If you want to remove the config box all you need to do is to remove function below this comment.
In CodeTemplates we add special customized template for Scaffolding. If you run app and go to Scaffolding page then you will see a full generated code and views with customized look and feel for Inspinia theme.
In this section we will show you have to go throw scaffolding with customized template on Inspinia MVC5 SeedProject.
When you open Inspinia Seed Project you will see in Solution Explorer folder CodeTemplates. This folder contains scaffolding templates. This folder must have the CodeTemplates name. Entity framework first check for this folder in solution and if he find it he will use templates from there.
Lets add simple model for our demo purpose.
Select Empty controller
Enter controller name
Write bacis Person model with {Id, FirstName, LastName, Position}
After save build project
Next creat scaffolding controller and views
Select MVC5 Controller with view, using Entity Framework
Add name and use Person model
Next click to New data context and set a name for context
Once more build project to creat connection
After that go to _Navigation file and add menu item to Person view as below
When you run app go to Person menu and you will see a empty table. Click create new
Add some example data
After that you will have a first person in your database
Using Scaffolding and Inspinia templates you can creat simple and fast basic app wtih nice look and feal writing only a model!!
It is an application skeleton for a typical ASP.NET MVC5 web app. You can use it to quickly bootstrap your mvc webapp projects and dev environment for these projects.
It is a best start for new app. It has all needed scripts and style.
Please stay tuned for 2.2 version to get new features for ASP.NET MVC5 version.
.faq-answer
before p
answer. Please stay tuned for 2.0 version to get new features for Angular version.
Contact as with email: support@webapplayers.com