Giter VIP home page Giter VIP logo

modular-admin-html's Introduction

ModularAdmin: Free Bootstrap 4 Dashboard Theme
HTML version

Backers on Open Collective Sponsors on Open Collective Join the chat at https://gitter.im/modularcode/modular-admin

demo

View Demo | Download ZIP

ModularAdmin is an open source dashboard theme built in a modular way. That makes it easy to scale, modify and maintain.


๐Ÿ“ฃ Heads up for the Modular Material Admin + React!

Currently I work on the Modular Admin ReactJS version, which uses React, MaterialUI, Redux and TypeScript. ๐ŸŽ– Star the project or ๐Ÿ‘ฃ follow me on Twitter to stay up to date!

๐Ÿ‘‰ Support me on pateron to make this happen! ๐Ÿ‘


Getting Started

Note: If you don't want to re-build the project, you may just clone this branch directly https://github.com/modularcode/modular-admin-html/tree/gh-pages

1. Download ZIP or Git Clone

git clone https://github.com/modularcode/modular-admin-html.git

2. Build the project

The cloned/downloaded repository doesn't contain prebuilt version of the project and you need to build it. You need to have NodeJs (v8+) with npm (v3+) installed.

Install npm dependencies

npm install

Build the project and start local web server

npm start

Open the project http://localhost:4000.

Warning! all changes made in dist/ folder would be overwriten on application build.


You can also run the project in docker thanks to @japrogramer


Folder Structure

โ”œโ”€โ”€ build/               # app build tasks and tools
โ”œโ”€โ”€ config/              # build configs and paths definitions
โ”œโ”€โ”€ dist/                # compiled result
โ”œโ”€โ”€ node_modules/        # node dependencies        
โ”œโ”€โ”€ src/                 # source files
โ””โ”€โ”€ package.json         # npm configuration file

config/ folder

This folder contains application build configurations and paths definitions. For adding/removing NPM dependencies you need to manually define the paths in config/index.js file after the module installation.

build/ folder

This folder contains files related to our application compilation. That can be styles preprocessing (LESS,SASS,PostCSS) and template engine compilation, script file concatenation and minification and other related tasks.

โ”œโ”€โ”€ tasks/                           # tasks folder
|   โ””โ”€โ”€ {different tasks}            # each file represents a single build task
โ”œโ”€โ”€ utils/                           # some utils
โ””โ”€โ”€ gulpfile.js                      # main build file for gulp build system

src/ folder

This folder contains our application source files. The folder structure reflects the app component structure.

Each non-underscored folder represents a single component module. Modules can be nested inside each other.

There are also special folders which start with an underscore. For example _common/ folder contains common components that are used by other components at the same level.

This file structuring makes our app file organization very semantic and scalable. Also It's very easy to work on separate components even if you're developing large-scale applications.

โ”œโ”€โ”€ _assets/                           # application assets
โ”œโ”€โ”€ _common/                           # common components
|   โ”œโ”€โ”€ helpers/                       # handlebars helpers
|   โ””โ”€โ”€ styles/                        # application common styles
โ”œโ”€โ”€ _themes/                           # different theme versions
โ”œโ”€โ”€ app/                               # app module (dashboard view)
โ”‚   โ”œโ”€โ”€ _common/                       # app common components
โ”‚   |   โ”œโ”€โ”€ editor/                    # wysiwyg editor files
โ”‚   |   โ”œโ”€โ”€ footer/                    # footer files
โ”‚   |   โ”œโ”€โ”€ header/                    # header files
โ”‚   |   โ”œโ”€โ”€ modals/                    # common modal dialogs (confirm, image library, etc)
โ”‚   |   โ””โ”€โ”€ sidebar/                   # sidebar files
โ”‚   โ”œโ”€โ”€ {different modules}
โ”‚   โ”œโ”€โ”€ app-layout.hbs                 # app view layout
โ”‚   โ””โ”€โ”€ app.scss                       # main app view styles
โ”œโ”€โ”€ auth/                              # auth module (login/signup/recover)
โ”‚   โ”œโ”€โ”€ {different modules}
โ”‚   โ”œโ”€โ”€ auth-layout.hbs                # auth view layout
โ”‚   โ””โ”€โ”€ auth.scss                      # main auth view styles
โ”œโ”€โ”€ _context.js                        # main handlebars variables
โ”œโ”€โ”€ _main.scss                         # main styles
โ”œโ”€โ”€ _variables.scss                    # variables
โ”œโ”€โ”€ config.js                          # javascript configs
โ””โ”€โ”€ main.js                            # main script file

dist/ folder

Compiled state of our app with processed styles, templates, scripts and assets.

Warning! Never work inside this folder, because your changes would be overwritten on every build


File Types

Our app consists of different file types.

Styles (*.scss)

We use SASS as CSS preprocessor language. Main variables are defined in src/_variables.scss folder. For making life easier we broke down styles into components, and on build we're just merging all .scss files together and processing it to dist/css/app.css file. Style files are merged in the following order

{variables.scss}
{bootstrap variables}
{bootstrap mixins}
{rest style files}

The remaining style files are merged in the alphabetical order.

There are also different theme variations located in src/_themes/ folder, where you can change the main variables to get different themes. There are a few predefined themes built in. You can add new themes by adding a new file in src/_themes/ folder. The file name must end with -theme.scss.

Scripts (*.js)

We separate application's scripts across its components. For simplicity we use ES5 in this version, and just wrap each component's script in jQuery $(function() { }). JS configurations are defined in src/config.js file. On build, application script files are merged together and copied to dist/js/app.js folder. The script files are merged in the following order.

{config.js}
{all .js files except main.js}
{main.js}

Templates (*.hbs)

Templates are pieces of HTML files written in template engine language. We use Handlebars, which allows to have conditions in HTML, reuse partials in different pages (e.g. sidebars, footers), use loops, layouts etc.

Pages (*-page.hbs)

Templates themselves are just parts of the markup, and aren't compiled as separate files. What we really want in the final output is a .html page in the dist/ folder. There are special handlebar templates for it, their filenames ending with -page.hbs. Each {pagename}-page.hbs file would be compiled to dist/{pagename}.html page with a flatened file structure.

Pages can consist of different templates (partials) which can be included thanks to handlebars partial including feature. Also each page has its context, which is a data passed into the template on rendering. That data is used in template expressions and variables. page contexts can be defined in two ways:

YAML headers (example)

---
foo: bar
list: 
  - One
  - Two
  - Three
---

and _context.js files.

module.exports = {
  foo: 'bar',
  foo2: function() {
    // do some magic, return some string
  },
  list: [
    'One', 'Two', 'Three'
  ]
}

The final result of page context is a combination of both ways. Moreover, different depth level _context.js files are extending each other and then are extended with YAML headers data. For simplicity we use only YAML headers.

Layouts (*-layout.hbs)

If different pages have a lot of common components like sidebars, headers, footers, then it's a good idea to define a layout for those common pages, and define in page files only the content which is unique.

Layout is a page content wrapper. If the page has a layout in output we'll get page's content inserted into the layout. Layouts should have {{{body}}} handlebars tag, which is entry point for the page content. (example)

To define a page layout you need to specify page file context's layout variable. It can be done both with a YAML header or a _context.js file. (example).

Layouts can also have contexts and parent layouts.

{_main-layout.hbs}                  # main layout with doctype, head, scripts declaration
    {app/app-layout.hbs}            # dashboard layout with sidebar, header and footer
        {app/forms/forms-page.hbs}  # any dashboard page

If you need more advanced layouting with multiple content blocks at the same time you can use handlebar-layouts helper approach, which is also available out of the box.


Running in Docker

You can run the project in docker. To build the container, you need to install docker and docker-compose than launch the docker daemon. After launching the daemon run the following commands from the project folder:

Build the image

docker-compose build

Launch the container

docker-compose up

Support me!

Creating a good quality project takes a lot's of time, so any help is really appreciated!

https://www.patreon.com/modularcoder

Contribute

Be part of our team! Feel free to open new issues/pull-requests.

Get in touch

You can get in touch with us in gitter chat Join the chat at https://gitter.im/modularcode/modular-admin or in the ModularCode Facebook Group. Feel free to contact us with any questions, sugestions, remarks and potential feature requests that you might have.

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

Credits

modular-admin-html's People

Contributors

arammanukyan avatar brucepc avatar codebude avatar danielkaviyani avatar davidtiger92 avatar ex37 avatar henrikhabajyan avatar japrogramer avatar johnfraney avatar miskaryan64 avatar modularcoder avatar mon-compte-github avatar mstratman avatar xdamman 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  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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

modular-admin-html's Issues

Quill Media Not Working

Hi,
great dashboard theme. I found a problem though. When I set 'image-tooltip': true, in Quill setting image media button is not working properly.

How do I fix that? I tried replacing your html with official html. I actually opened media modal but I could not enter any text.

Update to Bootstrap v4.0.0-alpha.5

To whom it may concern, I updated my local version to the current Bootstrap 4, didn't see any issues so far and it was quite simple.

Change line in bower.json to
"bootstrap": "v4.0.0-alpha.5",

and in modular-admin-html/src/_common/_styles/layout.scss replace
"$grid-gutter-width" with "$grid-gutter-width-base"

Run bower install again before npm start and enjoy!

Required JS?

Hi,
I'm trying to integrate the code in my application (an Angular 4 builded with Webpack and ASP.NET Core as server) and I cannot understand witch is the JS code to integrate to run the modular admin feature (eg. the sidebar menu). Not the vendors, as Bootstrap, nor the code used to run the demo. Just the JS that "runs the template"...

thanks

Source version

Hello and thank you for great template.
Is there any option to use Bootstrap and other libraries directly instead using vendor.js?
With other words, I want to upgrade to Bootstrap v4. alpha 6 - how to do that?
Thank you.

Media manager

Hi,
what about titles for images in gallery?
Is should add it?
What plugin is used or it is custom?

thx

login form ajax

Sorry, i'm french and my english is verry bad.
I want to using ajax :
`var dataString = $('#login-form').serialize(); // Collect data from form
$.ajax({
type: "POST",
url: $('#login-form').attr('action'),
data: dataString,
timeout: 6000,
error: function (request, error) {

            },
            success: function (response) {
                response = $.parseJSON(response);
               if (response.success) {
                    alert('ok');
                 } 
               
            }
            
            
        });
        return false;`

But I do not know how. Please help me.

Design Items list Bulk actions

After selecting multiple items, we need to be able to make bulk operations, for example delete or mark as draft.

Ideas

  • Refer to wordpress editor's design, add dropdown near search dialog.

2016-01-12_0123

Implement gulp-sass-globe into app styles task

Now all sass files are concatenated before SASS compilation.
Because of that when there is a syntax error in sass, It's hard to find the file causing it.

Using gulp-sass-globe instead of concatenation may solve this issue.

Item editor page: images sorting.

Attached images sorting is buggy, the add button should not be sortable within other images.
The featured image should have additional class "main", and have different color border (maybe #FFB300?).

PSD

Hii,
Where can i find the PSDs templates?

webpack

Is it possible to use with the WebPack? I tried it, after installing over NPM, but the problem is with missing "main" in the package.json

Side menu expand collapse not working

Hi i am using modular theme and i am stuck this side menu.Side menu expand collapse functionality not working for me.When i click on a menu that has dropdown menus nothing happens.but demo page index.html working fine.Anyone plz help.

Cannot built app stylesheet

app.scss looks like it should be buildable, since it does not begin with an underscore, but:

$ sassc modular-admin/app/app.scss > app/app.css
sassc: error: Error: Undefined variable: "$sidebar-width".
        on line 4 of modular-admin/app/app.scss
>> 	padding-left: $sidebar-width;
   ---------------^

It seems like it should import variables, right?

If I add imports at the top of app.scss, then I can compile it stand-along:

@import '../variables';
@import '../../bootstrap/scss/variables';
@import '../../bootstrap/scss/mixins';
@import '../_common/_styles/mixins';

But since this is "modular" admin, I think each module should be capable of stand-alone build, right? Or did I misunderstand the meaning?

Using autocomplete (jqueryui)

Dear all,

I'm trying to implement autocomplete from jqueryui into modular-admin.
Unfortunately it seems that putting jquery script into the template conflicts.
Scripts of jquery are added into the header, app.js and vendor.js into the end.
Console shows "autocomplete is not a function".

If I delete app.js and vendor.js then all is working with the jquery code.

Any idea to solve this problem?

Rgds

Modal backdrop

Hello, I used your module for the application I am creating at this time. My problem is on the modal box I use the jelix framework and the modal box is called via ajax, the box appears very well but when I click on the close button, the box disappears but there is always the page remains grayed out . Thank you in advance.
Sorry for English.

Sometimes charts are not redrawn on theme change

Sometimes charts are not redrawn on theme change.

Remove Watch.JS and use event, triggered on theme change. Redraw charts on event

$(document).trigger("themechange");

$(document).on("themechange", function(){
  // redraw...
});

Css and alignment are crashed after loading js

Hello
i am coding with code ignitor after integrating with modular-admin my css and alignment got crashed
first everything loading fine but once "js/vendor.js" load it get crashed,
if disabled js/vendor.js this line all working fine but no graph e.t.c..

Get rid of global functions

There are lot of global functions (see compiled app.js file)
We need to move most of those functions into

$(function() { });

to remove them from global scope

Sparkline feature hardcoded to random values

Hi, first off ... wow, awesome work. Thank you so much for this! I can't want to show you what I'm doing towards making it simple for ASP.NET MVC Core 1.0 developers to utilize this in real apps. Spending this week on it.

Issue:

In app.js, lines 1108 to 1124, I would recommend somehow allowing developers to pass in data. If the data is empty, THEN generate random data (lines 1112-1116).

As it stands right now, I'm not entirely sure how to expose the sparkline functionality to end-user-developers without editing any of the files in the /dist folder (which is where I'm choosing as the integration point with my Visual Studio solution so I can completely wipe out an older version of Modular Admin and paste your latest changes into without blowing away any code I've written.)

Any advice / workaround?

Side menu not working

Hi,
I am using modular admin for my mvc project i use the index.html as my layout page .but the side menu not expanding and collapsing.Any suggestions will help me .
Thanks in advance

Feature request: Dockerfile

I would like to request that a docker file be created so that me and many other people can get started quicker. This would help people who are not familiar with npm and would like to just get started with one simple command like

docker built -t modular-admin .

webpack

Is it possible to use with the WebPack? I tried it, after installing over NPM, but the problem is with missing "main" in the package.json

NodeJS 8.x - not building/installing on this one

I couldn't get this project running using the latest version of NodeJS (8.1.2). Played around a bit, it kept throwing errors like "Python27 could not be found" (even though it's there) and "Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (57)" etc. I downgraded to NodeJS 6 LTS and tried it as well with NodeJS 7 and both worked perfectly fine, however. Once I upgrade to NodeJS 8 nothing works.

Add LICENSE

Pick a corresponding license and add it to LICENSE file in the project root.

Only need one theme, so I need to modify/remove this code from app.js

Hi,

I am modifying the layout to suit.
However I have some code below that I dont know how to modify/remove it, because I dont think I need it if I just want one theme colour.
If I stop it, the sidebar doesn't animate in/out and the Nprogress bar doesn't display.
Any thought will help me.

Thanks.

/************************************************
*   Storage Functions
*************************************************/
function getThemeSettings() {
    var settings = (localStorage.getItem('themeSettings')) ? JSON.parse(localStorage.getItem('themeSettings')) : {};
    settings.headerPosition = settings.headerPosition || '';
    settings.sidebarPosition = settings.sidebarPosition || '';
    settings.footerPosition = settings.footerPosition || '';
    return settings;
}
function saveThemeSettings() {
    localStorage.setItem('themeSettings', JSON.stringify(themeSettings));
}

});
$(function() {
$("body").addClass("loaded");
});

Adjust content element offsets

In some cases we may want to have pages without content offset.
The current layout makes impossible have pages without inner content offset.

image

Dropzone already attached.

I'm using this template for an app with ASP.NET MVC.

Just change the paths of the files in Index.html and in vendor.js so you do not look in css / app

Uncaught Error: Dropzone already attached.
at new Dropzone (http://localhost:32340/Scripts/vendor.js:42561:15)
at Function.Dropzone.discover (http://localhost:32340/Scripts/vendor.js:43599:23)
at Dropzone._autoDiscoverFunction (http://localhost:32340/Scripts/vendor.js:43881:23)
at HTMLDocument.init (http://localhost:32340/Scripts/vendor.js:43850:19)

image

Little style change

.card .card-header .title {
      color: #ffffff;
}

Seems more compatible with theme.

Thank you for your efforts.

Window.onTop(X,Y) - Header and sidebar fixed

Hi!

I've a question about the template, I wish to do "window.onTop(0,0)" to move the scroll when the user change between pages but it doesn't work due to the page (layout container) are in the top (0,0).

This problem appear in all case studies (header and sidebar fixed and static).
Any suggest?

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.