Commit c0caaf6738a51fcfb587f2daf4f9757752d8f5d3
Exists in
master
and in
1 other branch
Merge branch 'master' of git.ucsd.edu:110swag/flashy-frontend
Showing 4 changed files Inline Diff
home.html
View file @
c0caaf6
<!DOCTYPE html> | 1 | 1 | <!DOCTYPE html> | |
<html ng-app="flashy"> | 2 | 2 | <html ng-app="flashy"> | |
<base href="/app/"> | 3 | 3 | <base href="/app/"> | |
<head> | 4 | 4 | <head> | |
<link rel="stylesheet" | 5 | 5 | <link rel="stylesheet" | |
href="https://ajax.googleapis.com/ajax/libs/angular_material/0.9.0/angular-material.min.css"> | 6 | 6 | href="https://ajax.googleapis.com/ajax/libs/angular_material/0.9.0/angular-material.min.css"> | |
7 | 7 | |||
<link rel="stylesheet" href="styles/flashier.css"/> | 8 | 8 | <link rel="stylesheet" href="styles/flashier.css"/> | |
<link rel="stylesheet" href="styles/flashy.css"/> | 9 | 9 | <link rel="stylesheet" href="styles/flashy.css"/> | |
<link href='https://fonts.googleapis.com/css?family=Changa+One:400,400italic|Titillium+Web:200,200italic,300,600,400,900,700,400italic,700italic,300italic,600italic' | 10 | 10 | <link href='https://fonts.googleapis.com/css?family=Changa+One:400,400italic|Titillium+Web:200,200italic,300,600,400,900,700,400italic,700italic,300italic,600italic' | |
rel='stylesheet' type='text/css'> | 11 | 11 | rel='stylesheet' type='text/css'> | |
</head> | 12 | 12 | </head> | |
<header> | 13 | 13 | <header> | |
14 | <a href="#" style="position:absolute;top:0;left:0;" data-activates="sidebar" class="button-collapse"><i | |||
15 | class="medium mdi-navigation-menu"></i></a> | |||
<ul ng-show="isLoggedIn" id="sidebar" class="side-nav fixed"> | 14 | 16 | <ul ng-show="isLoggedIn" id="sidebar" class="side-nav fixed"> | |
<li class="logo"><a href="//flashy.cards/" id="logo-container"> | 15 | 17 | <li class="logo"><a href="//flashy.cards/" id="logo-container"> | |
16 | 18 | |||
<h1>Flashy</h1> | 17 | 19 | <h1>Flashy</h1> | |
</a></li> | 18 | 20 | </a></li> | |
<li class="no-padding"> | 19 | 21 | <li class="no-padding"> | |
<ul class="collapsible" data-collapsible="accordion"> | 20 | 22 | <ul class="collapsible" data-collapsible="accordion"> | |
<li class="bold"> | 21 | 23 | <li class="bold"> | |
<a class="collapsible-header black-text">Classes</a> | 22 | 24 | <a class="collapsible-header black-text">Classes</a> | |
</li> | 23 | 25 | </li> | |
<div class="collapsible-body" style="display: block"> | 24 | 26 | <div class="collapsible-body" style="display: block"> | |
<ul> | 25 | 27 | <ul> | |
<li ui-sref-active="active" ng-repeat="section in sections"> | 26 | 28 | <li ui-sref-active="active" ng-repeat="section in sections"> | |
<a class="class bold" ui-sref="feed({sectionId:{{section.id}}})">{{section.short_name}}</a> | 27 | 29 | <a class="class bold" ui-sref="feed({sectionId:{{section.id}}})">{{section.short_name}}</a> | |
</li> | 28 | 30 | </li> | |
</ul> | 29 | 31 | </ul> | |
</div> | 30 | 32 | </div> | |
</ul> | 31 | 33 | </ul> | |
</li> | 32 | 34 | </li> | |
<!--<li class="bold"> | 33 | 35 | <!--<li class="bold"> | |
<a>Classes:</a></li> | 34 | 36 | <a>Classes:</a></li> | |
<div ng-repeat="section in sections"> | 35 | 37 | <div ng-repeat="section in sections"> | |
<li class="bold class" ui-sref-active="active"><a ui-sref="feed({sectionId:{{section.id}}})">{{section.short_name}}</a> | 36 | 38 | <li class="bold class" ui-sref-active="active"><a ui-sref="feed({sectionId:{{section.id}}})">{{section.short_name}}</a> | |
</li> | 37 | 39 | </li> | |
</div>--> | 38 | 40 | </div>--> | |
<li class="bold"><a ui-sref="addclass">Add Class</a></li> | 39 | 41 | <li class="bold"><a ui-sref="addclass">Add Class</a></li> | |
<li class="bold"><a ui-sref="study">Study</a></li> | 40 | 42 | <li class="bold"><a ui-sref="study">Study</a></li> | |
<li class="bold"><a ui-sref="logout">Logout</a></li> | 41 | 43 | <li class="bold"><a ui-sref="logout">Logout</a></li> | |
</ul> | 42 | 44 | </ul> | |
<a href="#" data-activates="sidebar" class="button-collapse"><i class="medium mdi-navigation-menu"></i></a> | 43 | 45 | ||
</header> | 44 | 46 | </header> | |
<body ng-controller="RootController"> | 45 | 47 | <body ng-controller="RootController"> | |
46 | 48 | |||
<main> | 47 | 49 | <main> | |
<div class="" ui-view></div> | 48 | 50 | <div class="" ui-view></div> | |
</main> | 49 | 51 | </main> | |
50 | 52 | |||
</body> | 51 | 53 | </body> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script> | 52 | 54 | <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.14/angular-ui-router.js"></script> | 53 | 55 | <script src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.14/angular-ui-router.js"></script> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-cookies.js"></script> | 54 | 56 | <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-cookies.js"></script> | |
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script> | 55 | 57 | <script src="//code.jquery.com/jquery-2.1.4.min.js"></script> | |
<script type="text/javascript" src="scripts/materialize.min.js"></script> | 56 | 58 | <script type="text/javascript" src="scripts/materialize.min.js"></script> | |
<script type="text/javascript" src="scripts/jquery.collapsible.js"></script> | 57 | 59 | <script type="text/javascript" src="scripts/jquery.collapsible.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/0.9.0/angular-material.min.js"></script> | 58 | 60 | <script src="https://ajax.googleapis.com/ajax/libs/angular_material/0.9.0/angular-material.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-animate.min.js"></script> | 59 | 61 | <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-animate.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-aria.min.js"></script> | 60 | 62 | <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-aria.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-filter/0.5.4/angular-filter.js"></script> | 61 | 63 | <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-filter/0.5.4/angular-filter.js"></script> | |
62 | 64 | |||
63 | 65 | |||
<script src="config.js"></script> | 64 | 66 | <script src="config.js"></script> | |
65 | 67 | |||
<!-- Controllers --> | 66 | 68 | <!-- Controllers --> | |
<script src="scripts/FeedController.js"></script> | 67 | 69 | <script src="scripts/FeedController.js"></script> | |
<script src="scripts/RootController.js"></script> | 68 | 70 | <script src="scripts/RootController.js"></script> | |
<script src="scripts/LoginController.js"></script> | 69 | 71 | <script src="scripts/LoginController.js"></script> | |
<script src="scripts/LogoutController.js"></script> | 70 | 72 | <script src="scripts/LogoutController.js"></script> | |
<script src="scripts/DeckController.js"></script> | 71 | 73 | <script src="scripts/DeckController.js"></script> | |
<script src="scripts/RequestResetController.js"></script> | 72 | 74 | <script src="scripts/RequestResetController.js"></script> | |
<script src="scripts/ClassAddController.js"></script> | 73 | 75 | <script src="scripts/ClassAddController.js"></script> | |
<script src="scripts/StudyController.js"></script> | 74 | 76 | <script src="scripts/StudyController.js"></script> | |
<script src="scripts/ResetPasswordController.js"></script> | 75 | 77 | <script src="scripts/ResetPasswordController.js"></script> | |
<script src="scripts/CardListController.js"></script> | 76 | 78 | <script src="scripts/CardListController.js"></script> | |
<script src="scripts/VerifyEmailController.js"></script> | 77 | 79 | <script src="scripts/VerifyEmailController.js"></script> | |
<!--<script src="scripts/SidebarController.js"></script>--> | 78 | 80 | <!--<script src="scripts/SidebarController.js"></script>--> | |
79 | 81 |
scripts/FeedController.js
View file @
c0caaf6
angular.module('flashy.FeedController', ['ui.router']). | 1 | 1 | angular.module('flashy.FeedController', ['ui.router']). | |
2 | 2 | |||
controller('FeedController', ['$scope', '$stateParams', '$state', '$http', function ($scope, $stateParams, $state, $http) { | 3 | 3 | controller('FeedController', ['$scope', '$stateParams', '$state', '$http', function ($scope, $stateParams, $state, $http) { | |
console.log('Hello from feed'); | 4 | 4 | console.log('Hello from feed'); | |
sectionId = $stateParams.sectionId; | 5 | 5 | sectionId = $stateParams.sectionId; | |
$scope.cards = []; | 6 | 6 | $scope.cards = []; | |
7 | 7 | |||
$http.get('/api/sections/' + sectionId + '/feed/'). | 8 | 8 | $http.get('/api/sections/' + sectionId + '/feed/'). | |
success(function (data) { | 9 | 9 | success(function (data) { | |
console.log(data); | 10 | 10 | console.log(data); | |
$scope.cards = data; | 11 | 11 | $scope.cards = data; | |
}). | 12 | 12 | }). | |
error(function (err) { | 13 | 13 | error(function (err) { | |
console.log('pulling feed failed'); | 14 | 14 | console.log('pulling feed failed'); | |
}); | 15 | 15 | }); | |
16 | 16 | |||
$scope.viewDeck = function () { | 17 | 17 | $scope.viewDeck = function () { | |
$state.go('deck', {sectionId: sectionId}); | 18 | 18 | $state.go('deck', {sectionId: sectionId}); | |
console.log('go to deck'); | 19 | 19 | console.log('go to deck'); | |
}; | 20 | 20 | }; | |
21 | 21 | |||
$scope.pushCard = function () { | 22 | 22 | $scope.pushCard = function () { | |
console.log('make! card content:' + $scope.text); | 23 | 23 | console.log('make! card content:' + $scope.text); | |
var pushed = new Date(Date.now()); | 24 | 24 | var pushed = new Date(Date.now()); | |
console.log(pushed.toString()); | 25 | 25 | console.log(pushed.toString()); | |
text = $scope.text; | 26 | 26 | text = $scope.text; | |
// attempt to make card :( | 27 | 27 | // attempt to make card :( | |
var myCard = { | 28 | 28 | var myCard = { | |
'text': $scope.text, | 29 | 29 | 'text': $scope.text, | |
'material_date': pushed, | 30 | 30 | 'material_date': pushed, | |
'mask': '[]', | 31 | 31 | 'mask': '[]', | |
section: sectionId | 32 | 32 | section: sectionId | |
}; | 33 | 33 | }; | |
$http.post('/api/flashcards/', myCard). | 34 | 34 | $http.post('/api/flashcards/', myCard). | |
success(function (data) { | 35 | 35 | success(function (data) { | |
console.log('pushed a card!'); | 36 | 36 | console.log('pushed a card!'); | |
$scope.cards.push(myCard); // Add right away | 37 | 37 | $scope.cards.push(myCard); // Add right away | |
$scope.refreshCards(); // Refresh list | 38 | 38 | $scope.refreshCards(); // Refresh list | |
listenForC = true; | 39 | 39 | listenForC = true; | |
}). | 40 | 40 | }). | |
error(function (error) { | 41 | 41 | error(function (error) { | |
console.log('haha, n00b'); | 42 | 42 | console.log('haha, n00b'); | |
}); | 43 | 43 | }); | |
44 | 44 | |||
$scope.text = ''; | 45 | 45 | $scope.text = ''; | |
}; | 46 | 46 | }; | |
47 | 47 | |||
$scope.refreshCards = function () { | 48 | 48 | $scope.refreshCards = function () { | |
$http.get('/api/sections/' + sectionId + '/feed/'). | 49 | 49 | $http.get('/api/sections/' + sectionId + '/feed/'). | |
success(function (data) { | 50 | 50 | success(function (data) { | |
console.log(data); | 51 | 51 | console.log(data); | |
$scope.cards = data; | 52 | 52 | $scope.cards = data; | |
console.log('success in refresh cards...'); | 53 | 53 | console.log('success in refresh cards...'); | |
}). | 54 | 54 | }). | |
error(function (err) { | 55 | 55 | error(function (err) { | |
console.log('refresh fail'); | 56 | 56 | console.log('refresh fail'); | |
}); | 57 | 57 | }); | |
} | 58 | 58 | } | |
59 | ||||
60 | /* Key bindings for the whole feed window. Hotkey it up! */ | |||
var listenForC = true; | 59 | 61 | var listenForC = true; | |
$(document).keydown(function (e) { | 60 | 62 | $(document).keydown(function (e) { | |
var keyed = e.which; | 61 | 63 | var keyed = e.which; | |
if (keyed == 67 && listenForC) { // "c" or "C" for compose | 62 | 64 | if (keyed == 67 && listenForC) { // "c" or "C" for compose | |
$('#newCard').openModal(); | 63 | 65 | $('#newCard').openModal(); | |
listenForC = false; | 64 | 66 | listenForC = false; | |
return false; | 65 | 67 | return false; | |
68 | } else if (keyed == 13 || keyed == 27) { // enter or esc, respectively | |||
69 | listenForC = true; | |||
70 | document.getElementById('new-card-input').value = ''; | |||
} | 66 | 71 | } | |
}); | 67 | 72 | }); | |
68 | 73 | |||
69 | 74 | |||
$scope.flashcard = ''; | 70 | 75 | $scope.flashcard = ''; | |
$scope.text = ''; | 71 | 76 | $scope.text = ''; | |
72 | 77 | |||
$(document).ready(function () { | 73 | 78 | $(document).ready(function () { | |
// the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered | 74 | 79 | // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered | |
$('.modal-trigger').leanModal({ | 75 | 80 | $('.modal-trigger').leanModal({ | |
dismissible: true, // Modal can be dismissed by clicking outside of the modal | 76 | 81 | dismissible: true, // Modal can be dismissed by clicking outside of the modal | |
opacity: 0, // Opacity of modal background | 77 | 82 | opacity: 0, // Opacity of modal background | |
in_duration: 300, // Transition in duration | 78 | 83 | in_duration: 300, // Transition in duration | |
out_duration: 200, // Transition out duration | 79 | 84 | out_duration: 200, // Transition out duration | |
85 | ready: function() { | |||
86 | listenForC = false; | |||
87 | console.log("modal OPENING"); |
styles/flashy.css
View file @
c0caaf6
.no-user-select { | 1 | 1 | .no-user-select { | |
-moz-user-select: none; | 2 | 2 | -moz-user-select: none; | |
-webkit-user-select: none; | 3 | 3 | -webkit-user-select: none; | |
-ms-user-select: none; | 4 | 4 | -ms-user-select: none; | |
user-select: none; | 5 | 5 | user-select: none; | |
} | 6 | 6 | } | |
7 | 7 | |||
.angucomplete-dropdown { | 8 | 8 | .angucomplete-dropdown { | |
border-color: #ececec; | 9 | 9 | border-color: #ececec; | |
border-width: 1px; | 10 | 10 | border-width: 1px; | |
border-style: solid; | 11 | 11 | border-style: solid; | |
border-radius: 2px; | 12 | 12 | border-radius: 2px; | |
/*width: 250px;*/ | 13 | 13 | /*width: 250px;*/ | |
padding: 6px; | 14 | 14 | padding: 6px; | |
cursor: pointer; | 15 | 15 | cursor: pointer; | |
z-index: 9999; | 16 | 16 | z-index: 9999; | |
position: absolute; | 17 | 17 | position: absolute; | |
/*top: 32px; | 18 | 18 | /*top: 32px; | |
left: 0px; | 19 | 19 | left: 0px; | |
*/ | 20 | 20 | */ | |
margin-top: -6px; | 21 | 21 | margin-top: -6px; | |
background-color: #ffffff; | 22 | 22 | background-color: #ffffff; | |
} | 23 | 23 | } | |
24 | 24 | |||
.angucomplete-description { | 25 | 25 | .angucomplete-description { | |
font-size: 14px; | 26 | 26 | font-size: 14px; | |
} | 27 | 27 | } | |
28 | 28 | |||
.angucomplete-row { | 29 | 29 | .angucomplete-row { | |
padding: 5px; | 30 | 30 | padding: 5px; | |
color: #000000; | 31 | 31 | color: #000000; | |
margin-bottom: 4px; | 32 | 32 | margin-bottom: 4px; | |
clear: both; | 33 | 33 | clear: both; | |
} | 34 | 34 | } | |
35 | 35 | |||
.angucomplete-selected-row { | 36 | 36 | .angucomplete-selected-row { | |
background-color: #aaaaff; | 37 | 37 | background-color: #aaaaff; | |
} | 38 | 38 | } | |
39 | 39 | |||
.container .row { | 40 | 40 | .container .row { | |
margin-left: 0; | 41 | 41 | margin-left: 0; | |
margin-right: 0; | 42 | 42 | margin-right: 0; | |
} | 43 | 43 | } | |
44 | 44 | |||
ul.side-nav.fixed li { | 45 | 45 | ul.side-nav.fixed li { | |
font-size: 24px; | 46 | 46 | font-size: 24px; | |
} | 47 | 47 | } | |
48 | 48 | |||
ul.side-nav.fixed li a.class { | 49 | 49 | ul.side-nav.fixed li a.class { | |
height: 28px; | 50 | 50 | height: 28px; | |
font-size: 20px; | 51 | 51 | font-size: 20px; | |
line-height: normal; | 52 | 52 | line-height: normal; | |
font-weight: 600; | 53 | 53 | font-weight: 600; | |
} | 54 | 54 | } | |
55 | 55 | |||
ul.side-nav.fixed li a { | 56 | 56 | ul.side-nav.fixed li a { | |
font-size: 24px; | 57 | 57 | font-size: 24px; | |
} | 58 | 58 | } | |
59 | 59 | |||
/* Flashcard directive css */ | 60 | 60 | /* Flashcard directive css */ | |
.card { | 61 | 61 | .card { | |
word-wrap: break-word; | 62 | 62 | word-wrap: break-word; | |
} | 63 | 63 | } | |
64 | 64 | |||
.card.flashy { | 65 | 65 | .card.flashy { | |
float: left; | 66 | 66 | float: left; | |
text-align: center; | 67 | 67 | text-align: center; | |
margin: 6px; | 68 | 68 | margin: 6px; | |
transition: all 0.2s cubic-bezier(0, 0, 0.6, 1); | 69 | 69 | transition: all 0.2s cubic-bezier(0, 0, 0.6, 1); | |
font-family: 'Titillium Web', sans-serif; | 70 | 70 | font-family: 'Titillium Web', sans-serif; | |
} | 71 | 71 | } | |
72 | 72 | |||
.card.flashy.shrinky { | 73 | 73 | .card.flashy.shrinky { | |
height: 0; | 74 | 74 | height: 0; | |
opacity: 0; | 75 | 75 | opacity: 0; | |
overflow: hidden; | 76 | 76 | overflow: hidden; | |
} | 77 | 77 | } | |
78 | 78 | |||
.card-overlay { | 79 | 79 | .card-overlay { | |
cursor: pointer; | 80 | 80 | cursor: pointer; | |
left: 0; | 81 | 81 | left: 0; | |
opacity: 0; | 82 | 82 | opacity: 0; | |
position: absolute; | 83 | 83 | position: absolute; | |
top: 0; | 84 | 84 | top: 0; | |
transition: visibility 0s cubic-bezier(0, 0, 0.6, 1) 0.2s, | 85 | 85 | transition: visibility 0s cubic-bezier(0, 0, 0.6, 1) 0.2s, | |
opacity 0.2s cubic-bezier(0, 0, 0.6, 1); | 86 | 86 | opacity 0.2s cubic-bezier(0, 0, 0.6, 1); | |
/* animation effect to appear on off-hover */ | 87 | 87 | /* animation effect to appear on off-hover */ | |
visibility: hidden; | 88 | 88 | visibility: hidden; | |
height: 100%; | 89 | 89 | height: 100%; | |
width: 100%; | 90 | 90 | width: 100%; | |
} | 91 | 91 | } | |
92 | 92 | |||
.card-overlay i { | 93 | 93 | .card-overlay i { | |
color: #FFF; | 94 | 94 | color: #FFF; | |
left: 50%; | 95 | 95 | left: 50%; | |
position: absolute; | 96 | 96 | position: absolute; | |
top: 50%; | 97 | 97 | top: 50%; | |
transform: translate(-50%, -50%); | 98 | 98 | transform: translate(-50%, -50%); | |
transition: all 0.2s cubic-bezier(0, 0, 0.6, 1) 0s; | 99 | 99 | transition: all 0.2s cubic-bezier(0, 0, 0.6, 1) 0s; | |
} | 100 | 100 | } | |
101 | 101 | |||
.center-me:hover i { | 102 | 102 | .center-me:hover i { | |
text-shadow: 0 0 15px rgba(255,255,255,0.7); | 103 | 103 | text-shadow: 0 0 15px rgba(255,255,255,0.7); | |
} | 104 | 104 | } | |
105 | 105 | |||
.card:hover .card-overlay { | 106 | 106 | .card:hover .card-overlay { | |
opacity: 1; | 107 | 107 | opacity: 0.9; | |
transition-delay: 0s; /* animation effect to appear on hover */ | 108 | 108 | transition-delay: 0s; /* animation effect to appear on hover */ | |
visibility: visible; | 109 | 109 | visibility: visible; | |
} | 110 | 110 | } | |
111 | 111 | |||
.top-box { | 112 | 112 | .top-box { | |
background-color: rgba(0, 81, 229, 0.6); | 113 | 113 | background-color: rgba(0, 81, 229, 0.6); | |
height: 65%; | 114 | 114 | height: 65%; | |
position: relative; | 115 | 115 | position: relative; | |
transition: all 0.2s cubic-bezier(0, 0, 0.6, 1) 0s; | 116 | 116 | transition: all 0.2s cubic-bezier(0, 0, 0.6, 1) 0s; | |
width: 100%; | 117 | 117 | width: 100%; | |
} | 118 | 118 | } | |
119 | 119 | |||
.top-box:hover { | 120 | 120 | .top-box:hover { | |
background-color: rgba(0, 81, 229, 0.75); | 121 | 121 | background-color: rgba(0, 81, 229, 0.75); | |
} | 122 | 122 | } | |
123 | 123 | |||
.bottom-box { | 124 | 124 | .bottom-box { | |
height: 35%; | 125 | 125 | height: 35%; | |
width: 100%; | 126 | 126 | width: 100%; | |
} | 127 | 127 | } | |
128 | 128 | |||
.left-box { | 129 | 129 | .left-box { | |
background-color: rgba(15, 0, 155, 0.6); | 130 | 130 | background-color: rgba(15, 0, 155, 0.6); | |
float: left; | 131 | 131 | float: left; | |
position: relative; | 132 | 132 | position: relative; | |
height: 100%; | 133 | 133 | height: 100%; | |
transition: all 0.2s cubic-bezier(0, 0, 0.6, 1) 0s; | 134 | 134 | transition: all 0.2s cubic-bezier(0, 0, 0.6, 1) 0s; | |
width: 50%; | 135 | 135 | width: 50%; | |
} | 136 | 136 | } | |
137 | 137 | |||
.left-box:hover { | 138 | 138 | .left-box:hover { | |
background-color: rgba(15, 0, 155, 0.75); | 139 | 139 | background-color: rgba(15, 0, 155, 0.75); | |
} | 140 | 140 | } | |
141 | 141 | |||
.right-box { | 142 | 142 | .right-box { | |
background-color: rgba(207, 0, 86, 0.6); | 143 | 143 | background-color: rgba(207, 0, 86, 0.6); | |
float: right; | 144 | 144 | float: right; | |
height: 100%; | 145 | 145 | height: 100%; | |
position: relative; | 146 | 146 | position: relative; | |
transition: all 0.2s cubic-bezier(0, 0, 0.6, 1) 0s; | 147 | 147 | transition: all 0.2s cubic-bezier(0, 0, 0.6, 1) 0s; | |
width: 50%; | 148 | 148 | width: 50%; | |
} | 149 | 149 | } | |
150 | 150 | |||
.right-box:hover { | 151 | 151 | .right-box:hover { | |
background-color: rgba(207, 0, 86, 0.75); | 152 | 152 | background-color: rgba(207, 0, 86, 0.75); | |
} | 153 | 153 | } | |
154 | 154 | |||
.center-me { | 155 | 155 | .center-me { | |
height: 100%; | 156 | 156 | height: 100%; | |
margin: 0 auto; | 157 | 157 | margin: 0 auto; | |
text-align: center; | 158 | 158 | text-align: center; | |
vertical-align: middle; | 159 | 159 | vertical-align: middle; | |
width: 100%; | 160 | 160 | width: 100%; | |
} | 161 | 161 | } | |
162 | 162 | |||
.modal.bottom-sheet { | 163 | 163 | .modal.bottom-sheet { | |
width: 40%; | 164 | 164 | width: 40%; | |
margin-left: auto; | 165 | 165 | margin-left: auto; | |
margin-right: auto; | 166 | 166 | margin-right: auto; | |
} | 167 | 167 | } | |
168 | 168 | |||
/* label color */ | 169 | 169 | #newCard input[type=text] { | |
170 | height: 3rem !important; | |||
171 | } | |||
172 | ||||
.input-field label { | 170 | 173 | .input-field label { | |
color: #673ab7; | 171 | 174 | color: #673ab7; | |
} | 172 | 175 | } | |
173 | 176 | |||
/* label focus color */ | 174 | 177 | /* label focus color */ | |
.input-field input[type]:focus + label { | 175 | 178 | .input-field input[type]:focus + label { | |
color: #b388ff; | 176 | 179 | color: #b388ff; | |
} | 177 | 180 | } | |
178 | 181 | |||
/* label underline focus color */ | 179 | 182 | /* label underline focus color */ | |
.input-field input[type]:focus { | 180 | 183 | .input-field input[type]:focus { | |
border-bottom: 1px solid #b388ff; | 181 | 184 | border-bottom: 1px solid #b388ff; | |
box-shadow: 0 1px 0 0 #b388ff; | 182 | 185 | box-shadow: 0 1px 0 0 #b388ff; | |
} | 183 | 186 | } | |
184 | 187 | |||
/* valid color */ | 185 | 188 | /* valid color */ | |
.input-field input[type].valid { | 186 | 189 | .input-field input[type].valid { | |
border-bottom: 1px solid #673ab7; | 187 | 190 | border-bottom: 1px solid #673ab7; | |
box-shadow: 0 1px 0 0 #673ab7; | 188 | 191 | box-shadow: 0 1px 0 0 #673ab7; | |
} | 189 | 192 | } | |
190 | 193 | |||
/* invalid color */ | 191 | 194 | /* invalid color */ | |
.input-field input[type].invalid { | 192 | 195 | .input-field input[type].invalid { | |
border-bottom: 1px solid #673ab7; | 193 | 196 | border-bottom: 1px solid #673ab7; | |
box-shadow: 0 1px 0 0 #673ab7; | 194 | 197 | box-shadow: 0 1px 0 0 #673ab7; | |
} | 195 | 198 | } | |
196 | 199 | |||
/* icon prefix focus color */ | 197 | 200 | /* icon prefix focus color */ | |
.input-field .prefix.active { | 198 | 201 | .input-field .prefix.active { | |
color: #b388ff; | 199 | 202 | color: #b388ff; | |
} | 200 | 203 | } | |
201 | 204 | |||
/* label focus color */ | 202 | 205 | /* label focus color */ | |
.input-field textarea[type]:focus + label { | 203 | 206 | .input-field textarea[type]:focus + label { | |
color: #b388ff; | 204 | 207 | color: #b388ff; | |
} | 205 | 208 | } | |
206 | 209 | |||
/* label underline focus color */ | 207 | 210 | /* label underline focus color */ | |
.input-field textarea[type]:focus { | 208 | 211 | .input-field textarea[type]:focus { | |
border-bottom: 1px solid #b388ff; | 209 | 212 | border-bottom: 1px solid #b388ff; | |
box-shadow: 0 1px 0 0 #b388ff; | 210 | 213 | box-shadow: 0 1px 0 0 #b388ff; |
templates/feed.html
View file @
c0caaf6
<div class="row"> | 1 | 1 | <div class="row"> | |
<a class="btn" ng-click="viewDeck()" style="margin-top: 15px">View Deck</a> | 2 | 2 | <a class="btn" ng-click="viewDeck()" style="margin-top: 15px">View Deck</a> | |
</div> | 3 | 3 | </div> | |
4 | 4 | |||
<!--cards--> | 5 | 5 | <!--cards--> | |
<div class="row"> | 6 | 6 | <div class="row"> | |
<div ng-repeat="card in cards"> | 7 | 7 | <div ng-repeat="card in cards"> | |
<flashcard flashcard-obj="card" refresh="refreshCards()" /> | 8 | 8 | <flashcard flashcard-obj="card" refresh="refreshCards()" /> | |
</div> | 9 | 9 | </div> | |
</div> | 10 | 10 | </div> | |
11 | 11 | |||
12 | 12 | |||
<!--Lil plus button in corner--> | 13 | 13 | <!--Lil plus button in corner--> | |
<div class="fixed-action-btn" style="bottom: 45px; right: 24px;"> | 14 | 14 | <div class="fixed-action-btn" style="bottom: 45px; right: 24px;"> | |
<a data-target="newCard" class="btn-floating btn-large modal-trigger" href="#newCard"> | 15 | 15 | <a data-target="newCard" class="btn-floating btn-large modal-trigger" href="#newCard"> | |
<i class="large mdi-content-add"></i> | 16 | 16 | <i class="large mdi-content-add"></i> | |
</a> | 17 | 17 | </a> | |
<!--Maybe this will come in handy later? Floating bubbles on mouseover--> | 18 | |||
<ul> | 19 | |||
<li><a class="btn-floating red"><i class="large mdi-editor-insert-chart"></i></a></li> | 20 | |||
<li><a class="btn-floating yellow darken-1"><i class="large mdi-editor-format-quote"></i></a></li> | 21 | |||
<li><a class="btn-floating green"><i class="large mdi-editor-publish"></i></a></li> | 22 | |||
<li><a class="btn-floating blue"><i class="large mdi-editor-attach-file"></i></a></li> | 23 | |||
</ul> | 24 | |||
</div> | 25 | 18 | </div> | |
26 | 19 | |||
<form> | 27 | 20 | <form> | |
<div id="newCard" class="modal bottom-sheet"> | 28 | 21 | <div id="newCard" class="modal bottom-sheet"> | |
<div class="modal-content"> | 29 | 22 | <div class="modal-content"> | |
<div class="row"> | 30 | 23 | <div class="row"> | |
<div class="input-field"> | 31 | 24 | <div class="input-field"> | |
<i class="mdi-editor-mode-edit prefix"></i> | 32 | 25 | <i class="mdi-editor-mode-edit prefix"></i> | |
<input class="materialize-textarea" ng-model="text" type="text" maxlength="255" autofocus/> | 33 | 26 | <input id="new-card-input" class="materialize-textarea" ng-model="text" type="text" maxlength="255" autofocus/> | |
<label id="newCardSign" for="newCard">New Flashcard</label> | 34 | 27 | <label id="newCardSign" for="newCard">New Flashcard Description</label> | |
</div> | 35 | 28 | </div> | |
</div> | 36 | 29 | </div> | |
</div> | 37 | 30 | </div> | |
<div class="modal-footer"> | 38 | 31 | <div class="modal-footer"> | |
<button class="btn modal-close" type="submit" ng-click="pushCard()">Submit | 39 | 32 | <button class="btn modal-close" type="submit" ng-click="pushCard()">Submit | |
<i class="mdi-content-send right"></i> | 40 | 33 | <i class="mdi-content-send right"></i> | |
</button> | 41 | 34 | </button> | |
</div> | 42 | 35 | </div> |