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
9b1eb365
Commit
9b1eb365
authored
Jul 29, 2017
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Basic SnowFlat theme support for comment voting
parent
f5b99cb0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
124 additions
and
6 deletions
+124
-6
qa-theme-base.php
qa-include/qa-theme-base.php
+1
-0
vote-buttons-2.png
qa-theme/SnowFlat/images/vote-buttons-2.png
+0
-0
qa-styles.css
qa-theme/SnowFlat/qa-styles.css
+105
-6
qa-theme.php
qa-theme/SnowFlat/qa-theme.php
+18
-0
No files found.
qa-include/qa-theme-base.php
View file @
9b1eb365
...
...
@@ -2399,6 +2399,7 @@ class qa_html_theme_base
$this
->
output
(
'<div class="qa-c-list-item '
.
$extraclass
.
'" '
.
@
$c_item
[
'tags'
]
.
'>'
);
$this
->
voting
(
$c_item
);
$this
->
c_item_main
(
$c_item
);
$this
->
c_item_clear
();
...
...
qa-theme/SnowFlat/images/vote-buttons-2.png
0 → 100644
View file @
9b1eb365
1.76 KB
qa-theme/SnowFlat/qa-styles.css
View file @
9b1eb365
...
...
@@ -1065,7 +1065,7 @@ blockquote p {
.qa-vote-up-button
,
.qa-vote-down-button
,
.qa-voted-up-button
,
.qa-voted-down-button
,
.qa-vote-up-disabled
,
.qa-vote-down-disabled
{
text-indent
:
-9999px
;
background
:
url('images/vote-buttons.png')
;
background
:
url('images/vote-buttons
-2
.png')
;
background-repeat
:
no-repeat
;
width
:
16px
;
height
:
10px
;
...
...
@@ -1080,7 +1080,6 @@ blockquote p {
.qa-vote-up-button
:hover
,
.qa-vote-up-button
:focus
,
.qa-vote-up-button
:active
,
.qa-vote-down-button
:hover
,
.qa-vote-down-button
:focus
,
.qa-vote-down-button
:active
,
.qa-voted-up-button
:hover
,
.qa-voted-up-button
:focus
,
.qa-voted-up-button
:active
,
.qa-voted-down-button
:hover
,
.qa-voted-down-button
:focus
,
.qa-voted-down-button
:active
,
.qa-vote-up-disabled
:hover
,
.qa-vote-up-disabled
:focus
,
.qa-vote-up-disabled
:active
,
.qa-vote-down-disabled
:hover
,
.qa-vote-down-disabled
:focus
,
.qa-vote-down-disabled
:active
{
background
:
url('images/vote-buttons.png')
;
border
:
none
;
cursor
:
pointer
;
}
...
...
@@ -1117,10 +1116,6 @@ blockquote p {
background-position
:
-16px
-40px
;
}
.qa-vote-one-button
{
top
:
25px
;
}
.qa-voted-up-button
{
background-position
:
0
-10px
;
}
...
...
@@ -1135,6 +1130,10 @@ blockquote p {
background-position
:
-16px
0
;
}
.qa-vote-one-button
{
top
:
25px
;
}
.qa-q-item-main
{
float
:
left
;
padding-left
:
10px
;
...
...
@@ -2598,6 +2597,106 @@ input[type="submit"], button {
animation
:
comment-highlight
2s
ease-in-out
;
}
/* voting styles for comments */
.qa-c-list-item
.qa-voting
{
width
:
auto
;
height
:
auto
;
background-color
:
transparent
;
}
.qa-c-list-item
.qa-vote-buttons
{
height
:
22px
;
width
:
12px
;
margin-right
:
4px
;
}
.qa-c-list-item
.qa-vote-count
{
float
:
left
;
min-width
:
16px
;
margin-right
:
8px
;
}
.qa-c-list-item
.qa-netvote-count
{
text-align
:
left
;
}
.qa-c-list-item
.qa-netvote-count-data
{
font-size
:
13px
;
line-height
:
20px
;
}
/*.qa-c-list-item .qa-netvote-count-pad {
display: none;
}*/
.qa-c-list-item
.qa-vote-up-button
,
.qa-c-list-item
.qa-vote-down-button
,
.qa-c-list-item
.qa-voted-up-button
,
.qa-c-list-item
.qa-voted-down-button
,
.qa-c-list-item
.qa-vote-up-disabled
,
.qa-c-list-item
.qa-vote-down-disabled
{
width
:
12px
;
height
:
8px
;
left
:
0
;
transform
:
scale
(
0.75
);
}
.qa-c-list-item
.qa-vote-first-button
{
top
:
0
;
}
.qa-c-list-item
.qa-vote-second-button
{
top
:
12px
;
}
.qa-c-list-item
.qa-vote-up-button
{
background-position
:
-32px
0
;
}
.qa-c-list-item
.qa-vote-up-button
:hover
,
.qa-c-list-item
.qa-vote-up-button
:focus
,
.qa-c-list-item
.qa-vote-up-button
:active
{
background-position
:
-32px
-8px
;
}
.qa-c-list-item
.qa-vote-down-button
{
background-position
:
-44px
0
;
}
.qa-c-list-item
.qa-vote-down-button
:hover
,
.qa-c-list-item
.qa-vote-down-button
:focus
,
.qa-c-list-item
.qa-vote-down-button
:active
{
background-position
:
-44px
-8px
;
}
.qa-c-list-item
.qa-vote-up-disabled
{
background-position
:
-32px
-32px
;
}
.qa-c-list-item
.qa-vote-up-disabled
:hover
,
.qa-c-list-item
.qa-vote-up-disabled
:focus
,
.qa-c-list-item
.qa-vote-up-disabled
:active
{
background-position
:
-32px
-32px
;
}
.qa-c-list-item
.qa-vote-down-disabled
{
background-position
:
-44px
-32px
;
}
.qa-c-list-item
.qa-vote-down-disabled
:hover
,
.qa-c-list-item
.qa-vote-down-disabled
:focus
,
.qa-c-list-item
.qa-vote-down-disabled
:active
{
background-position
:
-44px
-32px
;
}
.qa-c-list-item
.qa-voted-up-button
{
background-position
:
-32px
-8px
;
}
.qa-c-list-item
.qa-voted-up-button
:hover
,
.qa-c-list-item
.qa-voted-up-button
:focus
,
.qa-c-list-item
.qa-voted-up-button
:active
{
background-position
:
-32px
0
;
}
.qa-c-list-item
.qa-voted-down-button
{
background-position
:
-44px
-8px
;
}
.qa-c-list-item
.qa-voted-down-button
:hover
,
.qa-c-list-item
.qa-voted-down-button
:focus
,
.qa-c-list-item
.qa-voted-down-button
:active
{
background-position
:
-44px
0
;
}
.qa-c-list-item
.qa-form-light-button
{
padding
:
10px
15px
;
background
:
#bdc3c7
none
center
no-repeat
;
...
...
qa-theme/SnowFlat/qa-theme.php
View file @
9b1eb365
...
...
@@ -539,6 +539,22 @@ class qa_html_theme extends qa_html_theme_base
}
/**
* Remove voting here
* @param array $c_item
*/
public
function
c_list_item
(
$c_item
)
{
$extraclass
=
@
$c_item
[
'classes'
]
.
(
@
$c_item
[
'hidden'
]
?
' qa-c-item-hidden'
:
''
);
$this
->
output
(
'<div class="qa-c-list-item '
.
$extraclass
.
'" '
.
@
$c_item
[
'tags'
]
.
'>'
);
$this
->
c_item_main
(
$c_item
);
$this
->
c_item_clear
();
$this
->
output
(
'</div> <!-- END qa-c-item -->'
);
}
/**
* Move user whometa to top in comment
*
* @since Snow 1.4
...
...
@@ -551,6 +567,8 @@ class qa_html_theme extends qa_html_theme_base
if
(
isset
(
$c_item
[
'error'
]))
$this
->
error
(
$c_item
[
'error'
]);
$this
->
voting
(
$c_item
);
if
(
isset
(
$c_item
[
'expand_tags'
]))
$this
->
c_item_expand
(
$c_item
);
elseif
(
isset
(
$c_item
[
'url'
]))
...
...
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