Included styling and template
This commit is contained in:
20
common/lib/xmodule/xmodule/css/foldit/leaderboard.scss
Normal file
20
common/lib/xmodule/xmodule/css/foldit/leaderboard.scss
Normal file
@@ -0,0 +1,20 @@
|
||||
$leaderboard: #F4F4F4;
|
||||
|
||||
section.foldit {
|
||||
div.folditchallenge {
|
||||
table {
|
||||
border: 1px solid lighten($leaderboard, 10%);
|
||||
border-collapse: collapse;
|
||||
margin-top: 20px;
|
||||
}
|
||||
th {
|
||||
background: $leaderboard;
|
||||
color: darken($leaderboard, 25%);
|
||||
}
|
||||
td {
|
||||
background: lighten($leaderboard, 3%);
|
||||
border-bottom: 1px solid #fff;
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ log = logging.getLogger(__name__)
|
||||
|
||||
class FolditModule(XModule):
|
||||
|
||||
css = {'scss': [resource_string(__name__, 'css/foldit/leadeboard.scss')]}
|
||||
css = {'scss': [resource_string(__name__, 'css/foldit/leaderboard.scss')]}
|
||||
|
||||
def __init__(self, system, location, definition, descriptor,
|
||||
instance_state=None, shared_state=None, **kwargs):
|
||||
|
||||
29
lms/templates/folditbasic.html
Normal file
29
lms/templates/folditbasic.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<div class="folditbasic">
|
||||
<p><strong>Due:</strong> ${due}
|
||||
|
||||
<p>
|
||||
<strong>Status:</strong>
|
||||
% if success:
|
||||
You have successfully gotten to level ${goal_level}.
|
||||
% else:
|
||||
You have not yet gotten to level ${goal_level}.
|
||||
% endif
|
||||
</p>
|
||||
|
||||
<h3>Completed puzzles</h3>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Level</th>
|
||||
<th>Submitted</th>
|
||||
</tr>
|
||||
% for puzzle in completed:
|
||||
<tr>
|
||||
<td>${'{0}-{1}'.format(puzzle['set'], puzzle['subset'])}</td>
|
||||
<td>${puzzle['created'].strftime('%Y-%m-%d %H:%M')}</td>
|
||||
</tr>
|
||||
% endfor
|
||||
</table>
|
||||
|
||||
</br>
|
||||
</div>
|
||||
16
lms/templates/folditchallenge.html
Normal file
16
lms/templates/folditchallenge.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<div class="folditchallenge">
|
||||
<h3>Puzzle Leaderboard</h3>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>User</th>
|
||||
<th>Score</th>
|
||||
</tr>
|
||||
% for pair in top_scores:
|
||||
<tr>
|
||||
<td>${pair[0]}</td>
|
||||
<td>${pair[1]}</td>
|
||||
</tr>
|
||||
% endfor
|
||||
</table>
|
||||
</div>
|
||||
Reference in New Issue
Block a user