diff --git a/home.html b/home.html index d0c4ab9..456a39d 100644 --- a/home.html +++ b/home.html @@ -7,6 +7,7 @@ +
diff --git a/scripts/DeckController.js b/scripts/DeckController.js index 37fe633..a600e32 100644 --- a/scripts/DeckController.js +++ b/scripts/DeckController.js @@ -1,7 +1,7 @@ var app = angular.module('flashy.DeckController', ['ui.router']); -app.controller('DeckController', ['$scope', '$http', '$stateParams', - function($scope, $http, $stateParams) { +app.controller('DeckController', ['$scope', '$state', '$http', '$stateParams', + function($scope, $state, $http, $stateParams) { // cards array sectionId = $stateParams.sectionId; $scope.cards = []; @@ -14,7 +14,10 @@ app.controller('DeckController', ['$scope', '$http', '$stateParams', error(function(err) { console.log('pulling feed failed'); }); - + $scope.viewFeed = function() { + $state.go('feed', {sectionId: sectionId}); + console.log('go to feed'); + }; // reorganize cards in array based on time $scope.filter = function(card) { diff --git a/scripts/FlashcardDirective.js b/scripts/FlashcardDirective.js index e20f3dd..6cc9c46 100644 --- a/scripts/FlashcardDirective.js +++ b/scripts/FlashcardDirective.js @@ -1,6 +1,6 @@ angular.module('flashy.FlashcardDirective', []). - directive('flashcard', ['$http', '$window', function ($http, $window) { + directive('flashcard', ['$http', '$window', function($http, $window) { return { templateUrl: '/app/templates/flashcard.html', restrict: 'E', @@ -8,7 +8,7 @@ angular.module('flashy.FlashcardDirective', []). flashcard: '=flashcardObj' // flashcard-obj in html }, - link: function (scope, element) { + link: function(scope, element) { function refresh_width() { avail = $window.innerWidth; if (avail > 992) avail -= 240; @@ -16,14 +16,14 @@ angular.module('flashy.FlashcardDirective', []). element.children().css({ width: width + 'px', height: (width * 3 / 5) + 'px', - 'font-size': 100*(width / 250) + '%' + 'font-size': 100 * (width / 250) + '%' }); }; angular.element($window).bind('resize', refresh_width); refresh_width(); // Put flashcard-specific functions here. // This will probably include add/hide/modals/etc. - scope.pullCard = function (flashcard) { + scope.pullCard = function(flashcard) { $http.post('/api/flashcards/' + flashcard.id + '/pull/', flashcard); console.log('pulled flashcard #' + flashcard.id); }; diff --git a/styles/flashy.css b/styles/flashy.css index 240292f..82a4511 100644 --- a/styles/flashy.css +++ b/styles/flashy.css @@ -55,12 +55,9 @@ ul.side-nav.fixed li a { .card.flashy { float: left; - /*height: calc((992px / 4 - 6px * 2) * 3 / 5);*/ + text-align: center; margin: 6px; - /*max-height: 2in;*/ - /*max-width: calc(5 * 60px);*/ - /*min-height: calc((992px / 4 - 6px * 2) * 3 / 5);*/ - /*min-width: calc(992px / 4 - 6px * 2);*/ + font-family: 'Titillium Web', sans-serif; } .card-overlay { @@ -69,7 +66,7 @@ ul.side-nav.fixed li a { position: absolute; top: 0; transition: visibility 0s cubic-bezier(0, 0, 0.6, 1) 0.2s, - opacity 0.2s cubic-bezier(0, 0, 0.6, 1); + opacity 0.2s cubic-bezier(0, 0, 0.6, 1); /* animation effect to appear on off-hover */ visibility: hidden; height: 100%; diff --git a/templates/deck.html b/templates/deck.html index 2770a0c..6de2898 100644 --- a/templates/deck.html +++ b/templates/deck.html @@ -1,4 +1,8 @@ - +
+ View Feed +
+ +
diff --git a/templates/flashcard.html b/templates/flashcard.html index 997a6d5..c4c24b7 100644 --- a/templates/flashcard.html +++ b/templates/flashcard.html @@ -1,24 +1,25 @@ -
-
-

{{flashcard.text}}

+
+
+

{{flashcard.text}}

+
+