forked from GitHub/dbot
commit
2e620fea6f
@ -21,6 +21,17 @@ var pages = function(dbot) {
|
|||||||
'profile': profile,
|
'profile': profile,
|
||||||
'stats': stats.channels,
|
'stats': stats.channels,
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
'/profile/:connection': function(req, res) {
|
||||||
|
var connection = req.params.connection;
|
||||||
|
var profiles = dbot.db.profiles[connection];
|
||||||
|
|
||||||
|
res.render('profile_grid', {
|
||||||
|
'name': dbot.config.name,
|
||||||
|
'connection': connection,
|
||||||
|
'profiles': profiles,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -193,3 +193,34 @@ li.option-votes {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* spaceinvader's thumbnails
|
||||||
|
*/
|
||||||
|
span.nicks {
|
||||||
|
display: none;
|
||||||
|
color: #fff;
|
||||||
|
text-decoration: none;
|
||||||
|
position: absolute;
|
||||||
|
left: 0px;
|
||||||
|
top: 10px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
div.imgwrap {
|
||||||
|
background-color: #000;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
div.imgwrap > img {
|
||||||
|
-webkit-transition: all 0.2s ease-in-out;
|
||||||
|
-moz-transition: all 0.2s ease-in-out;
|
||||||
|
-o-transition: all 0.2s ease-in-out;
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thumbnail:hover > div.imgwrap > img {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thumbnail:hover > div.imgwrap > span.nicks {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
@ -92,3 +92,6 @@ block content
|
|||||||
#{chan.fields.wpl.data}
|
#{chan.fields.wpl.data}
|
||||||
td
|
td
|
||||||
#{chan.fields.in_mentions.data}
|
#{chan.fields.in_mentions.data}
|
||||||
|
ul.pager
|
||||||
|
li.previous
|
||||||
|
a(href='/profile/'+connection) ← Back to #{connection}.
|
||||||
|
14
views/profile/profile_grid.jade
Normal file
14
views/profile/profile_grid.jade
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
extends ../layout
|
||||||
|
|
||||||
|
block content
|
||||||
|
div.page-header.profile_page-header
|
||||||
|
h1
|
||||||
|
#{connection}
|
||||||
|
ul.thumbnails
|
||||||
|
each profile, key in profiles
|
||||||
|
if profile.hasOwnProperty('profile') && profile.profile.avatar
|
||||||
|
li.span2
|
||||||
|
a.thumbnail(href='/profile/'+connection+'/'+encodeURIComponent(key))
|
||||||
|
div.imgwrap
|
||||||
|
img(src="#{profile.profile.avatar}", alt="#{key}'s photo")
|
||||||
|
span.nicks #{profile.profile.primary}
|
@ -7,3 +7,4 @@ block content
|
|||||||
#modulelinks
|
#modulelinks
|
||||||
-each connection in connections
|
-each connection in connections
|
||||||
a.module(href='/channels/'+connection) #{connection}
|
a.module(href='/channels/'+connection) #{connection}
|
||||||
|
a.module(href='/profile/'+connection) #{connection} headshots
|
||||||
|
Loading…
Reference in New Issue
Block a user