Add suppport for tracks, basic design, minor refactor

This commit is contained in:
Jonathan Cremin 2014-12-03 23:03:34 +00:00
parent e20b3b86c4
commit acb129899d
13 changed files with 267 additions and 77 deletions

View file

@ -7,23 +7,41 @@
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<style>
.container {
padding-top: 100px;
}
</style>
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<body class="album share">
<header>
<div class="container">
<div class="row">
<div class="col-md-12">
<h1><a href="/">match<span class="audio-lighten">.audio</span></a></h1>
</div>
</div>
</div>
</header>
<div class="container">
<div class="row">
<img src="<%= spotifyAlbum.artwork %>" height=200 class="img-rounded" /> <%= spotifyAlbum.id %> <a href="<%= spotifyAlbum.url %>">Play on Spotify</a>
<div class="col-md-12">
<h2><%= items[0].artist.name %> - <%= items[0].name %></h2>
</div>
</div>
<div class="row">
<img src="<%= googleAlbum.artwork %>" height=200 class="img-rounded" /> <%= googleAlbum.id %> <a href="<%= googleAlbum.url %>">Play on Google Music</a>
<% for (var i=0;i < items.length;i++) { var album = items[i]; %>
<div class="col-md-3 col-xs-6">
<div class="service <%= i==0 ? "source-service" : "" %>">
<div class="matching-from"><%= i==0 ? "Found matches for this album" : "" %></div>
<img src="<%= album.artwork %>" class="img-rounded album-artwork" width="100%">
<div class="service-link">
<a href="<%= album.url %>">Listen on <img src="/images/<%= album.service %>.png" class="img-rounded"></a>
</div>
</div>
</div>
<% } %>
</div>
<div class="row">
<img src="<%= rdioAlbum.artwork %>" height=200 class="img-rounded" /> <%= rdioAlbum.id %> <a href="<%= rdioAlbum.url %>">Play on Rdio</a>
<div class="row share">
</div>
</div>
</body>

View file

@ -7,32 +7,31 @@
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<style>
.container {
padding-top: 100px;
}
.form-inline {
padding-bottom: 100px;
}
</style>
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<body class="home">
<header>
<h1><a href="/">match<span class="audio-lighten">.audio</span></a></h1>
</header>
<div class="container">
<div class="row">
<div class="col-sm-6 col-sm-offset-3">
<div class="row share-form">
<div class="col-md-6 col-md-offset-3">
<%= error %>
<form role="form" method="post" action="/search" class="form-inline">
<div class="form-group form-group-lg">
<input type="text" name="url" placeholder="Paste link here" class="form-control">
<input type="submit" class="btn btn-default btn-lg" value="Share Music">
</div>
<input type="submit" class="btn btn-default btn-lg" value="Share Music">
</form>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-sm-offset-3">
<p>Make sharing music from subscription services better. Give us one link (Rdio, Spotify or Google Music) and we'll match it with other services and give you back a link with all of them. <a href="/google/album/B3qrtsvk5s3piwyla76sk6qyxny">Here's an example</a>.</p>
<div class="col-md-6 col-md-offset-3">
<p>Make sharing music from subscription services better.
We match links from Rdio, Spotify and Google Music and give you back a link with all of them.
<a href="/google/album/B3qrtsvk5s3piwyla76sk6qyxny">Here's an example</a>.</p>
</div>
</div>
</div>

40
views/track.ejs Normal file
View file

@ -0,0 +1,40 @@
<!doctype html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Match Audio</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body class="track share">
<div class="container">
<div class="row">
<div class="col-md-12">
<h2><a href="/">match.audio</a></h2>
<h1><%= items[0].artist.name %> - <%= items[0].name %></h1>
</div>
</div>
<div class="row">
<% for (var i=0;i < items.length;i++) { var track = items[i]; %>
<div class="col-md-3 col-xs-6">
<div class="service <%= i==0 ? "source-service" : "" %>">
<div class="matching-from"><%= i==0 ? "Matching track from this album" : "" %></div>
<img src="<%= track.artwork %>" class="img-rounded album-artwork" width="100%">
<div class="service-link">
<a href="<%= track.url %>">Listen on <img src="/images/<%= track.service %>.png" class="img-rounded"></a>
</div>
</div>
</div>
<% } %>
</div>
<div class="row share">
</div>
</div>
</body>
</html>