Skip to content

post-hackathon mopping up #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
api/gin-bin
api/api
api/.env
api/api
api/gin-bin
remote/.env
remote/remote
59 changes: 33 additions & 26 deletions api/public/css/main.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* overrides */
img {
display: inline;
max-width: inherit;
display: inline;
max-width: inherit;
}

/* main */
Expand All @@ -11,30 +11,36 @@ th.artist_column {
}

.artist_name, .track_name {
font-size: 200%;
font-size: 160%;
}

.login-notice {
margin-top: 1.0em;
}

.login-notice button:hover, .login-notice button a:hover {
color: #fff;
}

.now-playing .container {
position: relative;
height: 128px;
margin-top: 10px;
height: 128px;
margin: 20px 0;
position: relative;
}


.now-playing img.logo {
position: absolute;
width: 300px;

top: 0;
left:0;
height: 128px;
left: 0;
position: absolute;
top: 0;
}

.now-playing .rightside {
width: 600px;
position: absolute;
top: 0;
left: 360px;
left: 360px;
position: absolute;
top: 0;
width: 600px;

}
.now-playing .container h2 {
Expand All @@ -53,10 +59,10 @@ th.artist_column {
}

.container .meta-name {
position: absolute;
top: 0;
width: 360px;
left: 140px;
left: 140px;
position: absolute;
top: 0;
width: 360px;
}

h2 {
Expand Down Expand Up @@ -93,8 +99,8 @@ span.glyphicon-step-forward, span.glyphicon-step-backward {
}

.cover {
width: 64px;
height: 64px;
width: 64px;
height: 64px;
background-size: cover;
}

Expand All @@ -120,20 +126,21 @@ span.glyphicon-step-forward, span.glyphicon-step-backward {
cursor: pointer;
}
.queue tbody .artwork img {
height: 32px;
width: 32px;
height: 32px;
width: 32px;
}
.queue tbody td.artwork {
padding-top: 4px;
}

.avatar {
height: 32px;
width: 32px;
height: 32px;
width: 32px;
border: 2px solid #888;
border-radius: 32px;
border: 2px solid #888;
}

.volume , .playback-controls {
display: none;
}

Binary file added api/public/images/140-proof-logo-anim.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added api/public/images/groupify.go-logo-wide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified api/public/images/groupify.go-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 14 additions & 3 deletions api/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@

<head>
<meta charset="utf-8">
<title>Groupify: The social jukebox for your team, powered by Go!</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Groupify</title>
<meta content='The social jukebox for your team, powered by Go!' name='description'>
<meta content='ali, jm3, hatalla, mhfs' name='author'>
<link rel="stylesheet" href="/css/vendor/bootstrap.min.css">
<link rel="stylesheet" href="/css/vendor/spotify.min.css">
<link rel="stylesheet" href="/css/main.css">
Expand Down Expand Up @@ -62,7 +64,7 @@ <h2>Coming next:</h2>
<table class="table table-hover">
<thead>
<th>#</th>
<th>Time to Play</th>
<th>Countdown</th>
<th><!-- album art --></th>
<th>Track</th>
<th class="artist_column">Artist</th>
Expand Down Expand Up @@ -90,7 +92,16 @@ <h2>Coming next:</h2>
</div>
</div>

<div class="search-box row">
<div class="login-notice row" ng-hide="loggedIn">
<button type="button" class="btn btn-default btn-lg col-md-8 col-md-offset-2">
<span class="glyphicon glyphicon-headphones"></span>
<a href="/api/v1/auth">
hey beautiful! to queue up some songs, log&nbsp;in&nbsp;via&nbsp;GitHub
</a>
</button>

</div>
<div class="search-box row" ng-show="loggedIn">
<div class="col-md-10 col-md-offset-1">
<h2>Queue a new song:</h2>
<p>Type a song name and click "Search".</p>
Expand Down
7 changes: 4 additions & 3 deletions api/public/javascript/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ Groupify.controller('MainCtrl', function($scope, $http, $timeout) {
$scope.queue = [];
$scope.query = "";
$scope.trackResults = [];
backup_avatar = "http://www.140proof.com/images/logos/140-proof-logo-shadow-500px.png";
$scope.loggedIn = false;
if( document.cookie.indexOf("groupify=") >= 0 )
$scope.loggedIn = true;
backup_avatar = "/images/140-proof-logo-anim.gif";

(function tick() {
$http.get('/api/v1/queue/list')
Expand All @@ -18,7 +21,6 @@ Groupify.controller('MainCtrl', function($scope, $http, $timeout) {
if (track && res.data.now_playing.time_remaining) {
if( ! track.queued_by_avatar )
track.queued_by_avatar = backup_avatar;
console.log( "currently playing queued by avatar: " + track.queued_by_avatar );
sum = track.time_remaining = parseInt(res.data.now_playing.time_remaining);
$scope.current_track = track;
}
Expand All @@ -30,7 +32,6 @@ Groupify.controller('MainCtrl', function($scope, $http, $timeout) {
if( ! track.queued_by_avatar )
track.queued_by_avatar = backup_avatar;
sum += parseInt(track.time);
console.log( track );
}

$timeout(tick, 1000);
Expand Down
Binary file modified api/spotify-remote.db
Binary file not shown.
27 changes: 27 additions & 0 deletions remote/com.140proof.groupify.remote.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- docs: https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html -->

<!-- I like to live in ~/Library/LaunchAgents/ -->
<key>Label</key>
<string>com.140proof.groupify.remote</string>

<key>KeepAlive</key>
<true/>

<key>NetworkState</key>
<true/>

<key>RunAtLoad</key>
<true/>

<key>ProgramArguments</key>
<array>
<!-- FIXME: need actual portable install path -->
<string>/Users/jm3/Checkouts/go/src/groupify.go/remote/remote</string>
</array>

</dict>
</plist>