Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
aef32b04
Commit
aef32b04
authored
Jan 29, 2016
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SnowFlat: switch block ranking layout to inline-block
parent
2c8a2d07
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
27 deletions
+23
-27
qa-styles.css
qa-theme/SnowFlat/qa-styles.css
+22
-7
qa-theme.php
qa-theme/SnowFlat/qa-theme.php
+1
-20
No files found.
qa-theme/SnowFlat/qa-styles.css
View file @
aef32b04
...
...
@@ -31,8 +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-part-ranking
:after
,
.qa-ranking-item
:after
{
.qa-nav-footer-list
:after
,
.qa-footer-clear
:after
,
.qa-part-ranking
:after
,
.qa-ranking-item
:after
{
content
:
" "
;
display
:
table
;
clear
:
both
;
...
...
@@ -1522,16 +1522,31 @@ blockquote p {
}
}
.qa-ranking-item
{
margin
:
5px
0
;
display
:
inline-block
;
position
:
relative
;
margin
:
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*/
.qa-ranking-item
{
width
:
50%
;
float
:
left
;
}
.qa-top-users-item
{
width
:
48%
;
max-width
:
none
;
}
.qa-top-tags-item
{
width
:
23%
;
max-width
:
none
;
}
}
.qa-top-users-avatar
.qa-avatar-link
{
display
:
block
;
float
:
left
;
...
...
qa-theme/SnowFlat/qa-theme.php
View file @
aef32b04
...
...
@@ -46,7 +46,7 @@ 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
// use new block layout in rankings
protected
$ranking_block_layout
=
true
;
/**
...
...
@@ -654,23 +654,4 @@ class qa_html_theme extends qa_html_theme_base
'</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
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment