Commit c0caaf6738a51fcfb587f2daf4f9757752d8f5d3

Authored by Melody

Merge branch 'master' of git.ucsd.edu:110swag/flashy-frontend

Showing 4 changed files Side-by-side Diff

... ... @@ -11,6 +11,8 @@
11 11 rel='stylesheet' type='text/css'>
12 12 </head>
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>
14 16 <ul ng-show="isLoggedIn" id="sidebar" class="side-nav fixed">
15 17 <li class="logo"><a href="//flashy.cards/" id="logo-container">
16 18  
... ... @@ -40,7 +42,7 @@
40 42 <li class="bold"><a ui-sref="study">Study</a></li>
41 43 <li class="bold"><a ui-sref="logout">Logout</a></li>
42 44 </ul>
43   - <a href="#" data-activates="sidebar" class="button-collapse"><i class="medium mdi-navigation-menu"></i></a>
  45 +
44 46 </header>
45 47 <body ng-controller="RootController">
46 48  
scripts/FeedController.js View file @ c0caaf6
... ... @@ -56,6 +56,8 @@
56 56 console.log('refresh fail');
57 57 });
58 58 }
  59 +
  60 + /* Key bindings for the whole feed window. Hotkey it up! */
59 61 var listenForC = true;
60 62 $(document).keydown(function (e) {
61 63 var keyed = e.which;
... ... @@ -63,6 +65,9 @@
63 65 $('#newCard').openModal();
64 66 listenForC = 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  
... ... @@ -77,6 +82,14 @@
77 82 opacity: 0, // Opacity of modal background
78 83 in_duration: 300, // Transition in duration
79 84 out_duration: 200, // Transition out duration
  85 + ready: function() {
  86 + listenForC = false;
  87 + console.log("modal OPENING");
  88 + },
  89 + complete: function() {
  90 + listenForC = true;
  91 + console.log("modal done, closing");
  92 + }
80 93 }
81 94 );
82 95 });
styles/flashy.css View file @ c0caaf6
... ... @@ -104,7 +104,7 @@
104 104 }
105 105  
106 106 .card:hover .card-overlay {
107   - opacity: 1;
  107 + opacity: 0.9;
108 108 transition-delay: 0s; /* animation effect to appear on hover */
109 109 visibility: visible;
110 110 }
... ... @@ -166,7 +166,10 @@
166 166 margin-right: auto;
167 167 }
168 168  
169   -/* label color */
  169 +#newCard input[type=text] {
  170 + height: 3rem !important;
  171 +}
  172 +
170 173 .input-field label {
171 174 color: #673ab7;
172 175 }
templates/feed.html View file @ c0caaf6
... ... @@ -15,13 +15,6 @@
15 15 <a data-target="newCard" class="btn-floating btn-large modal-trigger" href="#newCard">
16 16 <i class="large mdi-content-add"></i>
17 17 </a>
18   - <!--Maybe this will come in handy later? Floating bubbles on mouseover-->
19   - <ul>
20   - <li><a class="btn-floating red"><i class="large mdi-editor-insert-chart"></i></a></li>
21   - <li><a class="btn-floating yellow darken-1"><i class="large mdi-editor-format-quote"></i></a></li>
22   - <li><a class="btn-floating green"><i class="large mdi-editor-publish"></i></a></li>
23   - <li><a class="btn-floating blue"><i class="large mdi-editor-attach-file"></i></a></li>
24   - </ul>
25 18 </div>
26 19  
27 20 <form>
... ... @@ -30,8 +23,8 @@
30 23 <div class="row">
31 24 <div class="input-field">
32 25 <i class="mdi-editor-mode-edit prefix"></i>
33   - <input class="materialize-textarea" ng-model="text" type="text" maxlength="255" autofocus/>
34   - <label id="newCardSign" for="newCard">New Flashcard</label>
  26 + <input id="new-card-input" class="materialize-textarea" ng-model="text" type="text" maxlength="255" autofocus/>
  27 + <label id="newCardSign" for="newCard">New Flashcard Description</label>
35 28 </div>
36 29 </div>
37 30 </div>