Description
@@ -20,13 +34,15 @@
+
diff --git a/resources/assets/scripts/app/controllers/track.coffee b/resources/assets/scripts/app/controllers/track.coffee
index 56a1b53c..cf7ef57e 100644
--- a/resources/assets/scripts/app/controllers/track.coffee
+++ b/resources/assets/scripts/app/controllers/track.coffee
@@ -19,10 +19,12 @@ module.exports = angular.module('ponyfm').controller "track", [
($scope, meta, tracks, $state, playlists, auth, favourites, $modal, cachedTrack, $window, $timeout, $mdDialog) ->
$scope.track
$scope.trackId = parseInt($state.params.id)
-
updateTrackData = (forceUpdate = false) ->
tracks.fetch($scope.trackId, forceUpdate).done (trackResponse) ->
$scope.track = trackResponse.track
+ console.log(moment($scope.track.published_at))
+ $scope.track.readableDate = moment($scope.track.published_at).format("Do MMM YYYY")
+
meta.setTitle("#{$scope.track.title} | #{$scope.track.user.name}")
meta.setDescription("Listen to \"#{$scope.track.title}\" by #{$scope.track.user.name} on the largest pony music site.")
@@ -63,7 +65,6 @@ module.exports = angular.module('ponyfm').controller "track", [
).then (() ->
return
), ->
- console.log $state.current
$scope.$apply()
$scope.addToNewPlaylist = () ->
diff --git a/resources/assets/scripts/shared/layout.coffee b/resources/assets/scripts/shared/layout.coffee
index 4b706617..08a06633 100644
--- a/resources/assets/scripts/shared/layout.coffee
+++ b/resources/assets/scripts/shared/layout.coffee
@@ -33,7 +33,7 @@ window.handleResize = () ->
$this.css
'max-height': newMaxHeight
- $('ui-view').each () ->
+ $('.site-content').each () ->
$this = $ this
newHeight = windowHeight - $this.offset().top
if isMobile
@@ -55,6 +55,14 @@ window.handleResize = () ->
$this.css {height: 'auto'}
$(this).fadeOut 200
+ $('.blurred-background').each () ->
+ $this = $ this
+ $this.height $('.resource-details header').height() + 55
+
+ $('.resource-details .single-player button').each () ->
+ $this = $ this
+ $this.css 'top', $('.resource-details header').height() + 5
+
window.alignVertically = (element) ->
$element = $(element)
$parent = $element.parent()
diff --git a/resources/assets/styles/body.less b/resources/assets/styles/body.less
index 66e3fb6a..80694174 100644
--- a/resources/assets/styles/body.less
+++ b/resources/assets/styles/body.less
@@ -36,6 +36,12 @@ a {
.site-content{
.box-sizing(border-box);
padding: 10px;
+ overflow-y: auto;
+ overflow-x: hidden;
+
+ > ui-view {
+ margin-bottom: 20px;
+ }
h1, h2 {
margin: 1px 1px 5px;
@@ -105,7 +111,7 @@ a {
left: -1px;
width: 100%;
height: 100%;
- z-index: 400;
+ z-index: 10;
border: 2px solid #fff;
cursor: pointer;
@@ -178,6 +184,7 @@ a {
input[type=text] {
margin: 0px;
padding: 5px;
+ width: 100%;
}
}
diff --git a/resources/assets/styles/components/components.less b/resources/assets/styles/components/components.less
index a2b943dd..e9ec4c1a 100644
--- a/resources/assets/styles/components/components.less
+++ b/resources/assets/styles/components/components.less
@@ -22,6 +22,7 @@
.stretch-to-bottom {
overflow-y: auto;
+ overflow-x: hidden;
}
.dropdowns {
diff --git a/resources/assets/styles/content.less b/resources/assets/styles/content.less
index 9cd7d7f7..68c4c67a 100644
--- a/resources/assets/styles/content.less
+++ b/resources/assets/styles/content.less
@@ -150,10 +150,52 @@
}
.resource-details {
- &.track-details {
+ .info {
+ margin-left: 15px;
+ }
+
+ &.track-details, &.album-details, &.playlist-details {
> header {
- h2, h1 {
- margin-left: 47px;
+ margin: -10px -10px 20px;
+ padding: 20px;
+ background: transparent;
+ box-shadow: inset 0 -5px 10px -5px rgba(0,0,0,0.3);
+ position: relative;
+
+ .blurred-background {
+ width: 100%;
+ height: 250px;
+ -webkit-filter: blur(30px) brightness(0.8);
+ filter: blur(15px) brightness(0.75);
+ z-index: -1;
+ top: 0;
+ left: 0;
+ overflow: hidden;
+ background-color: #a2a2a2;
+ background-position: left center;
+ background-size: 50%;
+ position: absolute;
+ }
+
+ h1, h2, .buttons md-icon, a {
+ color: #fff;
+ text-shadow: 0 1px 5px black;
+ }
+
+ img {
+ width: 200px;
+ height: 200px;
+ background: #fff;
+ .material-shadow(2);
+ }
+
+ h1 {
+ font-size: 28px;
+ }
+
+ h2 {
+ margin-top: 2px;
+ font-size: 16px;
}
}
}
@@ -227,7 +269,6 @@
> header {
padding: 5px;
- background: #eee;
overflow: hidden;
margin-bottom: 10px;
@@ -349,12 +390,23 @@ html .single-player .play-button {
display: block;
}
-.single-player, .tracks-listing li .image {
- float: left;
- width: @icon-size;
- height: @icon-size;
+.single-player {
position: relative;
+ button {
+ position: absolute;
+ top: 270px;
+ right: 0;
+ }
+}
+.tracks-listing li .image {
+ float: left;
+ position: relative;
+ width: 43px;
+ height: 43px;
+}
+
+.single-player, .tracks-listing li .image {
.button-container {
display: table;
width: 100%;
diff --git a/resources/assets/styles/layout.less b/resources/assets/styles/layout.less
index f9984e47..ece06d74 100644
--- a/resources/assets/styles/layout.less
+++ b/resources/assets/styles/layout.less
@@ -20,12 +20,13 @@
@import 'mixins';
@import 'variables';
-html body {
+html, body {
height: 100%;
- background: #fff;
+ background: transparent;
font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
padding: 0px !important;
overflow: hidden;
+ overflow-y: hidden !important;
position: initial !important;
}
@@ -117,7 +118,7 @@ header {
padding-left: 6px;
width: 100%;
max-width: 94%;
- padding-top: 13px;
+ padding-top: 16px;
}
}
@@ -247,7 +248,7 @@ header {
.site-content {
overflow: hidden;
margin-left: @pfm-sidebar-size;
- background: #fff;
+ background: transparent;
height: 100%;
z-index: 100;
}
@@ -376,8 +377,6 @@ md-backdrop {
}
.buttons {
- margin-bottom: 10px;
-
.md-menu {
padding: 0;
}
diff --git a/resources/assets/styles/mobile.less b/resources/assets/styles/mobile.less
index f89758b9..027e0e57 100644
--- a/resources/assets/styles/mobile.less
+++ b/resources/assets/styles/mobile.less
@@ -13,7 +13,6 @@
.site-content {
margin-left: 0px;
- overflow: scroll;
padding: 5px;
}
@@ -437,6 +436,27 @@
.modal-dialog {
width: 95%;
}
+
+ .resource-details {
+ &.track-details, &.album-details, &.playlist-details {
+ > header {
+ img {
+ margin-left: auto;
+ margin-right: auto;
+ }
+ }
+ }
+
+ .info {
+ margin-left: 0;
+ margin-top: 15px;
+ text-align: center;
+ }
+
+ .buttons {
+ margin-top: 15px;
+ }
+ }
}
// Super small phones like the iPhone 5