Commit 2c8a2d07 by Amiya

Block layout for users and tags page

Fixes #310
parent 32ca391c
......@@ -31,7 +31,8 @@
.qa-a-list-item:after, .qa-a-item-buttons:after,
.qa-c-item-buttons:after, .qa-c-item-clear:after,
.qam-footer-row:after, .qam-qa-list-meta-box:after,
.qa-nav-footer-list:after, .qa-footer-clear:after {
.qa-nav-footer-list:after, .qa-footer-clear:after ,
.qa-part-ranking:after , .qa-ranking-item:after {
content: " ";
display: table;
clear: both;
......@@ -1520,13 +1521,23 @@ blockquote p {
overflow-y: hidden;
}
}
.qa-top-users-label .qa-avatar-link {
.qa-ranking-item {
margin: 5px 0;
position: relative;
padding: 5px;
}
@media only screen and (min-width: 992px) { /*Two column layout for Desktops and above*/
.qa-ranking-item {
width: 50%;
float: left;
}
}
.qa-top-users-avatar .qa-avatar-link {
display: block;
float: left;
margin-right: 1em;
}
.qa-top-users-label .qa-avatar-link img {
.qa-top-users-avatar .qa-avatar-link img {
border: 1px solid #cbd7e3;
}
.qa-top-users-label .qa-user-link {
......@@ -1546,7 +1557,7 @@ blockquote p {
content: "";
position: absolute;
left: -5px;
top: 5px;
top: 30%;
display: block;
width: 0;
height: 0;
......
......@@ -46,6 +46,9 @@ class qa_html_theme extends qa_html_theme_base
// Size of the user avatar in the navigation bar
private $nav_bar_avatar_size = 32;
//to use new block layout in rankings
protected $ranking_block_layout = true;
/**
* Adding aditional meta for responsive design
*
......@@ -652,4 +655,22 @@ class qa_html_theme extends qa_html_theme_base
'</div>';
}
public function ranking($ranking)
{
$this->part_title($ranking);
if (!isset($ranking['type']))
$ranking['type'] = 'items';
$class = 'qa-top-'.$ranking['type'];
// new block layout
foreach ($ranking['items'] as $item) {
$this->output('<div class="qa-ranking-item '.$class.'-item">');
$this->ranking_item($item, $class);
$this->output('</div>');
}
$this->part_footer($ranking);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment