Skip to content

Commit 95200b5

Browse files
small changes, fixing version dependencies, solving encoding issuex
1 parent d97045c commit 95200b5

File tree

6 files changed

+48
-16
lines changed

6 files changed

+48
-16
lines changed

Gruntfile.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = function(grunt) {
22
// Load Grunt tasks declared in the package.json file
33
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
4-
4+
grunt.loadNpmTasks('grunt-contrib-jshint');
55
// Configure Grunt
66
grunt.initConfig({
77

@@ -35,13 +35,20 @@ module.exports = function(grunt) {
3535
all: {
3636
path: 'http://localhost:8080/index.html'
3737
}
38-
}
38+
},
39+
jshint: {
40+
all: ['Gruntfile.js', 'controllers/**/*.js']
41+
}
3942
});
4043

4144
// Creates the `server` task
4245
grunt.registerTask('server', [
46+
'jshint',
4347
'express',
4448
'open',
4549
'watch'
4650
]);
51+
grunt.registerTask('default', [
52+
'jshint'
53+
]);
4754
};

bower.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
],
1212
"devDependencies": {
1313
"angular-material": "~0.5.1",
14-
"material-design-icons": "~1.0.1"
14+
"material-design-icons": "~1.0"
15+
},
16+
"resolutions": {
17+
"angular": "1.3.0-rc.4",
18+
"angular-animate": "1.3.0",
19+
"angular-aria": "1.3.0"
1520
}
1621
}

controllers/controllers.js

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
"use strict";
12
// Include app dependency on ngMaterial
23
var app = angular.module( 'YourApp', [ 'ngMaterial' ] );
4+
// Main Controller
35
app.controller("YourController", ['$scope', '$mdDialog', '$mdSidenav', function($scope, $mdDialog, $mdSidenav) {
46

57
$scope.openDialog = function($event) {
@@ -34,7 +36,7 @@ app.controller("YourController", ['$scope', '$mdDialog', '$mdSidenav', function(
3436
divider: true
3537
},
3638
{
37-
title: "Dells Life After Wall Street - NYTimes.com",
39+
title: "Dell's Life After Wall Street - NYTimes.com",
3840
description: "Dell is trying to graduate/evolve/pivot from PCs to lots of other products & industries. Still being the backbone of the company, PC sales are financing the transition, but new products are supporting PC/server sales as well. Dell/the article don't give any numbers yet on how well (or not) those new categories are working. Increased risk for increased potential upside.",
3941
expanded: false,
4042
content: {
@@ -52,7 +54,7 @@ app.controller("YourController", ['$scope', '$mdDialog', '$mdSidenav', function(
5254
}
5355
},
5456
{
55-
title: "Sidechains AVC",
57+
title: "Sidechains - AVC",
5658
description: "Fred Wilson gives a simple explanation of 'pegged sidechains', and their importantance to the future of the #bitcoin ecosystem. Worth the read.",
5759
expanded: false,
5860
content: {
@@ -83,7 +85,7 @@ app.controller("YourController", ['$scope', '$mdDialog', '$mdSidenav', function(
8385
}
8486
},
8587
{
86-
title: "Ethanifier Lets You Build Your Own Single-Purpose Messaging App Like The Viral Hit “Ethan” | TechCrunch",
88+
title: "'Ethanifier' Lets You Build Your Own Single-Purpose Messaging App Like The Viral Hit “Ethan” | TechCrunch",
8789
description: "Thoughts on NYT's piece on FB trying to get publishers to hand over their content / publish to FB (http://www.nytimes.com/2014/10/27/business/media/facebook-offers-life-raft-but-publishers-are-wary.html). Author fears that if publishers bow, FB could have as big of an impact to news/information discovery as Google (which is already frightening).",
8890
expanded: false,
8991
content: {
@@ -172,10 +174,16 @@ app.controller("YourController", ['$scope', '$mdDialog', '$mdSidenav', function(
172174
$mdBottomSheet.hide(clickedItem);
173175
};
174176
}]);
175-
177+
// Dialog Controller
176178
app.controller('DialogController', function($scope, $mdDialog, name) {
177179
$scope.userName = name;
178180
$scope.closeDialog = function() {
179181
$mdDialog.hide();
180182
};
181183
});
184+
// Left Sidebar Controller
185+
app.controller('LeftCtrl', function($scope, $timeout, $mdSidenav) {
186+
$scope.close = function() {
187+
$mdSidenav('left').close();
188+
};
189+
});

index.html

+18-7
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,44 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4+
<meta charset="UTF-8">
45
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
56
<link rel="stylesheet" href="/bower_components/angular-material/angular-material.css">
67
<link rel="stylesheet" href="/bower_components/angular-material/themes/blue-theme.css">
78
<link rel="stylesheet" href="/style.css">
89
</head>
910
<body layout="vertical" md-theme="blue" layout-fill ng-app="YourApp" ng-controller="YourController">
1011
<header>
11-
<md-toolbar scroll-shrink>
12+
<md-toolbar scroll-shrink layout="row">
1213
<div class="md-toolbar-tools">
1314
<md-button ng-click="toggleMenu()">Menu</md-button>
1415
<h3>
15-
<span>Angular Material Inbox</span>
16+
<span>Angular Inbox</span>
1617
</h3>
1718
</div>
1819
</md-toolbar>
1920
</header>
2021
<div layout="vertical" flex>
22+
<!-- LEFT SIDEBAR -->
2123
<md-sidenav class="md-sidenav-left" component-id="left">
2224
<md-toolbar class="md-theme-indigo">
2325
<h1 class="md-toolbar-tools">Sidenav Left</h1>
2426
</md-toolbar>
25-
<md-content flex>
26-
<p>Stuff</p>
27+
<md-content ng-controller="LeftCtrl" class="md-padding" flex layout="vertical">
2728
<md-button ng-click="close()" class="md-primary">
28-
Close Sidenav Right
29+
<md-icon icon="/img/icons/ic_people_24px.svg" style="width: 24px; height: 24px;"></md-icon>Inbox
2930
</md-button>
31+
<md-button ng-click="close()" class="md-primary">
32+
<md-icon icon="/img/icons/ic_people_24px.svg" style="width: 24px; height: 24px;"></md-icon>Snoozed
33+
</md-button>
34+
<md-button ng-click="close()" class="md-primary">
35+
<md-icon icon="/img/icons/ic_people_24px.svg" style="width: 24px; height: 24px;"></md-icon>Done
36+
</md-button>
37+
<md-divider></md-divider>
3038
</md-content>
3139
</md-sidenav>
32-
<md-content layout="horizontal" layout-align="center">
40+
<!-- MAIN CONTENT -->
41+
<md-content id="main" layout="horizontal" layout-align="center">
3342
<md-list id="content">
3443
<div ng-repeat="chunk in ::chunks">
3544
<p ng-if="chunk.divider">{{chunk.title}}</p>
@@ -57,7 +66,7 @@ <h1 class="md-toolbar-tools">Sidenav Left</h1>
5766
<img class="round-face" src="http://placekitten.com/g/48/48"/>
5867
</div>
5968
<div flex>
60-
<img src="example/dell.jpg" />
69+
<img src="http://placekitten.com/g/800/400" />
6170
<h2>{{ chunk.title }}</h2>
6271
<p>{{ chunk.description }}</p>
6372
<div ng-if="chunk.content && chunk.content.type === 'QUOTE'">
@@ -74,6 +83,7 @@ <h2>{{ chunk.title }}</h2>
7483
</md-content>
7584
</div>
7685

86+
<!-- FAB POPUP -->
7787
<div id="fab-popup" layout="vertical" layout-align="space-between" ng-if="showAddButtons" ng-animate="{enter: 'animate-enter', leave: 'animate-leave'}">
7888
<md-button class="md-fab md-raised" ng-click="openDialog($event);" aria-label="New document">
7989
<md-icon icon="bower_components/material-design-icons/content/svg/production/ic_add_24px.svg" style="width: 24px; height: 24px;"></md-icon>
@@ -101,6 +111,7 @@ <h2>{{ chunk.title }}</h2>
101111
</md-button>
102112
</div>
103113

114+
<!-- HOVERING FAB -->
104115
<md-button id="mainFab" class="md-fab md-raised" ng-click="showAddButtons = !showAddButtons;" aria-label="New document">
105116
<md-icon icon="bower_components/material-design-icons/content/svg/production/ic_add_24px.svg" style="width: 24px; height: 24px;"></md-icon>
106117
</md-button>

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"matchdep": "~0.3.0",
2020
"grunt-express": "~1.4.1",
2121
"grunt-contrib-watch": "~0.6.1",
22-
"grunt-open": "~0.2.3"
22+
"grunt-open": "~0.2.3",
23+
"grunt-contrib-jshint": "~0.10.0"
2324
}
2425
}

style.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ footer {
1414
padding: 16px;
1515
}
1616

17-
md-content.md-blue-theme {
17+
md-content#main.md-blue-theme {
1818
background-color: #ececec;
1919
}
2020

0 commit comments

Comments
 (0)