Commit 61e46d4d43b161a1270b9aff44a7b112cdfbbd3f
1 parent
f38b752ca6
Exists in
master
and in
1 other branch
restyled class list again
Showing 3 changed files with 50 additions and 50 deletions Side-by-side Diff
home.html
View file @
61e46d4
... | ... | @@ -11,36 +11,36 @@ |
11 | 11 | rel='stylesheet' type='text/css'> |
12 | 12 | </head> |
13 | 13 | <header> |
14 | - <ul ng-show="isLoggedIn" id="sidebar" class="side-nav fixed"> | |
15 | - <li class="logo"><a href="//flashy.cards/" id="logo-container"> | |
14 | + <ul ng-show="isLoggedIn" id="sidebar" class="side-nav fixed"> | |
15 | + <li class="logo"><a href="//flashy.cards/" id="logo-container"> | |
16 | 16 | |
17 | - <h1>Flashy</h1> | |
18 | - </a></li> | |
19 | - <li class="no-padding"> | |
20 | - <ul class="collapsible" data-collapsible="accordion"> | |
21 | - <li class="bold"> | |
22 | - <a class="collapsible-header black-text">Classes</a> | |
23 | - </li> | |
24 | - <div class="collapsible-body" style="display: block"> | |
25 | - <ul> | |
26 | - <li ng-repeat="section in sections"> | |
27 | - <a ui-sref="feed({sectionId:{{section.id}}})">{{section.short_name}}</a> | |
28 | - </li> | |
29 | - </ul> | |
30 | - </div> | |
31 | - </ul> | |
32 | - </li> | |
33 | - <!--<li class="bold"> | |
34 | - <a>Classes:</a></li> | |
35 | - <div ng-repeat="section in sections"> | |
36 | - <li class="bold class" ui-sref-active="active"><a ui-sref="feed({sectionId:{{section.id}}})">{{section.short_name}}</a> | |
17 | + <h1>Flashy</h1> | |
18 | + </a></li> | |
19 | + <li class="no-padding"> | |
20 | + <ul class="collapsible" data-collapsible="accordion"> | |
21 | + <li class="bold"> | |
22 | + <a class="collapsible-header black-text">Classes</a> | |
37 | 23 | </li> |
38 | - </div>--> | |
39 | - <li class="bold"><a ui-sref="addclass">Add Class</a></li> | |
40 | - <li class="bold"><a ui-sref="study">Study</a></li> | |
41 | - <li class="bold"><a ui-sref="logout">Logout</a></li> | |
42 | - </ul> | |
43 | - <a href="#" data-activates="sidebar" class="button-collapse"><i class="medium mdi-navigation-menu"></i></a> | |
24 | + <div class="collapsible-body" style="display: block"> | |
25 | + <ul> | |
26 | + <li ui-sref-active="active" ng-repeat="section in sections"> | |
27 | + <a class="class bold" ui-sref="feed({sectionId:{{section.id}}})">{{section.short_name}}</a> | |
28 | + </li> | |
29 | + </ul> | |
30 | + </div> | |
31 | + </ul> | |
32 | + </li> | |
33 | + <!--<li class="bold"> | |
34 | + <a>Classes:</a></li> | |
35 | + <div ng-repeat="section in sections"> | |
36 | + <li class="bold class" ui-sref-active="active"><a ui-sref="feed({sectionId:{{section.id}}})">{{section.short_name}}</a> | |
37 | + </li> | |
38 | + </div>--> | |
39 | + <li class="bold"><a ui-sref="addclass">Add Class</a></li> | |
40 | + <li class="bold"><a ui-sref="study">Study</a></li> | |
41 | + <li class="bold"><a ui-sref="logout">Logout</a></li> | |
42 | + </ul> | |
43 | + <a href="#" data-activates="sidebar" class="button-collapse"><i class="medium mdi-navigation-menu"></i></a> | |
44 | 44 | </header> |
45 | 45 | <body ng-controller="RootController"> |
46 | 46 |
scripts/FeedController.js
View file @
61e46d4
1 | 1 | angular.module('flashy.FeedController', ['ui.router']). |
2 | 2 | |
3 | - controller('FeedController', ['$scope', '$stateParams', '$state', '$http', function($scope, $stateParams, $state, $http) { | |
3 | + controller('FeedController', ['$scope', '$stateParams', '$state', '$http', function ($scope, $stateParams, $state, $http) { | |
4 | 4 | console.log('Hello from feed'); |
5 | 5 | sectionId = $stateParams.sectionId; |
6 | 6 | $scope.cards = []; |
7 | 7 | |
8 | 8 | $http.get('/api/sections/' + sectionId + '/feed/'). |
9 | - success(function(data) { | |
9 | + success(function (data) { | |
10 | 10 | console.log(data); |
11 | 11 | $scope.cards = data; |
12 | 12 | }). |
13 | - error(function(err) { | |
13 | + error(function (err) { | |
14 | 14 | console.log('pulling feed failed'); |
15 | 15 | }); |
16 | 16 | |
17 | - $scope.viewDeck = function() { | |
17 | + $scope.viewDeck = function () { | |
18 | 18 | $state.go('deck', {sectionId: sectionId}); |
19 | 19 | console.log('go to deck'); |
20 | 20 | }; |
21 | 21 | |
22 | - $scope.pushCard = function() { | |
22 | + $scope.pushCard = function () { | |
23 | 23 | console.log('make! card content:' + $scope.text); |
24 | 24 | var pushed = new Date(Date.now()); |
25 | 25 | console.log(pushed.toString()); |
26 | 26 | |
27 | 27 | |
28 | 28 | |
29 | 29 | |
30 | 30 | |
31 | 31 | |
32 | 32 | |
33 | 33 | |
34 | 34 | |
35 | 35 | |
36 | 36 | |
... | ... | @@ -32,53 +32,53 @@ |
32 | 32 | section: sectionId |
33 | 33 | }; |
34 | 34 | $http.post('/api/flashcards/', myCard). |
35 | - success(function(data) { | |
35 | + success(function (data) { | |
36 | 36 | console.log('pushed a card!'); |
37 | 37 | $scope.cards.push(myCard); // Add right away |
38 | 38 | $scope.refreshCards(); // Refresh list |
39 | 39 | }). |
40 | - error(function(error) { | |
40 | + error(function (error) { | |
41 | 41 | console.log('haha, n00b'); |
42 | 42 | }); |
43 | 43 | |
44 | 44 | $scope.text = ''; |
45 | 45 | }; |
46 | 46 | |
47 | - $scope.refreshCards = function() { | |
47 | + $scope.refreshCards = function () { | |
48 | 48 | $http.get('/api/sections/' + sectionId + '/feed/'). |
49 | - success(function(data) { | |
49 | + success(function (data) { | |
50 | 50 | console.log(data); |
51 | 51 | $scope.cards = data; |
52 | 52 | console.log('success in refresh cards...'); |
53 | 53 | }). |
54 | - error(function(err) { | |
54 | + error(function (err) { | |
55 | 55 | console.log('refresh fail'); |
56 | 56 | }); |
57 | 57 | } |
58 | 58 | |
59 | - $(document).keydown(function(e) { | |
59 | + $(document).keydown(function (e) { | |
60 | 60 | var keyed = e.which; |
61 | 61 | if (keyed == 67) { // "c" or "C" for compose |
62 | 62 | $('#newCard').openModal(); |
63 | 63 | } |
64 | 64 | }); |
65 | - | |
66 | 65 | |
66 | + | |
67 | 67 | $scope.flashcard = 'hi i am a flashcard. I need to be really long and awesome I ain\'t ' + |
68 | - 'know how long I am right now. Is it good enough now?????????? Howz about now???'; | |
68 | + 'know how long I am right now. Is it good enough now?????????? Howz about now???'; | |
69 | 69 | $scope.text = ''; |
70 | 70 | |
71 | - $(document).ready(function() { | |
71 | + $(document).ready(function () { | |
72 | 72 | // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered |
73 | 73 | $('.modal-trigger').leanModal({ |
74 | 74 | dismissible: true, // Modal can be dismissed by clicking outside of the modal |
75 | 75 | opacity: 0, // Opacity of modal background |
76 | 76 | in_duration: 300, // Transition in duration |
77 | 77 | out_duration: 200, // Transition out duration |
78 | - ready: function() { | |
78 | + ready: function () { | |
79 | 79 | $('input:text:visible:first').focus(); |
80 | 80 | }, |
81 | - complete: function() { | |
81 | + complete: function () { | |
82 | 82 | } // Callback for Modal close*/ |
83 | 83 | } |
84 | 84 | ); |
styles/flashy.css
View file @
61e46d4
... | ... | @@ -46,11 +46,11 @@ |
46 | 46 | font-size: 24px; |
47 | 47 | } |
48 | 48 | |
49 | -ul.side-nav.fixed li.class a { | |
49 | +ul.side-nav.fixed li a.class { | |
50 | 50 | height: 28px; |
51 | - font-size:20px; | |
51 | + font-size: 20px; | |
52 | 52 | line-height: normal; |
53 | - font-weight:600; | |
53 | + font-weight: 600; | |
54 | 54 | } |
55 | 55 | |
56 | 56 | ul.side-nav.fixed li a { |
57 | 57 | |
58 | 58 | |
... | ... | @@ -228,15 +228,15 @@ |
228 | 228 | background-color: #7c4dff; |
229 | 229 | } |
230 | 230 | |
231 | -#logo-container{ | |
231 | +#logo-container { | |
232 | 232 | margin-bottom: 18px; |
233 | 233 | } |
234 | 234 | |
235 | 235 | #lean-overlay { |
236 | - display: none !important; | |
236 | + display: none !important; | |
237 | 237 | } |
238 | 238 | |
239 | 239 | #sidenav-overlay { |
240 | - background-color: rgba(0,0,0,0) !important; | |
240 | + background-color: rgba(0, 0, 0, 0) !important; | |
241 | 241 | } |