Skip to content

Commit 664f01e

Browse files
committed
Merge branch 'develop' of github.com:modularcode/modular-admin-html into develop
2 parents 1237721 + 7694538 commit 664f01e

16 files changed

Lines changed: 202 additions & 110 deletions

File tree

README.md

Lines changed: 78 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,38 @@
44
> built in modular way. That makes it awesomely easy to scale, modify and maintain.
55
66
> This is the HTML version, which is great for enhancing and integrating it into other platforms and environments.
7-
> AngularJS, React and Meteor versions are coming soon.
7+
> AngularJS, Angular2, React and Meteor versions are coming soon.
88
99
<a href="http://modularcode.github.io/modular-admin-html/" target="_blank">
1010
![demo](http://modularcode.github.io/modular-admin-html/assets/demo.png)
1111
</a>
1212

13-
Demo: http://modularcode.github.io/modular-admin-html/
13+
<p align="center">
14+
<strong>
15+
<a href="http://modularcode.github.io/modular-admin-html/" target="_blank">View Demo</a> | <a href="https://github.com/modularcode/modular-admin-html/archive/master.zip" target="_blank">Download ZIP</a>
16+
</strong>
17+
</p>
18+
19+
### Table of contents
20+
21+
* [Browser support](#browser-support)
22+
* [Getting started](#getting-started)
23+
* [Folder structure](#folder-structure)
24+
* [File types](#file-types)
25+
* [Build tasks](#build-tasks)
26+
* [Get in touch](#get-in-touch)
27+
28+
-------
29+
30+
## Browser support
31+
32+
* Last 2 Versions FF, Chrome, IE 10+, Safari Mac
33+
* IE 10+
34+
* Android 4.4+, Chrome for Android 44+
35+
* iOS Safari 7+
36+
37+
Some of the components use new Flexbox Layout module which is available in modern browsers. Bootstrap4 is used as main fraimwork.
38+
Please make sure if that's suitable for you [Flexbox browser support](http://caniuse.com/#feat=flexbox).
1439

1540
## Getting Started
1641

@@ -22,7 +47,7 @@ npm install -g bower
2247

2348
Clone repository to local `modular-admin` folder
2449
```
25-
git clone git@github.com:modularcode/modular-admin-html.git modular-admin -b master --single-branch
50+
git clone git@github.com:modularcode/modular-admin-html.git modular-admin
2651
```
2752

2853
Change to new folder
@@ -61,7 +86,17 @@ Open the project [http://localhost:4000](http://localhost:4000).
6186
└── package.json # npm configuration file
6287
```
6388

64-
```src/``` folder
89+
#### ```src/``` folder
90+
91+
In this folder are our application source files located.
92+
The folder structure represents app component structure.
93+
94+
Each non-underscored folder represents a single component module. Modules can be nested inside each other.
95+
96+
There are also special folders which start with underscore.
97+
For example ```_common/``` folder contains common components that are used by other components at the same lavel.
98+
99+
This file structuring makes our app file organization very semantic and scalable. Also It's very easy to work on separate components even if we're developing large-scale application.
65100

66101
```
67102
├── _assets/ # application assets
@@ -71,8 +106,10 @@ Open the project [http://localhost:4000](http://localhost:4000).
71106
├── _themes/ # different theming versions
72107
├── app/ # app module (dashboard view)
73108
│ ├── _common/ # app common components
74-
│ | ├── header/ # header files
109+
│ | ├── editor/ # whyiwyg editor files
75110
│ | ├── footer/ # footer files
111+
│ | ├── header/ # header files
112+
│ | ├── modals/ # common modal dialogs (confirm, image library, etc)
76113
│ | └── sidebar/ # sidebar files
77114
│ ├── {different modules}
78115
│ ├── app-layout.hbs # app view layout
@@ -89,15 +126,49 @@ Open the project [http://localhost:4000](http://localhost:4000).
89126
90127
```
91128

92-
```build/``` folder
129+
#### ```build/``` folder
93130

94-
@ToDo
131+
In this folder are located files related to our application building. That can be stype preprocessors and template engine compilation, script files concatenation and minification and other related tasks.
132+
133+
```
134+
├── paths/ # application file paths
135+
| ├── app.js # application file paths
136+
| └── vendor.js # 3-rd party plugins paths
137+
├── tasks/ # tasks folder
138+
| └── {different tasks} # each file represents a single build task
139+
├── utils/ # some utils
140+
├── config.js # build configs
141+
└── gulpfile.js # main build file for gulp build system
142+
143+
```
144+
145+
#### ```public/``` folder
146+
147+
Compiled state of our app with processed styles, templates, scripts and assets.
148+
149+
**Warning! Never work inside this folder, because your changes would be overwritten on every build**
95150

96151

97152
## File Types
98153

154+
Our app consists of different file types.
155+
99156
#### Styles (*.scss)
100157

158+
We use [SASS](http://sass-lang.com/) as CSS preprocessor language.
159+
Main variables are defined in ```src/_variables.scss``` folder.
160+
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 ```pubilc/css/app.css``` file. Style files are merged in following order
161+
162+
```
163+
{variables.scss}
164+
{bootstrap variables}
165+
{bootstrap mixins}
166+
{rest style files}
167+
```
168+
The rest style files are merged in alphabetical order depending on their deepth level.
169+
170+
There are also different theme variations located in ```src/_themes/``` folder, where you can overwrite main variables and get different themes. There are few predefined themes built in. You can add new theme by adding new file in ```src/_themes/``` folder. The file name should end with ```-theme.scss```.
171+
101172
#### Scripts (*.js)
102173

103174
#### Layouts (*-layout.hbs)

build/gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ gulp.task('watch', function() {
7070

7171
// Builds and deploys to github pages
7272
gulp.task('deploy', ['build'], function() {
73-
return gulp.src('../public/**/*')
73+
return gulp.src('../dist/**/*')
7474
.pipe(plugins.ghPages({
7575
cacheDir: '../.deploy'
7676
}));

src/_common/logo/logo.hbs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<div class="logo">
2+
<span class="l l1"></span>
3+
<span class="l l2"></span>
4+
<span class="l l3"></span>
5+
<span class="l l4"></span>
6+
<span class="l l5"></span>
7+
</div>

src/_common/logo/logo.scss

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
.logo {
2+
display: inline-block;
3+
width: 45px;
4+
height: 25px;
5+
vertical-align: middle;
6+
margin-right: 5px;
7+
// background-color: fade(#fff, 10%);
8+
position: relative;
9+
10+
.l {
11+
width: 11px;
12+
height: 11px;
13+
border-radius: 50%;
14+
background-color: $color-primary;
15+
position: absolute;
16+
17+
&.l1 {
18+
bottom: 0;
19+
left: 0;
20+
}
21+
22+
&.l2 {
23+
width: 7px;
24+
height: 7px;
25+
bottom: 13px;
26+
left: 10px;
27+
}
28+
29+
&.l3 {
30+
width: 7px;
31+
height: 7px;
32+
bottom: 4px;
33+
left: 17px;
34+
}
35+
36+
&.l4 {
37+
bottom: 13px;
38+
left: 25px;
39+
}
40+
41+
&.l5 {
42+
bottom: 0;
43+
left: 34px;
44+
}
45+
}
46+
}

src/_common/navigation/navigation.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
a:not(.btn) {
2-
display: inline-block;
3-
position: relative;
4-
overflow: hidden;
5-
vertical-align: top;
6-
z-index: 0;
2+
// display: inline-block;
3+
// position: relative;
4+
// overflow: hidden;
5+
// vertical-align: top;
6+
// z-index: 0;
77
transition: $link-transition;
88
text-decoration: $link-decoration;
99
color: $link-color;
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
<div class="sidebar-header">
22
<div class="brand">
3-
<div class="logo">
4-
<span class="l l1"></span>
5-
<span class="l l2"></span>
6-
<span class="l l3"></span>
7-
<span class="l l4"></span>
8-
<span class="l l5"></span>
9-
</div>
3+
{{> _common/logo/logo}}
104
{{themeTitle}}
115
</div>
126
</div>

src/app/_common/sidebar/header/header.scss

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,54 +5,7 @@
55
padding-left: 25px;
66
line-height: $header-height;
77
font-size: 16px;
8-
9-
.logo {
10-
display: inline-block;
11-
width: 45px;
12-
height: 25px;
13-
vertical-align: middle;
14-
margin-right: 5px;
15-
// background-color: fade(#fff, 10%);
16-
position: relative;
17-
18-
.l {
19-
width: 11px;
20-
height: 11px;
21-
border-radius: 50%;
22-
background-color: $color-primary;
23-
position: absolute;
24-
25-
&.l1 {
26-
bottom: 0;
27-
left: 0;
28-
}
29-
30-
&.l2 {
31-
width: 7px;
32-
height: 7px;
33-
bottom: 13px;
34-
left: 10px;
35-
}
36-
37-
&.l3 {
38-
width: 7px;
39-
height: 7px;
40-
bottom: 4px;
41-
left: 17px;
42-
}
43-
44-
&.l4 {
45-
bottom: 13px;
46-
left: 25px;
47-
}
48-
49-
&.l5 {
50-
bottom: 0;
51-
left: 34px;
52-
}
53-
}
54-
}
55-
8+
569
@include media-down(sm) {
5710
line-height: $header-height-xs;
5811
font-size: 16px;

src/app/pages/error-404-alt/error-404-alt-page.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ page: error-404-alt
44
{{#extend "auth/auth-layout"}}
55
{{#content "body"}}
66

7-
<div class="error-card center">
7+
<div class="error-card global">
88
<div class="error-title-block">
99
<h1 class="error-title">404</h1>
1010
<h2 class="error-sub-title">

src/app/pages/error-500-alt/error-500-alt-page.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ page: error-500-alt
44
{{#extend "auth/auth-layout"}}
55
{{#content "body"}}
66

7-
<div class="error-card center">
7+
<div class="error-card global">
88
<div class="error-title-block">
99
<h1 class="error-title">500</h1>
1010
<h2 class="error-sub-title">

src/app/pages/error.scss

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,13 @@
33
min-height: 330px;
44
margin: 60px auto;
55

6-
&.center {
7-
position: absolute;
8-
top: 50%;
9-
left: 50%;
10-
transform: translateY(-50%) translateX(-50%);
11-
margin: 0;
12-
}
13-
146
.error-title {
157
font-size: 150px;
168
line-height: 150px;
179
font-weight: 700;
1810
color: #252932;
1911
text-align: center;
20-
text-shadow: rgba(61, 61, 61, 0.3) 1px 1px, rgba(61, 61, 61, 0.2) 2px 2px, rgba(61, 61, 61, 0.3) 3px 3px;
12+
text-shadow: rgba(61, 61, 61, 0.3) .5px .5px, rgba(61, 61, 61, 0.2) 1px 1px, rgba(61, 61, 61, 0.3) 1.5px 1.5px;
2113
}
2214

2315
.error-sub-title {
@@ -33,14 +25,32 @@
3325
visibility: visible;
3426
}
3527
}
28+
29+
&.global {
30+
position: absolute;
31+
top: 50%;
32+
left: 50%;
33+
transform: translateY(-50%) translateX(-50%);
34+
margin: 0;
35+
36+
.error-title {
37+
color: #ffffff;
38+
}
39+
40+
.error-sub-title,
41+
.error-container {
42+
color: #ffffff;
43+
}
44+
}
3645
}
3746

3847
@include media(md) {
3948
.error-card {
4049
width: 50%;
4150

42-
&.center {
51+
&.global {
4352
position: relative;
53+
top: 25%;
4454
left: 0;
4555
transform: inherit;
4656
margin: 40px auto;
@@ -52,8 +62,9 @@
5262
.error-card {
5363
width: 90%;
5464

55-
&.center {
65+
&.global {
5666
position: relative;
67+
top: 25%;
5768
left: 0;
5869
transform: inherit;
5970
margin: 40px auto;

0 commit comments

Comments
 (0)