mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-21 20:48:00 +01:00
Make changes in regards to #28
This commit is contained in:
parent
0b4d8fda5d
commit
2de2b87653
10 changed files with 22 additions and 51 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,3 +6,4 @@ Homestead.yaml
|
|||
.env
|
||||
.vagrant
|
||||
_ide_helper.php
|
||||
.idea
|
|
@ -174,7 +174,8 @@ class Album extends Model
|
|||
],
|
||||
'covers' => [
|
||||
'small' => $album->getCoverUrl(Image::SMALL),
|
||||
'normal' => $album->getCoverUrl(Image::NORMAL)
|
||||
'normal' => $album->getCoverUrl(Image::NORMAL),
|
||||
'original' => $album->getCoverUrl(Image::ORIGINAL)
|
||||
],
|
||||
'url' => $album->url,
|
||||
'user' => [
|
||||
|
|
|
@ -132,7 +132,8 @@ class Playlist extends Model
|
|||
],
|
||||
'covers' => [
|
||||
'small' => $playlist->getCoverUrl(Image::SMALL),
|
||||
'normal' => $playlist->getCoverUrl(Image::NORMAL)
|
||||
'normal' => $playlist->getCoverUrl(Image::NORMAL),
|
||||
'original' => $playlist->getCoverUrl(Image::ORIGINAL)
|
||||
],
|
||||
'url' => $playlist->url,
|
||||
'user' => [
|
||||
|
|
|
@ -321,7 +321,8 @@ class Track extends Model
|
|||
'covers' => [
|
||||
'thumbnail' => $track->getCoverUrl(Image::THUMBNAIL),
|
||||
'small' => $track->getCoverUrl(Image::SMALL),
|
||||
'normal' => $track->getCoverUrl(Image::NORMAL)
|
||||
'normal' => $track->getCoverUrl(Image::NORMAL),
|
||||
'original' => $track->getCoverUrl(Image::ORIGINAL)
|
||||
],
|
||||
'streams' => [
|
||||
'mp3' => $track->getStreamUrl('MP3'),
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
<div class="stretch-to-bottom details-columns">
|
||||
<div class="right">
|
||||
<img colorbox pfm-href-loader="album.covers.normal" class="cover" pfm-src-loader="album.covers.normal" pfm-src-size="normal" />
|
||||
<a colorbox ng-href="{{album.covers.original}}"><img class="cover" pfm-src-loader="album.covers.normal" pfm-src-size="normal" /></a>
|
||||
|
||||
<div class="share-buttons" pfm-share-buttons>
|
||||
<a class="tumblr" bo-href="album.share.tumblrUrl" title="Share on Tumblr" style="display:inline-block; overflow:hidden; width:20px; height:20px; background:url('/images/tumblr-share.png') top left no-repeat transparent;"></a>
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
<li><a href="https://github.com/angular-ui/ui-router" target="_blank">UI-Router</a> - for making non-trivial Angular.js routes possible</li>
|
||||
<li><a href="https://angular-ui.github.io/bootstrap/" target="_blank">UI-Bootstrap</a> - for making Bootstrap and Angular.js get along</li>
|
||||
<li><a href="https://github.com/VentureCraft/revisionable" target="_blank">Revisionable</a> - for making audit logs easy</li>
|
||||
<li><a href="https://github.com/jackmoore/colorbox" target="_blank">Colorbox</a> - for allowing us to have pretty lightboxes</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
<div class="stretch-to-bottom details-columns">
|
||||
<div class="right">
|
||||
<a href=""><img colorbox pfm-href-loader="playlist.covers.normal" class="cover" pfm-src-loader="playlist.covers.normal" pfm-src-size="normal" /></a>
|
||||
<a colorbox ng-href="{{playlist.covers.original}}"><img class="cover" pfm-src-loader="playlist.covers.normal" pfm-src-size="normal" /></a>
|
||||
|
||||
<div class="share-buttons" pfm-share-buttons>
|
||||
<a class="tumblr" bo-href="playlist.share.tumblrUrl" title="Share on Tumblr" style="display:inline-block; overflow:hidden; width:20px; height:20px; background:url('/images/tumblr-share.png') top left no-repeat transparent;"></a>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
<div class="stretch-to-bottom details-columns">
|
||||
<div class="right">
|
||||
<a href=""><img colorbox pfm-href-loader="track.covers.normal" class="cover" pfm-src-loader="track.covers.normal" pfm-src-size="normal" /></a>
|
||||
<a colorbox ng-href="{{track.covers.original}}"><img class="cover" pfm-src-loader="track.covers.normal" pfm-src-size="normal" /></a>
|
||||
|
||||
<div class="share-buttons" pfm-share-buttons>
|
||||
<a class="tumblr" bo-href="track.share.tumblrUrl" title="Share on Tumblr" style="display:inline-block; overflow:hidden; width:20px; height:20px; background:url('/images/tumblr-share.png') top left no-repeat transparent;"></a>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Pony.fm - A community for pony fan music.
|
||||
# Copyright (C) 2015 Peter Deltchev
|
||||
# Copyright (C) 2015 Zeusking19
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
|
@ -14,11 +14,13 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
`angular.module('ponyfm').directive('colorbox', function() {
|
||||
return {
|
||||
restrict: 'AC',
|
||||
link: function (scope, element, attrs) {
|
||||
$(element).colorbox(attrs.colorbox);
|
||||
}
|
||||
};
|
||||
});`
|
||||
# Based on http://stackoverflow.com/questions/14641791/how-to-use-colorbox-with-angular-js
|
||||
|
||||
angular.module('ponyfm').directive 'colorbox', ->
|
||||
{
|
||||
restrict: 'AC'
|
||||
link: (scope, element, attrs) ->
|
||||
$(element).colorbox attrs.colorbox
|
||||
return
|
||||
|
||||
}
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
# Pony.fm - A community for pony fan music.
|
||||
# Copyright (C) 2015 Peter Deltchev
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
angular.module('ponyfm').directive 'pfmHrefLoader', () ->
|
||||
(scope, element, attrs) ->
|
||||
size = attrs.pfmSrcSize || 'normal'
|
||||
|
||||
update = (val) ->
|
||||
element.attr 'href', '/images/icons/loading_' + size + '.png'
|
||||
|
||||
image = element.clone()
|
||||
image.removeAttr 'pfm-href-loader'
|
||||
image.removeAttr 'pfm-src-size'
|
||||
|
||||
element.attr 'href', val
|
||||
element.css {opacity: 0}
|
||||
element.animate {opacity: 1}, 250
|
||||
|
||||
image[0].href = val
|
||||
|
||||
update scope.$eval attrs.pfmHrefLoader
|
||||
|
||||
scope.$watch attrs.pfmHrefLoader, update
|
Loading…
Reference in a new issue