Add a glow to taken styled books
This commit is contained in:
		
							parent
							
								
									2f7668efa7
								
							
						
					
					
						commit
						a0cd714933
					
				
					 3 changed files with 13 additions and 7 deletions
				
			
		| 
						 | 
					@ -57,6 +57,11 @@
 | 
				
			||||||
  margin-top: -20%;
 | 
					  margin-top: -20%;
 | 
				
			||||||
  z-index: 2;
 | 
					  z-index: 2;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					.book .spine.is-success {
 | 
				
			||||||
 | 
					  -webkit-box-shadow: inset 0px 0px 99px 10px rgba(230,252,106,1);
 | 
				
			||||||
 | 
					  -moz-box-shadow: inset 0px 0px 99px 10px rgba(230,252,106,1);
 | 
				
			||||||
 | 
					  box-shadow: inset 0px 0px 99px 10px rgba(230,252,106,1);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.spine .text-container {
 | 
					.spine .text-container {
 | 
				
			||||||
  width: 260px;
 | 
					  width: 260px;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -51,9 +51,14 @@ $(document).ready(function() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  $('.take-book').click(function() {
 | 
					  $('.take-book').click(function() {
 | 
				
			||||||
    var id = $(this).data('book');
 | 
					    var id = $(this).data('book');
 | 
				
			||||||
    $('#book_' + id).find('.box')
 | 
					    var book = $('#book_' + id).find('.spine');
 | 
				
			||||||
      .removeClass('box').addClass(['notification', 'is-success'])
 | 
					    if (book) {
 | 
				
			||||||
      .attr('title', 'This can be downloaded until you leave this page');
 | 
					      book.addClass('is-success');
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					      book = $('#book_' + id).find('.box');
 | 
				
			||||||
 | 
					      book.removeClass('box').addClass(['notification', 'is-success'])
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    book.attr('title', 'This can be downloaded until you leave this page');
 | 
				
			||||||
    socket.emit('take book', id);
 | 
					    socket.emit('take book', id);
 | 
				
			||||||
    downloadButton = this;
 | 
					    downloadButton = this;
 | 
				
			||||||
    $(this).addClass('is-loading');
 | 
					    $(this).addClass('is-loading');
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,10 +5,6 @@
 | 
				
			||||||
        <h2 class="title" style="color:{{textColor}}">{{title}}</h2>
 | 
					        <h2 class="title" style="color:{{textColor}}">{{title}}</h2>
 | 
				
			||||||
        <h4 class="subtitle" style="color:{{textColor}}">{{author}}</h4>
 | 
					        <h4 class="subtitle" style="color:{{textColor}}">{{author}}</h4>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <!-- div class="tags has-addons">
 | 
					 | 
				
			||||||
        <span class="tag">File Format</span>
 | 
					 | 
				
			||||||
        <span class="tag is-info">{{fileType}}</span>
 | 
					 | 
				
			||||||
      </div -->
 | 
					 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue