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
d87621ad
Commit
d87621ad
authored
Aug 06, 2015
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add theme-specific classes to body tag
Closes #193.
parent
a453d36e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
0 deletions
+9
-0
qa-theme-base.php
qa-include/qa-theme-base.php
+3
-0
qa-theme.php
qa-theme/Candy/qa-theme.php
+1
-0
qa-theme.php
qa-theme/Classic/qa-theme.php
+1
-0
qa-theme.php
qa-theme/Snow/qa-theme.php
+1
-0
qa-theme.php
qa-theme/SnowFlat/qa-theme.php
+3
-0
No files found.
qa-include/qa-theme-base.php
View file @
d87621ad
...
...
@@ -51,6 +51,8 @@ class qa_html_theme_base
// whether to use new block layout in rankings (true) or fall back to tables (false)
protected
$ranking_block_layout
=
false
;
// theme 'slug' to use as CSS class
protected
$theme
;
public
function
__construct
(
$template
,
$content
,
$rooturl
,
$request
)
...
...
@@ -406,6 +408,7 @@ class qa_html_theme_base
public
function
body_tags
()
{
$class
=
'qa-template-'
.
qa_html
(
$this
->
template
);
$class
.=
empty
(
$this
->
theme
)
?
''
:
' qa-theme-'
.
qa_html
(
$this
->
theme
);
if
(
isset
(
$this
->
content
[
'categoryids'
]))
{
foreach
(
$this
->
content
[
'categoryids'
]
as
$categoryid
)
...
...
qa-theme/Candy/qa-theme.php
View file @
d87621ad
...
...
@@ -24,6 +24,7 @@ class qa_html_theme extends qa_html_theme_base
{
// use new ranking layout
protected
$ranking_block_layout
=
true
;
protected
$theme
=
'candy'
;
public
function
nav_user_search
()
// reverse the usual order
{
...
...
qa-theme/Classic/qa-theme.php
View file @
d87621ad
...
...
@@ -24,4 +24,5 @@ class qa_html_theme extends qa_html_theme_base
{
// use new ranking layout
protected
$ranking_block_layout
=
true
;
protected
$theme
=
'classic'
;
}
qa-theme/Snow/qa-theme.php
View file @
d87621ad
...
...
@@ -4,6 +4,7 @@ class qa_html_theme extends qa_html_theme_base
{
// use new ranking layout
protected
$ranking_block_layout
=
true
;
protected
$theme
=
'snow'
;
// outputs login form if user not logged in
public
function
nav_user_search
()
...
...
qa-theme/SnowFlat/qa-theme.php
View file @
d87621ad
...
...
@@ -34,6 +34,8 @@
*/
class
qa_html_theme
extends
qa_html_theme_base
{
protected
$theme
=
'snowflat'
;
// theme subdirectories
private
$js_dir
=
'js'
;
private
$icon_url
=
'images/icons'
;
...
...
@@ -114,6 +116,7 @@ class qa_html_theme extends qa_html_theme_base
public
function
body_tags
()
{
$class
=
'qa-template-'
.
qa_html
(
$this
->
template
);
$class
.=
empty
(
$this
->
theme
)
?
''
:
' qa-theme-'
.
qa_html
(
$this
->
theme
);
if
(
isset
(
$this
->
content
[
'categoryids'
]))
{
foreach
(
$this
->
content
[
'categoryids'
]
as
$categoryid
)
...
...
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