Merge branch 'metrics' of github.com:startexploding/webmaker-events into metrics

This commit is contained in:
Hike Danakian 2013-07-22 19:57:54 -07:00
Родитель 24d0a7a644 8d89ba4465
Коммит 9dac06ed54
2 изменённых файлов: 123 добавлений и 19 удалений

Просмотреть файл

@ -9,14 +9,35 @@ body#events.metrics {
.metrics { .metrics {
position: relative; position: relative;
font-size: .85em; font-size: 1em;
text-shadow: 1px 1px 1px #c9c9c9;
em {
font-weight: 600;
font-style: normal;
line-height: 1;
font-size: 1.1em;
&.huge {
font-size: 2em;
}
}
.stat {
margin-bottom: 25px;
display: block;
line-height: .75;
}
.value { .value {
font-weight: bold; font-weight: bold;
font-size: 1.8em; font-size: 2.2em;
display: block; display: block;
line-height: 1; line-height: 1;
margin-top: 10px; }
.value.inline {
display: inline-block;
} }
.squares { .squares {
@ -28,12 +49,24 @@ body#events.metrics {
height: 370px; height: 370px;
margin-bottom: 20px; margin-bottom: 20px;
&.blue { &.red {
background: rgba(39, 170, 225, .9) url(/img/frosted.png); background: rgba(224, 54, 52, .7);
.stat {
&:first-of-type {
padding-top: 5%;
}
}
} }
&.gray { &.gray {
background: rgba(150, 152, 156, .9) url(/img/frosted.png); background: rgba(150, 152, 156, .7);
.stat {
&:first-of-type {
padding-top: 40%;
}
}
} }
} }
} }
@ -41,21 +74,81 @@ body#events.metrics {
.rectangle { .rectangle {
width: 66%; width: 66%;
height: 760px; height: 760px;
background: rgba(224, 54, 52, .8) url(/img/frosted.png); background: rgba(39, 170, 225, .75);
display: inline-block; display: inline-block;
margin-left: 20px; margin-left: 20px;
.value {
vertical-align: middle;
}
.stat {
&:first-of-type {
padding-top: 36%;
}
&:nth-of-type(2) {
margin-bottom: 0px;
}
}
em {
vertical-align: middle;
}
} }
.square, .rectangle { .square, .rectangle {
padding: 30px; padding: 30px;
color: white; color: white;
font-size: 3em; font-size: 2.8em;
} }
.squares, .rectangle { .squares, .rectangle {
@media (max-width: 800px) { @media (max-width: 800px) {
width: 90%; width: 90%;
margin: 5%; margin: 5%;
.stat {
&:first-of-type {
padding-top: 0;
}
}
.value, em {
font-size: 1em;
}
}
}
.squares, .square, .rectangle {
@media (max-width: 1000px) {
margin-bottom: 0;
margin-top: 0;
}
}
.value, em {
@media (max-width: 1300px) {
font-size: .75em;
}
}
.square, .rectangle {
@media (max-width: 1300px) {
font-size: 2.5em;
}
}
.metrics {
@media (max-width: 1000px) {
.square, .rectangle {
padding: 30px;
color: white;
font-size: .5em;
}
.stat {
margin-bottom: 25px;
display: block;
line-height: .75;
}
} }
} }
} }

Просмотреть файл

@ -8,22 +8,33 @@
<div class="dashboard"> <div class="dashboard">
<div class="metrics"> <div class="metrics">
<div class="squares"> <div class="squares">
<div class="square blue"> <div class="square red">
<span class="value">{{ stats.total_events|intcomma }}</span> <span class="stat">
Total Events <br /> <span class="value">{{ stats.total_events|intcomma }}</span>
Submitted by <em>Total Events</em>
<span class="value">{{ stats.users|intcomma }}</span> users </span>
Submitted by
<span class="stat">
<span class="value inline">{{ stats.users|intcomma }}</span> <em>Users</em>
</span>
</div> </div>
<div class="square gray"> <div class="square gray">
<span class="value">{{ stats.upcoming_events|intcomma }}</span> Upcoming Events <span class="stat">
<span class="value">{{ stats.upcoming_events|intcomma }}</span> <em>Upcoming Events</em>
</span>
</div> </div>
</div> </div>
<div class="rectangle"> <div class="rectangle">
<span class="value">{{ stats.total_attendees|intcomma }} </span> <span class="stat">
<span class="value">Attendees </span> <span class="value">{{ stats.total_attendees|intcomma }} </span> <em class="huge">Attendees</em>
in <span class="value">{{ stats.cities|intcomma }}</span> Cities </span>
<span class="stat">
Across <span class="value">{{ stats.countries|intcomma }}</span> Countries in <span class="value inline">{{ stats.cities|intcomma }}</span> <em>Cities</em>
</span>
Across
<span class="stat">
<span class="value inline">{{ stats.countries|intcomma }}</span> <em>Countries</em>
</span>
</div> </div>
</div> </div>