Skip to content

Commit 77af912

Browse files
author
K.C. Hunter
committed
Base template
1 parent 8d3393b commit 77af912

8 files changed

Lines changed: 139 additions & 37 deletions

File tree

GruntFile.js

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ module.exports = function (grunt)
66
options: {
77
separator: "\n\n"
88
},
9-
dist: {
9+
dev: {
1010
src: ['src/resources/js/**/*.js'],
1111
dest: 'src/<%= pkg.name %>.js'
1212
},
1313
deps: {
1414
src: [
1515
'bower_components/modernizr/modernizr.js',
16-
'bower_components/jquery/dist/jquery.js',
17-
'bower_components/bootstrap/dist/js/bootstrap.js',
16+
'bower_components/jquery/dist/jquery.min.js',
17+
'bower_components/bootstrap/dist/js/bootstrap.min.js',
1818
'bower_components/angularjs/angular.min.js',
1919
'bower_components/angular-route/angular-route.min.js'
2020
],
@@ -26,11 +26,17 @@ module.exports = function (grunt)
2626
],
2727
dest: 'src/resources/css/<%= pkg.name %>.css'
2828
},
29-
move: {
29+
dist: {
30+
files: {
31+
'bin/<%= pkg.name %>.min.js': ['src/<%= pkg.name %>.min.js'],
32+
'bin/<%= pkg.name %>-deps.js': ['src/<%= pkg.name %>-deps.js']
33+
}
34+
},
35+
moveMap: {
3036
src: ['bower_components/angularjs/angular.min.js.map'],
3137
dest: 'src/angular.min.js.map'
3238
},
33-
map: {
39+
moveRoute: {
3440
src: ['bower_components/angular-route/angular-route.min.js.map'],
3541
dest: 'src/angular-route.min.js.map'
3642
}
@@ -57,6 +63,33 @@ module.exports = function (grunt)
5763
files: {
5864
'src/resources/css/styles.css': 'src/resources/css/styles.scss'
5965
}
66+
},
67+
dist: {
68+
options: {
69+
style: 'compressed',
70+
noCache: true,
71+
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
72+
'<%= grunt.template.today("mm-dd-yyyy") %> */'
73+
},
74+
files: [{
75+
expand: true,
76+
src: '*/resources/css/styles.scss',
77+
dest: 'bin/',
78+
ext: '.css'
79+
}]
80+
}
81+
},
82+
83+
uglify: {
84+
options: {
85+
mangle: false,
86+
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
87+
'<%= grunt.template.today("mm-dd-yyyy") %> */'
88+
},
89+
distJS: {
90+
files: {
91+
'src/<%= pkg.name %>.min.js': ['src/<%= pkg.name %>.js']
92+
}
6093
}
6194
},
6295

@@ -86,6 +119,6 @@ module.exports = function (grunt)
86119

87120
grunt.registerTask('build', 'Build the application',
88121
['sass:dev',
89-
'concat:dist', 'ngAnnotate:dist', 'concat:css', 'concat:move', 'concat:map'
122+
'concat:dist', 'ngAnnotate:dist', 'concat:css', 'concat:moveMap', 'concat:moveRoute'
90123
]);
91124
}

bower.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"jquery": "~2.1.1"
3535
},
3636
"devDependencies": {
37-
"angular-route": "~1.3.7"
37+
"angular-route": "~1.3.7",
38+
"angular-animate": "~1.3.10"
3839
}
3940
}

src/angularjstutorial.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.html

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,68 @@
1010

1111
<link rel="stylesheet" href="resources/css/angularjstutorial.css">
1212
</head>
13-
<body>
13+
<body data-ng-app="WebApp">
1414

15-
<div class="mainContainer" data-ng-app="MyApp">
16-
<div data-ng-controller="MainCtrl">
17-
{{message}}
15+
<header>
16+
<div class="navbar navbar-inverse">
17+
<div class="container-fluid">
18+
<div class="navbar-header">
19+
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
20+
<span class="sr-only">Toggle navigation</span>
21+
<span class="icon-bar"></span>
22+
<span class="icon-bar"></span>
23+
<span class="icon-bar"></span>
24+
</button>
25+
<a class="navbar-brand" href="#">MCU</a>
26+
</div>
27+
28+
<div class="collpase navbar-collapse" id="bs-example-navbar-collapse-1">
29+
<ul class="nav navbar-nav">
30+
<li class="active"><a href="#">Home<span class="sr-only"></span></a></li>
31+
<li><a href="/movies" title="Films">Films</a></li>
32+
<li><a href="/characters" title="Characters">Characters</a></li>
33+
<li class="dropdown">
34+
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-exapnded="false">Phases</span class="caret"></span></a>
35+
<ul class="dropdown-menu" role="menu">
36+
<li><a href="/phase/one" title="Phase One">Phase One</a></li>
37+
<li><a href="/phase/two" title="Phase Two">Phase Two</a></li>
38+
<li><a href="/phase/three" title="Phase Three">Phase Three</a></li>
39+
</ul>
40+
</li>
41+
</ul>
42+
43+
<!-- right navbar -->
44+
<ul class="nav navbar-nav navbar-right">
45+
<li><a href="#" title="Contact">Contact</a></li>
46+
<li><a href="#" title="Sign In">Sign In</a></li>
47+
</ul>
48+
</div>
1849
</div>
1950
</div>
51+
</header>
52+
53+
<div class="mainContainer">
2054

55+
</div>
2156

57+
<footer>
58+
<div class="searchFooter container-fluid">
59+
<div class="row">
60+
<div class="col-sm-6 col-md-4 col-md-offset-2">
61+
<div class="footerLogo"><a href="/" title="Home"></a></div>
62+
</div>
63+
64+
<div class="col-sm-6 col-md-5">
65+
<div class="footerSearch">
66+
<form>
67+
<input type="text" name="searchWord" id="searchWord" placeholder="Search for ..." required />
68+
<input type="button" name="Search" id="search" value="Search" />
69+
</form>
70+
</div>
71+
</div>
72+
</div>
73+
</div>
74+
</footer>
2275

2376
</body>
2477
</html>

src/resources/css/angularjstutorial.css

Lines changed: 7 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/resources/css/angularjstutorial.min.css

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/resources/css/styles.css

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ html, body {
44
padding: 0;
55
margin: 0; }
66

7-
.boxContainer {
8-
width: 100px;
9-
height: 100px;
10-
display: block;
11-
text-align: center;
12-
font-size: 2em;
13-
color: white;
14-
background-color: #000000;
15-
padding: 25px 0 0 0; }
7+
.mainContainer {
8+
height: 100%; }
9+
10+
footer {
11+
background: black;
12+
padding: 20px 0;
13+
color: white; }

src/resources/css/styles.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ html, body {
55
margin: 0;
66
}
77

8-
.boxContainer {
9-
width: 100px;
10-
height: 100px;
11-
display: block;
12-
text-align: center;
13-
font-size: 2em;
8+
.mainContainer {
9+
height: 100%;
10+
11+
}
12+
13+
footer {
14+
background: black;
15+
padding: 20px 0;
1416
color: white;
15-
background-color: #000000;
16-
padding: 25px 0 0 0;
1717
}

0 commit comments

Comments
 (0)