diff --git a/modules/imgur/config.json b/modules/imgur/config.json index 0cf674b..cc20a5d 100644 --- a/modules/imgur/config.json +++ b/modules/imgur/config.json @@ -3,5 +3,6 @@ "dependencies": [ "web", "api" ], "imagelength": 5, "nsfwwarn": true, - "apikey": "86fd3a8da348b65" + "apikey": "86fd3a8da348b65", + "highscore": "ricount" } diff --git a/modules/imgur/pages.js b/modules/imgur/pages.js index 42b7d0d..314dfee 100644 --- a/modules/imgur/pages.js +++ b/modules/imgur/pages.js @@ -3,7 +3,14 @@ var _ = require('underscore')._; var pages = function(dbot) { return { '/imgur/random': function(req, res) { - res.render('imgurr', { }); + var quoteCat = dbot.db.quoteArrs[dbot.config.imgur.highscore], + highScore = 0; + + if(quoteCat) { + highScore = _.last(quoteCat); + } + + res.render('imgurr', { "highscore" : highScore }); }, '/imgur/stats': function(req, res) { diff --git a/public/imgurr.css b/public/imgurr.css index a5ceae0..f2bbb11 100644 --- a/public/imgurr.css +++ b/public/imgurr.css @@ -38,7 +38,7 @@ width:168px; } -#history li,#loading { +#history li,#loading,#count { display:block; font-family:monospace; font-size:10px; @@ -65,18 +65,26 @@ opacity:0.2; } -#history,#loading,#details { +#history,#loading,#details,#count { position:absolute; } -#loading { +#loading, #count { font-weight:500; +} +#loading { + top:95px; left:220px; min-width:95px; - top:95px; } -#loading,#details,#history li { +#count { + bottom:25px; + left:25px; + display:none; +} + +#loading,#details,#history li,#count { background:rgba(43,43,43,0.8); border-radius:5px; color:#85bf25; diff --git a/views/imgur/imgurr.jade b/views/imgur/imgurr.jade index a5f4f4d..b3e4436 100644 --- a/views/imgur/imgurr.jade +++ b/views/imgur/imgurr.jade @@ -11,6 +11,9 @@ html(lang='en') $('