Skip to content

Commit 7f36094

Browse files
committed
Initial checkin of project scaffolding.
0 parents  commit 7f36094

File tree

998 files changed

+289170
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

998 files changed

+289170
-0
lines changed

.bowerrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory": "lib"
3+
}

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.DS_Store
2+
/node_modules/
3+
/lib/**/*.gzip
4+
/lib/**/*.md
5+
/lib/**/*.yml
6+
/lib/**/LICENSE
7+
/lib/**/package.json
8+
/lib/**/Gruntfile*
9+
/lib/**/Makefile*
10+
*.tmp.js

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Tsai KD
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

bower.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "angular-contentful-starter",
3+
"dependencies": {
4+
"angular": "~1.3.15",
5+
"angular-ui-router": "~0.2.13",
6+
"angular-contentful": "^2.2.0"
7+
},
8+
"devDependencies": {}
9+
}

gulpfile.js

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
var gulp = require("gulp"),
2+
dateformat = require("dateformat"),
3+
sync = require("gulp-sync")(gulp),
4+
rename = require("gulp-rename"),
5+
header = require("gulp-header"),
6+
templatecache = require("gulp-angular-templatecache"),
7+
usemin = require("gulp-usemin"),
8+
uglify = require("gulp-uglify"),
9+
minifyCss = require("gulp-minify-css"),
10+
minifyHtml = require("gulp-minify-html"),
11+
replace = require("gulp-replace"),
12+
run = require("gulp-run"),
13+
connect = require("gulp-connect");
14+
15+
var pkg = require("./package.json"),
16+
17+
// index page path
18+
root = ".",
19+
20+
// list all pages
21+
pages = [
22+
"index"
23+
];
24+
25+
var banner = [
26+
"/* " + pkg.name + " v" + pkg.version + " " + dateformat(new Date(), "yyyy-mm-dd"),
27+
" * " + pkg.homepage,
28+
" * License: " + pkg.license,
29+
" */\n\n"
30+
].join("\n"),
31+
paths = {
32+
"tmpl": [root+"/src/**/*.html"],
33+
"js": ["!**/*.tmp.js", "!**/*.test.js", "!"+root+"/src/**/*.min.js", root+"/src/**/*.js"],
34+
"css": ["!"+root+"/src/**/*.min.css", root+"/src/**/*.css"]
35+
},
36+
ngModule = pkg.name;
37+
38+
// generate path of pages
39+
pages.forEach(function(page) {
40+
var name = page + ".src.html";
41+
paths[name] = paths[name] || [];
42+
paths[name].push(root + "/" + name);
43+
44+
name = page + ".html";
45+
paths[name] = paths[name] || [];
46+
paths[name].push(root + "/" + name);
47+
});
48+
49+
gulp.task("build", sync.sync([
50+
// stage 1: build resource
51+
["css", "js", "tmpl", "bower.json"],
52+
53+
// stage 2: build pages sources
54+
pages.map(function(page) { return page + ".src.html"; }),
55+
56+
// stage 3: build release pages
57+
pages.map(function(page) { return page + ".html"; })
58+
]));
59+
60+
gulp.task("default", sync.sync([
61+
["build"],
62+
["watch"]
63+
]));
64+
65+
gulp.task("dev", ["watch"]);
66+
67+
gulp.task("up", ["update-npm", "update-bower"]);
68+
69+
gulp.task("css", function(done) {
70+
gulp.src(paths.css)
71+
.pipe(connect.reload())
72+
.on("end", done);
73+
});
74+
75+
gulp.task("js", function(done) {
76+
gulp.src(paths.js)
77+
.pipe(connect.reload())
78+
.on("end", done);
79+
});
80+
81+
gulp.task("tmpl", function(done) {
82+
gulp.src(paths.tmpl)
83+
.pipe(templatecache("angular-template.tmp.js", {
84+
module: ngModule,
85+
root: "src"
86+
}))
87+
.pipe(gulp.dest(root+"/src/"))
88+
.pipe(connect.reload())
89+
.on("end", done);
90+
});
91+
92+
// generate task of pages
93+
pages.forEach(function(page) {
94+
(function(page) {
95+
var name = page + ".src.html";
96+
gulp.task(name, function(done) {
97+
gulp.src(paths[name])
98+
.pipe(rename({ basename: page }))
99+
.pipe(gulp.dest(root))
100+
.pipe(connect.reload())
101+
.on("end", done);
102+
});
103+
})(page);
104+
105+
(function(page) {
106+
var name = page + ".html";
107+
gulp.task(name, function(done) {
108+
gulp.src(paths[name])
109+
.pipe(usemin({
110+
css: [
111+
minifyCss(),
112+
header(banner)
113+
],
114+
js: [
115+
replace(/\.version = \"0\";/, ".version = \"" + pkg.version + "\""),
116+
uglify(),
117+
header(banner)
118+
],
119+
html: [
120+
minifyHtml({ empty: true })
121+
],
122+
enableHtmlComment: true
123+
}))
124+
.pipe(gulp.dest(root))
125+
.pipe(connect.reload())
126+
.on("end", done);
127+
});
128+
})(page);
129+
});
130+
131+
gulp.task("bower.json", function(done) {
132+
gulp.src(["bower.json"])
133+
.pipe(replace(/"name": "[^"]*"/, "\"name\": \"" + pkg.name + "\""))
134+
.pipe(gulp.dest("./"))
135+
.on("end", done);
136+
});
137+
138+
gulp.task("update-npm", function(done) {
139+
var cmd = "sh -c './node_modules/npm-check-updates/bin/npm-check-updates -u'";
140+
run(cmd).exec().on("end", done);
141+
});
142+
143+
gulp.task("update-bower", function(done) {
144+
var bowerjson = require("./bower.json");
145+
var deps = [];
146+
var i, cmd;
147+
148+
for (i in bowerjson.dependencies) {
149+
deps.push(i);
150+
}
151+
cmd = "bower install --save --force-latest " + deps.join(" ");
152+
run(cmd).exec().on("end", done);
153+
});
154+
155+
gulp.task("watch", function() {
156+
["tmpl", "css", "js"]
157+
.concat(pages.map(function(page) { return page + ".src.html"; }))
158+
.forEach(function(i) {
159+
gulp.watch(paths[i], function(i) {
160+
return function() {
161+
gulp.src(paths[i])
162+
.pipe(connect.reload());
163+
};
164+
}(i));
165+
});
166+
167+
connect.server({
168+
root: root,
169+
port: 9000,
170+
livereload: true
171+
});
172+
});

img/01.jpg

535 KB
Loading

img/02.jpg

246 KB
Loading

img/03.jpg

522 KB
Loading

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!doctype html><html ng-app=angular-contentful-starter><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width, initial-scale=1.0"><title>angular-contentful-starter</title><link rel=stylesheet href=public/index.min.css><link href="https://fonts.googleapis.com/css?family=Catamaran:100,200,300,400,500,600,700,800,900" rel=stylesheet><link href="https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i" rel=stylesheet></head><body><nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top"><div class=container><a class=navbar-brand href=#>AngularJS / Contentful Starter Kit</a> <button class=navbar-toggler type=button data-toggle=collapse data-target=#navbarResponsive aria-controls=navbarResponsive aria-expanded=false aria-label="Toggle navigation"><span class=navbar-toggler-icon></span></button><div class="collapse navbar-collapse" id=navbarResponsive><ul class="navbar-nav ml-auto"><li class="nav-item active" ui-sref=index><a class=nav-link href=#>Home <span class=sr-only>(current)</span></a></li><li class=nav-item><a class=nav-link ui-sref=info>Project Information</a></li><li class=nav-item><a class=nav-link ui-sref=events>Events</a></li></ul></div></div></nav><header><div id=carouselExampleIndicators class="carousel slide" data-ride=carousel contentful-entries="'content_type=banner'"><div class=carousel-inner role=listbox><div class=carousel-item ng-repeat="banner in $contentfulEntries.items" ng-class="{ active : $first }" ng-style="{ 'background-image': 'linear-gradient( rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) ), url(' + banner.fields.backgroundImage.fields.file.url + ')' }"><div class="carousel-caption d-none d-md-block"><h3>{{ banner.fields.title }}</h3><p>{{ banner.fields.bannerText }}</p></div></div></div><a class=carousel-control-prev href=#carouselExampleIndicators role=button data-slide=prev ng-if="$contentfulEntries.items && $contentfulEntries.items.length > 1"><span class=carousel-control-prev-icon aria-hidden=true></span> <span class=sr-only>Previous</span></a> <a class=carousel-control-next href=#carouselExampleIndicators role=button data-slide=next ng-if="$contentfulEntries.items && $contentfulEntries.items.length > 1"><span class=carousel-control-next-icon aria-hidden=true></span> <span class=sr-only>Next</span></a></div></header><div ui-view></div><footer class="py-5 bg-dark"><div class=container><p class=text-white>AngularJS, Contentful & Bootstrap 4 Starter Kit. Thrown together by Josh Hebb.</p></div></footer><script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAYUxfnjxus1rXx-ntGcxqWD1BPRZrI1IM" type=text/javascript></script><script src=public/index.min.js></script></body></html>

index.src.html

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<!doctype html>
2+
<html ng-app="angular-contentful-starter">
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>angular-contentful-starter</title>
8+
9+
<!-- build:css public/index.min.css -->
10+
<link rel="stylesheet" href="lib/bootstrap/dist/css/bootstrap.min.css" >
11+
<link rel="stylesheet" href="lib/font-awesome/css/font-awesome.min.css" >
12+
<link rel="stylesheet" href="src/index.css">
13+
14+
<!-- endbuild -->
15+
16+
<!-- Custom fonts for this template -->
17+
<link href="https://fonts.googleapis.com/css?family=Catamaran:100,200,300,400,500,600,700,800,900" rel="stylesheet">
18+
<link href="https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i" rel="stylesheet">
19+
20+
</head>
21+
22+
<body>
23+
<!-- Navigation -->
24+
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
25+
<div class="container">
26+
<a class="navbar-brand" href="#">AngularJS / Contentful Starter Kit</a>
27+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive"
28+
aria-expanded="false" aria-label="Toggle navigation">
29+
<span class="navbar-toggler-icon"></span>
30+
</button>
31+
<div class="collapse navbar-collapse" id="navbarResponsive">
32+
<ul class="navbar-nav ml-auto">
33+
<li class="nav-item active" ui-sref="index">
34+
<a class="nav-link" href="#">Home
35+
<span class="sr-only">(current)</span>
36+
</a>
37+
</li>
38+
<li class="nav-item">
39+
<a class="nav-link" ui-sref="info">Project Information</a>
40+
</li>
41+
<li class="nav-item">
42+
<a class="nav-link" ui-sref="products">Products</a>
43+
</li>
44+
</ul>
45+
</div>
46+
</div>
47+
</nav>
48+
49+
<header>
50+
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel" contentful-entries="'content_type=banner'">
51+
<div class="carousel-inner" role="listbox">
52+
<div class="carousel-item" ng-repeat="banner in $contentfulEntries.items" ng-class="{ active : $first }" ng-style="{ 'background-image': 'linear-gradient( rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) ), url(' + banner.fields.backgroundImage.fields.file.url + ')' }">
53+
54+
<div class="carousel-caption d-none d-md-block">
55+
<h3>{{ banner.fields.title }}</h3>
56+
<p>{{ banner.fields.bannerText }}</p>
57+
</div>
58+
</div>
59+
</div>
60+
61+
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev" ng-if="$contentfulEntries.items && $contentfulEntries.items.length > 1">
62+
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
63+
<span class="sr-only">Previous</span>
64+
</a>
65+
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next" ng-if="$contentfulEntries.items && $contentfulEntries.items.length > 1">
66+
<span class="carousel-control-next-icon" aria-hidden="true"></span>
67+
<span class="sr-only">Next</span>
68+
</a>
69+
</div>
70+
</header>
71+
72+
<div ui-view></div>
73+
74+
<!-- Footer -->
75+
<footer class="py-5 bg-dark">
76+
<div class="container">
77+
<p class="text-white">AngularJS, Contentful & Bootstrap 4 Starter Kit. Thrown together by Josh Hebb.</p>
78+
</div>
79+
</footer>
80+
81+
<!-- Third Party Scripts (Google Maps) -->
82+
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAYUxfnjxus1rXx-ntGcxqWD1BPRZrI1IM" type="text/javascript"></script>
83+
84+
<!-- build:js public/index.min.js -->
85+
<script src="lib/angular/angular.js"></script>
86+
<script src="lib/angular-ui-router/release/angular-ui-router.js"></script>
87+
<script src="lib/angular-contentful/dist/angular-contentful.min.js"></script>
88+
<script src="lib/ngmap/build/scripts/ng-map.min.js"></script>
89+
90+
<script src="lib/angular-sanitize/angular-sanitize.js"></script>
91+
<script src="lib/showdown/compressed/showdown.js"></script>
92+
<script src="lib/angular-markdown-directive/markdown.js"></script>
93+
94+
95+
<script src="lib/jquery/dist/jquery.min.js"></script>
96+
<script src="lib/bootstrap/dist/js/bootstrap.min.js"></script>
97+
<script src="lib/tether/dist/js/tether.min.js"></script>
98+
99+
100+
<script src="src/config/app.js"></script>
101+
<script src="src/config/route.js"></script>
102+
103+
<!--
104+
<script src="src/angular-template.tmp.js"></script>
105+
-->
106+
<!-- endbuild -->
107+
</body>
108+
</html>

0 commit comments

Comments
 (0)