-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4248 from MCGallaspy/beautify-content-rating
0.15 - beautify content rating
- Loading branch information
Showing
13 changed files
with
271 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
kalite/distributed/static/css/distributed/content-rating.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
.panel-kalite-rating { | ||
border-style: solid; | ||
border-color: grey; | ||
border-width: 1px; | ||
padding: 1em; | ||
|
||
.panel-heading { | ||
border-bottom-style: solid; | ||
border-bottom-color: black; | ||
border-bottom-px: 4px; | ||
|
||
.panel-title { | ||
font-size: 2em; | ||
} | ||
} | ||
|
||
.panel-body { | ||
background: inherit; | ||
} | ||
} | ||
|
||
.star-rating-inner-wrapper { | ||
padding-top: 0.5em; | ||
margin: 0 auto; | ||
|
||
.lowest-label, .highest-label { | ||
padding-top: 1.8em; | ||
} | ||
|
||
.rating-row > div { | ||
padding-left: 0; | ||
padding-right: 0; | ||
} | ||
|
||
.btn-star { | ||
font-size: 3em; | ||
border-style: solid; | ||
border-width: 1px; | ||
border-color: black; | ||
|
||
.glyphicon-star-empty { | ||
top: 5px; | ||
left: 2px; | ||
} | ||
} | ||
|
||
.btn-star { | ||
background: #FFFFFF; | ||
} | ||
.btn-star:active { | ||
background: #FFFF66; | ||
} | ||
.btn-star.activated { | ||
background: #CC6600; | ||
} | ||
.btn-star.activated:active { | ||
background: #663300; | ||
} | ||
.btn-star:hover { | ||
background: #EEEEEE; | ||
} | ||
.btn-star.activated:hover { | ||
background: #BB5500; | ||
} | ||
|
||
.star-title-label { | ||
background: inherit; | ||
color: inherit; | ||
} | ||
|
||
.rating-label { | ||
height: 1em; | ||
font-size: 1em; | ||
} | ||
} | ||
|
||
#text-container { | ||
.rating-text-feedback { | ||
max-width: 60%; | ||
} | ||
|
||
.text-feedback-label { | ||
padding-left: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 22 additions & 15 deletions
37
kalite/distributed/static/js/distributed/rating/hbtemplates/rating.handlebars
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
<div id="rating-container" class="row"> | ||
<div class="col-xs-12"?> | ||
<!--stuff goes here--> | ||
<div id="star-container-quality"> | ||
<!--star.handlebars will be rendered here. Anything specific to star-container 1 should wrap this container. | ||
star.handlebars can be edited to affect all star-rating widgets.--> | ||
<div class="col-xs-12"> | ||
<div class="panel panel-kalite-rating"> | ||
<div class="row panel-heading"> | ||
<div class="col-md-8"> | ||
<h1 class="panel-title">{{_ "What did you think?" }}</h1> | ||
<span>{{_ "Your feedback will help us make better content for future learners!" }}</span> | ||
</div> | ||
<div class="col-md-2 col-md-offset-2"> | ||
<div class="btn btn-danger rating-delete"><span class="glyphicon glyphicon-trash"></span> {{_ "Delete my review" }}</div> | ||
</div> | ||
</div> | ||
<div class="panel-body"> | ||
<div id="star-container-quality"> | ||
<!--star.handlebars will be rendered here.--> | ||
</div> | ||
<div id="star-container-difficulty"> | ||
<!-- star-container-2. Same deal. --> | ||
</div> | ||
<div id="text-container"> | ||
<!--text-container. Uses text.handlebars.--> | ||
</div> | ||
</div> | ||
</div> | ||
<div id="star-container-difficulty"> | ||
<!-- star-container-2. Same deal. --> | ||
</div> | ||
<div id="text-container"> | ||
<!--text-container. Same caveat as star-containers. Uses text.handlebars.--> | ||
</div> | ||
<div class="btn btn-success rating-submit">Submit</div> | ||
<div class="btn btn-success rating-edit">Edit</div> | ||
<div class="btn btn-success rating-skip">Skip</div> | ||
<div class="btn btn-danger rating-delete">Delete</div> | ||
</div> | ||
</div> |
36 changes: 29 additions & 7 deletions
36
kalite/distributed/static/js/distributed/rating/hbtemplates/star.handlebars
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,29 @@ | ||
<div class="star-rating-inner-wrapper"> | ||
<div class="star-rating-option" data-val="1">rate 1</div> | ||
<div class="star-rating-option" data-val="2">rate 2</div> | ||
<div class="star-rating-option" data-val="3">rate 3</div> | ||
<div class="star-rating-option" data-val="4">rate 4</div> | ||
<div class="star-rating-option" data-val="5">rate 5</div> | ||
</div> | ||
<center class="star-rating-inner-wrapper"> | ||
<h2><span class="star-title-label label label-default">{{ title }}</span></h2> | ||
|
||
<div class="row rating-row"> | ||
<div class="col-md-1 col-md-offset-3 lowest-label">{{ lowest_value }}</div> | ||
|
||
<div class="col-md-4"> | ||
<div class="star-rating-option btn btn-star" data-val="1"> | ||
<span class="glyphicon glyphicon-star-empty"></span> | ||
</div> | ||
<div class="star-rating-option btn btn-star" data-val="2"> | ||
<span class="glyphicon glyphicon-star-empty"></span> | ||
</div> | ||
<div class="star-rating-option btn btn-star" data-val="3"> | ||
<span class="glyphicon glyphicon-star-empty"></span> | ||
</div> | ||
<div class="star-rating-option btn btn-star" data-val="4"> | ||
<span class="glyphicon glyphicon-star-empty"></span> | ||
</div> | ||
<div class="star-rating-option btn btn-star" data-val="5"> | ||
<span class="glyphicon glyphicon-star-empty"></span> | ||
</div> | ||
</div> | ||
|
||
<div class="col-md-1 highest-label">{{ highest_value }}</div> | ||
</div> | ||
|
||
<div class="rating-label center-block"></div> | ||
</center> |
9 changes: 8 additions & 1 deletion
9
kalite/distributed/static/js/distributed/rating/hbtemplates/text.handlebars
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
<textarea class="form-control rating-text-feedback">{{ text }}</textarea> | ||
<div class="container"> | ||
<div class="row"> | ||
<label class="text-feedback-label col-md-2 col-md-offset-2 col-xs-12"><h3>{{_ "Your comments:" }}</h3></label> | ||
</div> | ||
<div class="row"> | ||
<textarea class="form-control rating-text-feedback col-xs-8 col-xs-offset-2">{{ text }}</textarea> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.