mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 22:14:25 +01:00
Add Tags as a CSS class on challenge boxes (#295)
* Add Tags to challenge boxes on the chalboard
This commit is contained in:
@@ -230,6 +230,11 @@ function loadchals(refresh) {
|
||||
var chalbutton = $("<button class='challenge-button trigger theme-background hide-text' value='{0}'></div>".format(chalinfo.id));
|
||||
var chalheader = $("<h5>{0}</h5>".format(chalinfo.name));
|
||||
var chalscore = $("<span>{0}</span>".format(chalinfo.value));
|
||||
for (var j = 0; j < chalinfo.tags.length; j++) {
|
||||
var tag = 'tag-' + chalinfo.tags[j].replace(/ /g, '-');
|
||||
chalwrap.addClass(tag);
|
||||
}
|
||||
|
||||
chalbutton.append(chalheader);
|
||||
chalbutton.append(chalscore);
|
||||
chalwrap.append(chalbutton);
|
||||
|
||||
Reference in New Issue
Block a user