diff --git a/README.md b/README.md index 649dc15..be8af1c 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,6 @@ This is in super early development and is incapable of handling getting dugg, ne On the immediate todo list: * Use album release year for additional sanity check on matches -* Maybe drop everything from the first special character in album names to improve matches **after** failing to get a good match +* Maybe drop everything from the first left-hand bracket in album names to improve matches **after** failing to get a good match * Handle expected and unexpected errors better than the current crash-fest * Add some kind of persistence or caching so it could take a pummeling and not get me banned from the various services diff --git a/app.js b/app.js index e9353f4..b56d2c7 100644 --- a/app.js +++ b/app.js @@ -45,11 +45,11 @@ app.get('*', function(req,res,next) { app.get('/', function(req, res) { var samples = [ - {artist: "Aesop Rock", album: "None Shall Pass", url: '/google/album/Bpnz47tzvmp3p46ht3syerwyvva'}, + {artist: "Aesop Rock", album: "Skelethon", url: '/google/album/B3ppmqcekrmxln4bre33om3qife'}, {artist: "Hozier", album: "self-titled album", url: '/google/album/Bd3mxcy3otokg4yc45qktq7l35q'}, {artist: "Daft Punk", album: "Discovery", url: '/google/album/B4t6yqqvhnb2hy4st4uisjrcsrm'} ]; - res.render('index', { samples: samples, error: req.flash('search-error') }); + res.render('index', { page: "home", samples: samples, error: req.flash('search-error') }); }); app.post('/search', search); diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 802489c..dda730f 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -1,9 +1,10 @@ body { font-family: "Open Sans"; + color: #445470; } header { - background: #e6832e; + background: #FE4365; } header h1 { @@ -18,25 +19,50 @@ header h1 a { color: #fff; } +a { + color: #C04969; +} + +a:hover { + color: #824F6D; +} + header h1 a:hover, header h1 a:focus{ - color: #f2c4ad; + color: #ffacc5; text-decoration: none; } -.share header h1 { +.home input[type="text"]:focus { + border-color: rgba(255, 68, 109, 0.8); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 5px rgba(255, 68, 109, 0.8); + outline: 0 none; +} + +.album header h1, .track header h1 { text-align: left; font-size: 1.5em; padding: 10px 0; } .audio-lighten { - color:#f2c4ad; + color: #ffacc5; +} + +.artist-lighten { + color: #8396b0; + font-weight: 300; } h2 { - font-size: 1.5em; + font-size: 1.8em; font-weight: 700; - margin: 40px 0; + margin-bottom: 40px; +} + +h3 { + font-size: 1.5em; + color: #8396b0; + font-weight: 300; } .share-form { @@ -46,7 +72,7 @@ h2 { } .btn-custom { - background-color: #e6832e; + background-color: #FE4365; color: #fff; } diff --git a/routes/share.js b/routes/share.js index d6b57e8..136a928 100644 --- a/routes/share.js +++ b/routes/share.js @@ -21,7 +21,7 @@ module.exports = function(req, res) { var promises = []; if (cache[serviceId][type + "-" + itemId]) { - res.render(type, {items: cache[serviceId][type + "-" + itemId]}); + res.render(type, {page: type, items: cache[serviceId][type + "-" + itemId]}); return; } @@ -46,8 +46,8 @@ module.exports = function(req, res) { }); items.unshift(item); - cache[serviceId][item.type + "-" + item.id] = items; - res.render(type, {items: items}); + cache[serviceId][type + "-" + itemId] = items; + res.render(type, {page: type, items: items}); }); }); }; diff --git a/views/album.ejs b/views/album.ejs index 4a567e8..9d276a0 100644 --- a/views/album.ejs +++ b/views/album.ejs @@ -1,17 +1,4 @@ - - - - - - Match Audio - - - - - - - - +<% include header.ejs %>
@@ -24,14 +11,15 @@
-

<%= items[0].artist.name %> - <%= items[0].name %>

+

Matched albums for

+

<%= items[0].name %> - <%= items[0].artist.name %>

<% for (var i=0;i < items.length;i++) { var album = items[i]; %>
"> -
<%= i==0 ? "Found matches for this link" : "" %>
+
<%= i==0 ? "Found matches using this link" : "" %>
<% if (album.streamUrl) { %> - - - +<% include footer.ejs %> diff --git a/views/footer.ejs b/views/footer.ejs new file mode 100644 index 0000000..1972aa0 --- /dev/null +++ b/views/footer.ejs @@ -0,0 +1,11 @@ + + + diff --git a/views/header.ejs b/views/header.ejs new file mode 100644 index 0000000..a0a1dbf --- /dev/null +++ b/views/header.ejs @@ -0,0 +1,14 @@ + + + + + + Match Audio + + + + + + + + diff --git a/views/index.ejs b/views/index.ejs index 772cd10..51b6170 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -1,17 +1,4 @@ - - - - - - Match Audio - - - - - - - - +<% include header.ejs %>

match.audio

@@ -43,14 +30,4 @@
- - - +<% include footer.ejs %> diff --git a/views/track.ejs b/views/track.ejs index 033d122..6ee5fc7 100644 --- a/views/track.ejs +++ b/views/track.ejs @@ -24,14 +24,15 @@
-

<%= items[0].artist.name %> - <%= items[0].name %>

+

Matched tracks for

+

<%= items[0].name %> - <%= items[0].artist.name %>

- <% for (var i=0;i < items.length;i++) { var track = items[i]; %> + <% for (var i=0;i < items.length;i++) { var track = items[i]; %>
"> -
<%= i==0 ? "Found matches for this link" : "" %>
+
<%= i==0 ? "Found matches using this link" : "" %>
<% if (track.streamUrl) { %>