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
2c8a2d07
Commit
2c8a2d07
authored
Nov 03, 2015
by
Amiya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Block layout for users and tags page
Fixes #310
parent
32ca391c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
5 deletions
+37
-5
qa-styles.css
qa-theme/SnowFlat/qa-styles.css
+16
-5
qa-theme.php
qa-theme/SnowFlat/qa-theme.php
+21
-0
No files found.
qa-theme/SnowFlat/qa-styles.css
View file @
2c8a2d07
...
...
@@ -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
;
...
...
qa-theme/SnowFlat/qa-theme.php
View file @
2c8a2d07
...
...
@@ -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
);
}
}
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