Commit d8036d29 by Scott

Move favorite star and RSS icon out of h1 tag

parent d0ea4a77
...@@ -718,10 +718,12 @@ class qa_html_theme_base ...@@ -718,10 +718,12 @@ class qa_html_theme_base
if (isset($favorite)) if (isset($favorite))
$this->output('<form ' . $favorite['form_tags'] . '>'); $this->output('<form ' . $favorite['form_tags'] . '>');
$this->output('<h1>'); $this->output('<div class="qa-main-heading">');
$this->favorite(); $this->favorite();
$this->output('<h1>');
$this->title(); $this->title();
$this->output('</h1>'); $this->output('</h1>');
$this->output('</div>');
if (isset($favorite)) { if (isset($favorite)) {
$formhidden = isset($favorite['form_hidden']) ? $favorite['form_hidden'] : null; $formhidden = isset($favorite['form_hidden']) ? $favorite['form_hidden'] : null;
......
...@@ -164,17 +164,21 @@ table { ...@@ -164,17 +164,21 @@ table {
/* Headings */ /* Headings */
.qa-main-heading {
position: relative;
margin: 5px 0 25px;
padding: 0 25px 5px 0;
border-bottom: 1px solid #ddd;
}
h1 { h1 {
margin: 0;
color: #444; color: #444;
font-size: 20px; font-size: 20px;
font-weight: 700; font-weight: 700;
margin: 5px 0 25px;
font-family: Arial,Helvetica,sans-serif; font-family: Arial,Helvetica,sans-serif;
font-weight: 700; font-weight: 700;
line-height: 1.1em; line-height: 1.1em;
border-bottom: 1px solid #ddd;
position: relative;
padding: 0 25px 5px 0;
} }
h2 { h2 {
......
...@@ -113,14 +113,15 @@ class qa_html_theme extends qa_html_theme_base ...@@ -113,14 +113,15 @@ class qa_html_theme extends qa_html_theme_base
} }
// add RSS feed icon after the page title // add RSS feed icon after the page title
public function title() public function favorite()
{ {
qa_html_theme_base::title(); parent::favorite();
$feed=@$this->content['feed']; $feed = @$this->content['feed'];
if (!empty($feed)) if (!empty($feed)) {
$this->output('<a href="'.$feed['url'].'" title="'.@$feed['label'].'"><img src="'.$this->rooturl.'images/rss.jpg" alt="" width="16" height="16" border="0" class="qa-rss-icon"/></a>'); $this->output('<a href="'.$feed['url'].'" title="'.@$feed['label'].'"><img src="'.$this->rooturl.'images/rss.jpg" alt="" width="16" height="16" border="0" class="qa-rss-icon"/></a>');
}
} }
// add view count to question list // add view count to question list
......
...@@ -107,20 +107,22 @@ a:hover { ...@@ -107,20 +107,22 @@ a:hover {
text-decoration: underline; text-decoration: underline;
} }
h1 { .qa-main-heading {
position: relative; position: relative;
margin: 0 0 5px; margin: 0 0 5px;
padding: 8px 52px 8px 20px; padding: 8px 52px 8px 20px;
background: #3498db; background: #3498db;
color: #fff; color: #fff;
}
h1 {
margin: 0;
font-size: 1.4em; font-size: 1.4em;
line-height: 1.35em; line-height: 1.35em;
} }
h1 a { h1 a {
color: #fff; color: #fff;
border-bottom: 1px dotted #fff;
line-height: inherit; line-height: inherit;
border: none; border: 0;
text-decoration: none; text-decoration: none;
opacity: 0.85; opacity: 0.85;
} }
...@@ -905,6 +907,7 @@ blockquote p { ...@@ -905,6 +907,7 @@ blockquote p {
.qam-title-rss { .qam-title-rss {
float: right; float: right;
color: #ecf0f1; color: #ecf0f1;
font-size: 1.4em;
} }
.qam-title-rss:hover { .qam-title-rss:hover {
color: #fff; color: #fff;
......
...@@ -346,13 +346,11 @@ class qa_html_theme extends qa_html_theme_base ...@@ -346,13 +346,11 @@ class qa_html_theme extends qa_html_theme_base
} }
/** /**
* Add RSS feeds icon and closed icon for closed questions * Add RSS feeds icon
*
* @since Snow 1.4
*/ */
public function title() public function favorite()
{ {
$q_view = isset($this->content['q_view']) ? $this->content['q_view'] : null; parent::favorite();
// RSS feed link in title // RSS feed link in title
if (isset($this->content['feed']['url'])) { if (isset($this->content['feed']['url'])) {
...@@ -360,6 +358,16 @@ class qa_html_theme extends qa_html_theme_base ...@@ -360,6 +358,16 @@ class qa_html_theme extends qa_html_theme_base
$label = isset($feed['label']) ? $feed['label'] : ''; $label = isset($feed['label']) ? $feed['label'] : '';
$this->output('<a href="' . $feed['url'] . '" title="' . $label . '"><i class="icon-rss qam-title-rss"></i></a>'); $this->output('<a href="' . $feed['url'] . '" title="' . $label . '"><i class="icon-rss qam-title-rss"></i></a>');
} }
}
/**
* Add closed icon for closed questions
*
* @since Snow 1.4
*/
public function title()
{
$q_view = isset($this->content['q_view']) ? $this->content['q_view'] : null;
// link title where appropriate // link title where appropriate
$url = isset($q_view['url']) ? $q_view['url'] : false; $url = isset($q_view['url']) ? $q_view['url'] : false;
......
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