forked from GitHub/dbot
Basic Profiles [#184]
This commit is contained in:
parent
098f19078d
commit
f3771240a3
@ -17,7 +17,13 @@ var commands = function(dbot){
|
||||
|
||||
"~test_setprop": function(event){
|
||||
if(event.params[1] && event.params[2]){
|
||||
if(_.has(this.config.schema.profile, event.params[1])){
|
||||
dbot.db.profiles[event.server][event.user.toLowerCase()].profile[event.params[1]] = event.params[2];
|
||||
event.reply("Property set, maybe?");
|
||||
}
|
||||
else{
|
||||
event.reply("Invalid property. Go home.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,8 @@
|
||||
"primary": null,
|
||||
"name": null,
|
||||
"tagline": null,
|
||||
"avatar": null,
|
||||
"bio": null,
|
||||
"favourites": {
|
||||
"colour": null
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ p {
|
||||
}
|
||||
|
||||
div#page {
|
||||
width: 90%;
|
||||
margin: 0 auto 0 auto;
|
||||
}
|
||||
|
||||
@ -56,8 +55,7 @@ div#title a {
|
||||
|
||||
div#main {
|
||||
position: relative;
|
||||
padding: 15px 5px;
|
||||
margin: 0px;
|
||||
padding: 10px 5px;
|
||||
font-size: 21px;
|
||||
text-align:center;
|
||||
background: #FFF;
|
||||
@ -183,3 +181,15 @@ li.option-votes {
|
||||
|
||||
.sorting_asc_disabled { background: url('http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/images/sort_asc_disabled.png') no-repeat center right; }
|
||||
.sorting_desc_disabled { background: url('http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/images/sort_desc_disabled.png') no-repeat center right; }
|
||||
|
||||
/**
|
||||
* Bootstrap Overrides
|
||||
*/
|
||||
.profile_page-header{
|
||||
margin: 5px 0 10px 0;
|
||||
}
|
||||
|
||||
.profile_row{
|
||||
text-align: left;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ html(lang='en')
|
||||
div#page
|
||||
div#title
|
||||
a(href='/') #{name} web interface
|
||||
div#main
|
||||
div.container#main
|
||||
block content
|
||||
script(type="text/javascript", src="/bootstrap/js/bootstrap.min.js")
|
||||
script(type="text/javascript", src="/d3/d3.v3.min.js")
|
||||
|
@ -39,11 +39,25 @@ block content
|
||||
});
|
||||
});
|
||||
|
||||
div.page-header
|
||||
div.page-header.profile_page-header
|
||||
h1
|
||||
#{primary}
|
||||
small
|
||||
"#{profile.tagline}"
|
||||
|
||||
div#row
|
||||
div.row.profile_row#profile_data
|
||||
div.span3
|
||||
if profile.avatar
|
||||
img.profile_avatar(src="#{profile.avatar}")
|
||||
else
|
||||
img.profile_avatar(src="http://placehold.it/270x180&text=Hello,%20World")
|
||||
div.span9
|
||||
h4 Bio
|
||||
p #{profile.bio}
|
||||
|
||||
hr
|
||||
h3 Channel Statistics
|
||||
div#profile_datatable
|
||||
table.table.table-hover.data
|
||||
thead
|
||||
tr
|
||||
|
Loading…
Reference in New Issue
Block a user