Add number-with-info HTML class to stats
So it can be reused in advanced statistics.
This commit is contained in:
@@ -20,16 +20,30 @@
|
|||||||
margin-top: $line-height;
|
margin-top: $line-height;
|
||||||
}
|
}
|
||||||
|
|
||||||
.participants {
|
.number-with-info {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: $line-height * 2;
|
margin-right: $line-height * 2;
|
||||||
padding-left: $line-height * 2.5;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&::before {
|
&.participants {
|
||||||
|
padding-left: $line-height * 2.5;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.total-participants::before {
|
||||||
content: image-url('stats_man.png');
|
content: image-url('stats_man.png');
|
||||||
left: 0;
|
}
|
||||||
position: absolute;
|
|
||||||
|
&.male::before {
|
||||||
|
content: image-url('stats_man.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
&.female::before {
|
||||||
|
content: image-url('stats_woman.png');
|
||||||
}
|
}
|
||||||
|
|
||||||
.number {
|
.number {
|
||||||
@@ -45,17 +59,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.gender {
|
|
||||||
|
|
||||||
&.male::before {
|
|
||||||
content: image-url('stats_man.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
&.female::before {
|
|
||||||
content: image-url('stats_woman.png');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.progress {
|
.progress {
|
||||||
background: #ebf0f4;
|
background: #ebf0f4;
|
||||||
border-radius: rem-calc(20);
|
border-radius: rem-calc(20);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div id="total_participants" class="stats-group">
|
<div id="total_participants" class="stats-group">
|
||||||
<h4><%= t("stats.total_participants") %></h4>
|
<h4><%= t("stats.total_participants") %></h4>
|
||||||
|
|
||||||
<p class="participants">
|
<p class="number-with-info participants total-participants">
|
||||||
<span class="number"><%= stats[:total_participants] %></span>
|
<span class="number"><%= stats[:total_participants] %></span>
|
||||||
<span class="info"><%= t("polls.show.stats.total_votes") %></span>
|
<span class="info"><%= t("polls.show.stats.total_votes") %></span>
|
||||||
</p>
|
</p>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<div id="participants_by_gender" class="stats-group">
|
<div id="participants_by_gender" class="stats-group">
|
||||||
<h4><%= t("stats.by_gender") %></h4>
|
<h4><%= t("stats.by_gender") %></h4>
|
||||||
|
|
||||||
<p class="gender male participants">
|
<p class="number-with-info participants male">
|
||||||
<span class="number"><%= stats[:total_male_participants] %></span>
|
<span class="number"><%= stats[:total_male_participants] %></span>
|
||||||
<span class="info">
|
<span class="info">
|
||||||
<%= I18n.t("stats.men_percentage",
|
<%= I18n.t("stats.men_percentage",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="gender female participants">
|
<p class="number-with-info participants female">
|
||||||
<span class="number"><%= stats[:total_female_participants] %></span>
|
<span class="number"><%= stats[:total_female_participants] %></span>
|
||||||
<span class="info">
|
<span class="info">
|
||||||
<%= I18n.t("stats.women_percentage",
|
<%= I18n.t("stats.women_percentage",
|
||||||
|
|||||||
Reference in New Issue
Block a user