diff --git a/.gitignore b/.gitignore
index 7b83cec..207ca5b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -113,3 +113,7 @@ webnews/
webroster/
ybook2003/
yearbook/
+
+# Ignore Config File from git
+data/config.json
+
diff --git a/data/config.tmp.json b/data/config.tmp.json
new file mode 100644
index 0000000..d43bc18
--- /dev/null
+++ b/data/config.tmp.json
@@ -0,0 +1,4 @@
+{
+ "quotefaultAPI": "keyherepls"
+}
+
diff --git a/index.html b/index.html
index 97b1f3c..8fe4a28 100644
--- a/index.html
+++ b/index.html
@@ -8,6 +8,7 @@
+
CSH Members Portal
@@ -47,11 +48,15 @@ Popular
diff --git a/js/app.js b/js/app.js
index edd5c96..faa85ed 100644
--- a/js/app.js
+++ b/js/app.js
@@ -17,6 +17,16 @@ app.directive("meetings", function() {
};
});
+app.directive("quote", function() {
+ return {
+ restrict: "E",
+ templateUrl: "templates/quote.html",
+ scope: {
+ quote: "=data"
+ }
+ };
+});
+
app.controller("MembersController", ['$scope', '$http', function($scope, $http) {
// Toggle showing the icons
@@ -32,6 +42,18 @@ app.controller("MembersController", ['$scope', '$http', function($scope, $http)
console.error("Error getting meetings.json");
});
+ // Get the quotes
+ $scope.quote = [];
+ $http.get("./data/config.json").success(function (response) {
+ $http.get("https://quotefault-api.csh.rit.edu/" + response['quotefaultAPI'] + "/random").success(function (response) {
+ $scope.quote = response;
+ }).error(function (error) {
+ console.error("Error getting quote from API");
+ });
+ }).error(function (error) {
+ console.error("Error getting config.json");
+ });
+
// Get all the links
$scope.sections = [];
$scope.popular = [];
@@ -39,7 +61,7 @@ app.controller("MembersController", ['$scope', '$http', function($scope, $http)
$scope.sections = response;
// Find the popular links
for (var i = 0; i < $scope.sections.length; i++) {
- var section = $scope.sections[i];
+ var section = $scope.sections[i];
for (var j = 0; j < section.links.length; j++ ) {
if (section.links[j].hasOwnProperty("popular")) {
$scope.popular.push(section.links[j]);
diff --git a/package.json b/package.json
index 3e21aae..dda55f2 100644
--- a/package.json
+++ b/package.json
@@ -1,30 +1,26 @@
{
- "name": "members-redesign",
+ "name": "CSHMembersPortal",
"description": "Redesign of the CSH Members Portal.",
"version": "0.1.0",
- "homepage": "https://github.com/bencentra/members-redesign",
+ "homepage": "https://github.com/ComputerScienceHouse/CSHMembersPortal",
"author": {
"name": "Ben Centra",
"url": "http://bencentra.com"
},
"repository": {
"type": "git",
- "url": "git://github.com/bencentra/members-redesign"
+ "url": "git://github.com/ComputerScienceHouse/CSHMembersPortal"
},
"bugs": {
- "url": "https://github.com/bencentra/members-redesign/issues"
+ "url": "https://github.com/ComputerScienceHouse/CSHMembersPortal/issues"
},
"licenses": [
- {
-
- }
+ {}
],
"engines": {
"node": ">= 0.10.0"
},
- "scripts": {
-
- },
+ "scripts": {},
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-connect": "0.7.1",
@@ -34,4 +30,4 @@
"bootstrap",
"csh"
]
-}
\ No newline at end of file
+}
diff --git a/templates/quote.html b/templates/quote.html
new file mode 100644
index 0000000..c158976
--- /dev/null
+++ b/templates/quote.html
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
"{{ quote.quote }}"
+
- {{ quote.speaker }}
+
+
+
+
+
+
+
+