Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
774 additions
and
883 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
## How to involve external library ## | ||
|
||
```bash | ||
npm install --save <external library> | ||
``` | ||
|
||
Open `js/fw/ext/main.js`, `import` it, and append the module name to `export` array if provided. | ||
|
||
## Why Dependency Injection looks so weird in this skeleton ## | ||
|
||
This is because [ng-annotate](https://github.com/olov/ng-annotate) is chosen for for providing quick DI. | ||
|
||
## How to add new route ## | ||
|
||
You will find a `Routes.js` in each "feature" folder, it's an `Array` to be exported, and each `object` in it is used to describe a `Route`. | ||
|
||
You can easily append more to an exist `feature`, or add a new `feature` with route. | ||
|
||
## Why `main.js` exist in each folder ## | ||
|
||
The `main.js` in each folder takes the responsibility for managing all modules in that folder, according to such concept, it's more robust to extend functionality without modifying other features. | ||
|
||
## How to use jquery ## | ||
|
||
```bash | ||
npm install --save jquery | ||
``` | ||
|
||
If you'd like to add [jquery](http://jquery.com/) as replacement of `jqLite`, you have to modify the `webpack.config.dev.js` and `webpack.config.prod.js` with following plugin added: | ||
|
||
```javascript | ||
new webpack.ProvidePlugin({ | ||
$: 'jquery', | ||
'window.jQuery': 'jquery' | ||
}), | ||
``` | ||
|
||
>This is because `AngularJS` internally check if `window.jQuery` provided | ||
|
||
## References ## | ||
|
||
1. [yeoman](http://yeoman.io/) | ||
2. [gulp](http://gulpjs.com/) | ||
3. [webpack](http://webpack.github.io/) | ||
4. [es6-features](https://github.com/lukehoban/es6features) | ||
5. [angular](https://angularjs.org/) | ||
6. [angular-material](https://material.angularjs.org/latest/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
/* body */ | ||
*{ | ||
box-sizing: border-box; | ||
} | ||
|
||
html, body{ | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
body{ | ||
font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; | ||
} | ||
|
||
a[disabled]{ | ||
pointer-events: none; | ||
color: #7f8c8d; | ||
} | ||
|
||
a{ | ||
text-decoration: none; | ||
color: #2E64FE; | ||
} | ||
|
||
[ng-view]{ | ||
text-align: center; | ||
} | ||
|
||
/* nav */ | ||
#nav { | ||
list-style-type: none; | ||
text-align: center; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
#nav li { | ||
display: inline-block; | ||
line-height: 40px; | ||
} | ||
|
||
.nav-link { | ||
color: #7f8c8d; | ||
cursor: pointer; | ||
text-decoration: none; | ||
padding-bottom: 3px; | ||
margin: 0 25px; | ||
} | ||
|
||
.nav-link.active { | ||
color: #424242; | ||
} | ||
|
||
.nav-link:first-child { | ||
margin-left: 0; | ||
} | ||
|
||
.nav-link:hover { | ||
border-bottom: 3px solid #dd1b16; | ||
} | ||
|
||
/* logo */ | ||
#logo-wrap { | ||
margin: 55px 0 20px 0; | ||
} | ||
|
||
#logo-wrap img{ | ||
margin-bottom: 15px; | ||
} | ||
|
||
#logo-wrap h1 { | ||
font-family: 'Dosis', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; | ||
font-weight: 400; | ||
font-size: 27px; | ||
} | ||
|
||
#desc { | ||
max-width: 800px; | ||
padding: 0 20px; | ||
text-align: center; | ||
margin: 10px auto; | ||
color: #7f8c8d; | ||
} | ||
|
||
#github{ | ||
margin: 30px 0 30px 0; | ||
} | ||
|
||
#todo-app{ | ||
width: 250px; | ||
margin: 0 auto; | ||
} | ||
|
||
#todo-app input[type="text"]{ | ||
width: 250px; | ||
height: 35px; | ||
font-size: 16px; | ||
padding: 6px 12px; | ||
border: 1px solid #ccc; | ||
border-radius: 4px; | ||
margin-bottom: 10px; | ||
} | ||
|
||
#todo-app .todos{ | ||
width: 100%; | ||
list-style-type: none; | ||
margin: 10px 0 10px 0 ; | ||
padding: 0; | ||
text-align: left; | ||
} | ||
|
||
#todo-app .todos li{ | ||
padding-top: 4px; | ||
} | ||
|
||
#todo-app .todos li span{ | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
width: 225px; | ||
display: inline-block; | ||
line-height: 24px; | ||
vertical-align: middle; | ||
} | ||
|
||
#todo-app .archive{ | ||
text-decoration: none; | ||
} | ||
|
||
#why{ | ||
width: 600px; | ||
margin: 55px auto 15px auto; | ||
padding: 5px; | ||
text-align: left; | ||
border: 1px solid #D8D8D8; | ||
border-radius: 2px; | ||
background-color: #f7f7f9; | ||
} | ||
|
||
#why h4{ | ||
margin-top: 0; | ||
} | ||
|
||
#why ul li { | ||
padding-top: 5px; | ||
} | ||
|
||
#more{ | ||
width: 600px; | ||
margin: 30px auto 15px auto; | ||
padding: 5px; | ||
} | ||
|
||
#more .button{ | ||
display: inline-block; | ||
width: 150px; | ||
height: 35px; | ||
line-height: 35px; | ||
color: #fff; | ||
border-radius: 2px; | ||
border-width: 0; | ||
background-color: #FE2E2E; | ||
box-shadow: 2px 2px 1px #a6120d; | ||
transition: all 0.3s ease 0s; | ||
} | ||
|
||
#more .button:hover{ | ||
box-shadow: 4px 4px 2px #a6120d; | ||
} | ||
|
||
/* footer */ | ||
#footer{ | ||
margin-top: 20px; | ||
text-align: center; | ||
padding: 20px 0; | ||
background-color: #D8D8D8; | ||
} |
Oops, something went wrong.