Style the general dashboard icons
This commit is contained in:
parent
d39d10d3f7
commit
e9bf2f8399
4 changed files with 70 additions and 18 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
*= require osem-rating
|
*= require osem-rating
|
||||||
*= require osem-schedule
|
*= require osem-schedule
|
||||||
*= require osem-schedule-print
|
*= require osem-schedule-print
|
||||||
|
*= require osem-dashboard
|
||||||
*= require font-awesome
|
*= require font-awesome
|
||||||
*= require bootstrap-markdown.min
|
*= require bootstrap-markdown.min
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
21
app/assets/stylesheets/breakpoints.css.scss
Normal file
21
app/assets/stylesheets/breakpoints.css.scss
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
@mixin breakpoint($class) {
|
||||||
|
@if $class == xs {
|
||||||
|
@media (max-width: 767px) { @content; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@else if $class == sm {
|
||||||
|
@media (min-width: 750px) { @content; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@else if $class == md {
|
||||||
|
@media (min-width: 970px) { @content; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@else if $class == lg {
|
||||||
|
@media (min-width: 1170px) { @content; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@else {
|
||||||
|
@warn "Breakpoint mixin supports: xs, sm, md, lg";
|
||||||
|
}
|
||||||
|
}
|
||||||
14
app/assets/stylesheets/osem-dashboard.css.scss
Normal file
14
app/assets/stylesheets/osem-dashboard.css.scss
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
@import "breakpoints.css.scss";
|
||||||
|
|
||||||
|
.dashbox span.fa {
|
||||||
|
line-height: 1.1em;
|
||||||
|
@include breakpoint(sm) {
|
||||||
|
font-size: 3em;
|
||||||
|
}
|
||||||
|
@include breakpoint(md) {
|
||||||
|
font-size: 4em;
|
||||||
|
}
|
||||||
|
@include breakpoint(lg) {
|
||||||
|
font-size: 5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,25 +1,41 @@
|
||||||
.row
|
.row
|
||||||
.col-sm-4
|
.col-sm-4.col-xs-4
|
||||||
.dashbox.text-center
|
.dashbox.text-center
|
||||||
.icon
|
%span.fa.fa-user.fa-lg
|
||||||
%i.glyphicon.glyphicon-user
|
%span.fa.fa-lg
|
||||||
.text
|
= @total_user
|
||||||
%label.text-muted total user: #{@total_user}
|
%p
|
||||||
%label.text-muted new user: #{@new_user}
|
%small
|
||||||
.col-sm-4
|
#{'User'.pluralize(@total_user)}
|
||||||
|
- if @new_user
|
||||||
|
%span.label.label-success{title: "+ #{@new_user} since you last logged in!"}
|
||||||
|
+
|
||||||
|
= @new_user
|
||||||
|
.col-sm-4.col-xs-4
|
||||||
.dashbox.text-center
|
.dashbox.text-center
|
||||||
.icon
|
%span.fa.fa-check-square.fa-lg
|
||||||
%i.glyphicon.glyphicon-star
|
%span.fa.fa-lg
|
||||||
.text
|
= @total_reg
|
||||||
%label.text-muted total registrations: #{@total_reg}
|
%p
|
||||||
%label.text-muted new registrations: #{@new_reg}
|
%small
|
||||||
.col-sm-4
|
#{'Registration'.pluralize(@total_reg)}
|
||||||
|
- if @new_reg
|
||||||
|
%span.label.label-success{title: "+#{@new_reg} since you last logged in!"}
|
||||||
|
+
|
||||||
|
= @new_reg
|
||||||
|
.col-sm-4.col-xs-4
|
||||||
.dashbox.text-center
|
.dashbox.text-center
|
||||||
.icon
|
%span.fa.fa-file-text.fa-lg
|
||||||
%i.glyphicon.glyphicon-comment
|
%span.fa.fa-lg
|
||||||
.text
|
= @total_submissions
|
||||||
%label.text-muted total submissions: #{@total_submissions}
|
%p
|
||||||
%label.text-muted new submissions: #{@new_submissions}
|
%small
|
||||||
|
#{'Submission'.pluralize(@total_submissions)}
|
||||||
|
- if @new_submissions
|
||||||
|
%span.label.label-success{title: "+#{@new_submissions} since you last logged in!"}
|
||||||
|
+
|
||||||
|
= @new_submissions
|
||||||
|
|
||||||
.row#registrations
|
.row#registrations
|
||||||
.col-md-8
|
.col-md-8
|
||||||
= render partial: 'line_chart', locals: { title: 'Registrations over time',
|
= render partial: 'line_chart', locals: { title: 'Registrations over time',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue