Permalink
Browse files

Merge branch 'master' of github.com:dvanoni/TheHack

Conflicts:
	backend/server.py
  • Loading branch information...
2 parents 1faa756 + 84f7777 commit bbf86d6c21d7d57fbea13de423b7417d5878fd99 Lynn Nguyen committed Sep 14, 2011
View
@@ -114,5 +114,3 @@ def facebook_login():
s.save()
redirect("/")
-
-
View
@@ -1,5 +1,7 @@
import bottle
+
from bottle import template, static_file, request
+from PIL import Image
from settings import STATIC_PATH
FRONT_END = bottle.Bottle()
@@ -8,9 +10,19 @@
def front_end_index():
login = True
s = bottle.request.environ.get('beaker.session')
- username = s.get('username')
+
+ if s:
+ username = s.get('username')
+ else:
+ username = None
if username:
login = False
- return template('index', login=login, username=username)
+ return template('index', login=login, username=username)
+
+@FRONT_END.route( '/dominant_color' )
+def dominant_color():
+ img = request.GET.get( '')
+ color = img.resize( (1,1), Image.ANTIALIAS).getpixel((0,0))
+
@@ -6,4 +6,58 @@
.scroll {
overflow:scroll;
height:;
+}
+
+.album-art {
+ -webkit-box-reflect:below 1px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(0.8, transparent), to(white));
+}
+
+#album-art-area {
+ position:relative;
+ margin-left:8px;
+}
+
+#next-album {
+ float:left;
+ margin-left:175px;
+ margin-top:32px;
+ opacity:.75;
+}
+
+#current-album {
+ position:absolute;
+}
+
+#artist-info {
+ background:#000;
+ color:#FFF;
+ margin-bottom:32px;
+}
+
+#artist-info > div {
+ padding:16px;
+ text-align:center;
+}
+
+#artist-info > div > .artist {
+ color:#AAA;
+}
+
+#activity {
+ display:none;
+ position:absolute;
+ top:50%;
+ left:50%;
+ margin-top:-58px;
+ margin-left:-58px;
+ z-index:1000;
+ color:#FFF;
+ font-family:Helvetica;
+ padding:16px;
+ background-color:#000;
+ width:100px;
+ height:100px;
+ text-align:center;
+ border-radius:16px;
+ opacity:.9;
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -48,7 +48,7 @@ function sendData() {
$(function(){
// Start acquiring our location
- acquireLocation();
+ //acquireLocation();
// Start grabbing accelerometer data
if (typeof window.DeviceMotionEvent != 'undefined') {
@@ -61,5 +61,5 @@ $(function(){
}, false);
}
- setTimeout( sendData, 2000 );
+ //setTimeout( sendData, 2000 );
});
@@ -3,7 +3,8 @@ body {
}
#jqt > * {
- background: rgb(197,204,211) url(img/pinstripes.png);
+ /* background: rgb(197,204,211); */
+ background: rgb( 242, 242, 242 );
}
#jqt h1, #jqt h2 {
View
@@ -18,14 +18,19 @@
<style type="text/css" media="screen">@import "/static/themes/apple/theme.css";</style>
<style type="text/css" media="screen">@import "/static/extensions/jqt.bars/jqt.bars.css";</style>
<style type="text/css" media="screen">@import "/static/extensions/jqt.bars/themes/apple/theme.css";</style>
-
+
<!-- related stuffs -->
<link rel="stylesheet" type="text/css" href="/static/css/master.css">
</head>
<body>
<div id="tabbar">
<div><ul>
<li>
+ <a href="#history" mask="/static/img/tabs/social.png" mask2x="/static/img/tabs/social.png">
+ <strong>History</strong>
+ </a>
+ </li>
+ <li>
<a href="#home" mask="/static/img/tabs/music.png" mask2x="/static/img/tabs/music.png">
<strong>Music</strong>
</a>
@@ -37,6 +42,10 @@
</li>
</ul></div>
</div>
+ <div id='activity'>
+ <div style='margin:16px 0;'><img src='/static/img/ajax-loader.gif'></div>
+ <div>Loading...</div>
+ </div>
<div id="jqt">
<div id='social'>
<div class="toolbar">
@@ -64,27 +73,22 @@
</div>
</div>
</div>
- <div id="music-player">
- <div class="toolbar">
- <h1>Music Player</h1>
- <a href="#home" class="back">Back</a>
- </div>
- <div class='s-scrollwrapper'>
- <div>
- Music player here
- </div>
- </div>
- </div>
<div id="home" class='current'>
- <div class="toolbar">
- <h1>The Hack</h1>
- </div>
- <div class="s-scrollwrapper">
- <ul id='playlist' class="edgetoedge">
- <li class="arrow"><a href="#music-player">Test</a></li>
- <li class="arrow"><a href="#music-player">Test</a></li>
- <li class="arrow"><a href="#music-player">Test</a></li>
- </ul>
+ <div>
+ <div id='artist-info'>
+ <div>
+ <div class='artist'>Artist Name</div>
+ <div class='track'>Track Title</div>
+ </div>
+ </div>
+ <div id='album-art-area'>
+ <div id='next-album'>
+ <img id='next' src='/static/img/queen.png' width='140' class='album-art'>
+ </div>
+ <div id='current-album'>
+ <img id='current' src='/static/img/album-art.jpg' width='240' class='album-art'>
+ </div>
+ </div>
</div>
</div>
</div>
@@ -93,5 +97,16 @@
<script src="/static/extensions/jqt.bars/jqt.bars.js" type="application/x-javascript" charset="utf-8"></script>
<script src="/static/js/geolocation.js" type='text/javascript' charset="utf-8"></script>
<script src="/static/js/master.js" type='text/javascript' charset="utf-8"></script>
+ <script type="text/javascript" charset="utf-8">
+ $(function() {
+ $( '#next' ).click( function() {
+ $( '#activity' ).fadeIn( 'fast' );
+ new_art = $( '#next' ).attr( 'src' )
+ $( '#current' ).attr( 'src', new_art );
+ $( '#next' ).attr( 'src', '/static/img/album-art.jpg' );
+ $( '#activity' ).fadeOut( 'fast' );
+ });
+ });
+ </script>
</body>
</html>

0 comments on commit bbf86d6

Please sign in to comment.