Commit aef32b04 by Scott

SnowFlat: switch block ranking layout to inline-block

parent 2c8a2d07
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
.qa-a-list-item:after, .qa-a-item-buttons:after, .qa-a-list-item:after, .qa-a-item-buttons:after,
.qa-c-item-buttons:after, .qa-c-item-clear:after, .qa-c-item-buttons:after, .qa-c-item-clear:after,
.qam-footer-row:after, .qam-qa-list-meta-box: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 { .qa-part-ranking:after, .qa-ranking-item:after {
content: " "; content: " ";
display: table; display: table;
clear: both; clear: both;
...@@ -1522,16 +1522,31 @@ blockquote p { ...@@ -1522,16 +1522,31 @@ blockquote p {
} }
} }
.qa-ranking-item { .qa-ranking-item {
margin: 5px 0; display: inline-block;
position: relative; position: relative;
margin: 5px;
padding: 5px; padding: 5px;
} }
.qa-top-users-item {
width: 100%;
max-width: 320px;
}
.qa-top-tags-item {
width: 100%;
max-width: 150px;
}
@media only screen and (min-width: 992px) { /*Two column layout for Desktops and above*/ @media only screen and (min-width: 992px) { /*Two column layout for Desktops and above*/
.qa-ranking-item { .qa-top-users-item {
width: 50%; width: 48%;
float: left; max-width: none;
} }
.qa-top-tags-item {
width: 23%;
max-width: none;
}
} }
.qa-top-users-avatar .qa-avatar-link { .qa-top-users-avatar .qa-avatar-link {
display: block; display: block;
float: left; float: left;
......
...@@ -46,7 +46,7 @@ class qa_html_theme extends qa_html_theme_base ...@@ -46,7 +46,7 @@ class qa_html_theme extends qa_html_theme_base
// Size of the user avatar in the navigation bar // Size of the user avatar in the navigation bar
private $nav_bar_avatar_size = 32; private $nav_bar_avatar_size = 32;
//to use new block layout in rankings // use new block layout in rankings
protected $ranking_block_layout = true; protected $ranking_block_layout = true;
/** /**
...@@ -654,23 +654,4 @@ class qa_html_theme extends qa_html_theme_base ...@@ -654,23 +654,4 @@ class qa_html_theme extends qa_html_theme_base
'</div>' . '</div>' .
'</div>'; '</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