modular-admin-html

WebJar for modular-admin-html

License

License

ISC
Categories

Categories

Github Development Tools Version Controls
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

github-com-modularcode-modular-admin-html
Last Version

Last Version

1.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

modular-admin-html
WebJar for modular-admin-html
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

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

Download github-com-modularcode-modular-admin-html

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-modularcode-modular-admin-html/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-modularcode-modular-admin-html</artifactId>
    <version>1.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-modularcode-modular-admin-html/
implementation 'org.webjars.npm:github-com-modularcode-modular-admin-html:1.3.0'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-modularcode-modular-admin-html/
implementation ("org.webjars.npm:github-com-modularcode-modular-admin-html:1.3.0")
'org.webjars.npm:github-com-modularcode-modular-admin-html:jar:1.3.0'
<dependency org="org.webjars.npm" name="github-com-modularcode-modular-admin-html" rev="1.3.0">
  <artifact name="github-com-modularcode-modular-admin-html" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-modularcode-modular-admin-html', version='1.3.0')
)
libraryDependencies += "org.webjars.npm" % "github-com-modularcode-modular-admin-html" % "1.3.0"
[org.webjars.npm/github-com-modularcode-modular-admin-html "1.3.0"]

Dependencies

compile (23)

Group / Artifact Type Version
org.webjars.npm : jquery.browser jar [0.1.0,0.2)
org.webjars.npm : jqvmap jar [1.5.1,2)
org.webjars.npm : jquery-touchswipe jar [1.6.18,2)
org.webjars.npm : morris.js jar [0.5.0,0.6)
org.webjars.npm : tether jar [1.4.3,2)
org.webjars.npm : dropzone jar [5.3.0,6)
org.webjars.npm : raphael jar [2.2.7,3)
org.webjars.npm : opencollective jar [1.0.3,2)
org.webjars.npm : jquery-validation jar [1.17.0,2)
org.webjars.npm : jquery-sparkline jar [2.4.0,3)
org.webjars.npm : quill jar [1.3.5,2)
org.webjars.npm : metismenu jar [2.7.2,3)
org.webjars.npm : responsive-toolkit jar [2.6.3,3)
org.webjars.npm : font-awesome jar [4.7.0,5)
org.webjars.npm : popper.js jar [1.12.9,2)
org.webjars.npm : jquery.flot.tooltip jar [0.9.0,0.10)
org.webjars.npm : jquery jar [3.0.0,4)
org.webjars.npm : sortablejs jar [1.7.0,2)
org.webjars.npm : animate.css jar [3.5.2,4)
org.webjars.npm : nprogress jar [0.2.0,0.3)
org.webjars.npm : tinycolor2 jar [1.4.1,2)
org.webjars.npm : bootstrap jar [4.0.0,5)
org.webjars.npm » jquery-flot jar [0.8.3,0.9)

Project Modules

There are no modules declared in this project.

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!

Support me on Patreon

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

org.webjars.npm

ModularCode

Full-Stack Modular Web Development

Versions

Version
1.3.0