Commit 19607508 by Scott

Small improvements to base theme

parent f723c54b
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
define('QA_BUILD_DATE', '2014-03-20'); define('QA_BUILD_DATE', '2014-03-20');
/* /**
* Autoloads some Q2A classes so it's possible to use them without adding a require_once first. From version 1.7 onwards. * Autoloads some Q2A classes so it's possible to use them without adding a require_once first. From version 1.7 onwards.
* These loosely follow PHP-FIG's PSR-0 standard where faux namespaces are separated by underscores. This is being done * These loosely follow PHP-FIG's PSR-0 standard where faux namespaces are separated by underscores. This is being done
* slowly and carefully to maintain backwards compatibility, and does not apply to plugins, themes, nor most of the core * slowly and carefully to maintain backwards compatibility, and does not apply to plugins, themes, nor most of the core
......
...@@ -479,9 +479,12 @@ ...@@ -479,9 +479,12 @@
$categoryids=array($categoryids); $categoryids=array($categoryids);
$lastcategoryid=count($categoryids) ? end($categoryids) : null; $lastcategoryid=count($categoryids) ? end($categoryids) : null;
$charset = 'utf-8';
$qa_content=array( $qa_content=array(
'content_type' => 'text/html; charset=utf-8', 'content_type' => 'text/html; charset='.$charset,
'charset' => $charset,
'site_title' => qa_html(qa_opt('site_title')), 'site_title' => qa_html(qa_opt('site_title')),
......
...@@ -210,7 +210,7 @@ ...@@ -210,7 +210,7 @@
public function doctype() public function doctype()
{ {
$this->output('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">'); $this->output('<!DOCTYPE html>');
} }
public function html() public function html()
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
{ {
$this->output( $this->output(
'<head>', '<head>',
'<meta http-equiv="content-type" content="'.$this->content['content_type'].'"/>' '<meta charset="'.$this->content['charset'].'"/>'
); );
$this->head_title(); $this->head_title();
...@@ -292,18 +292,18 @@ ...@@ -292,18 +292,18 @@
public function head_css() public function head_css()
{ {
$this->output('<link rel="stylesheet" type="text/css" href="'.$this->rooturl.$this->css_name().'"/>'); $this->output('<link rel="stylesheet" href="'.$this->rooturl.$this->css_name().'"/>');
if (isset($this->content['css_src'])) { if (isset($this->content['css_src'])) {
foreach ($this->content['css_src'] as $css_src) foreach ($this->content['css_src'] as $css_src)
$this->output('<link rel="stylesheet" type="text/css" href="'.$css_src.'"/>'); $this->output('<link rel="stylesheet" href="'.$css_src.'"/>');
} }
if (!empty($this->content['notices'])) { if (!empty($this->content['notices'])) {
$this->output( $this->output(
'<style><!--', '<style>',
'.qa-body-js-on .qa-notice {display:none;}', '.qa-body-js-on .qa-notice {display:none;}',
'//--></style>' '</style>'
); );
} }
} }
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
public function body_script() public function body_script()
{ {
$this->output( $this->output(
'<script type="text/javascript">', '<script>',
"var b=document.getElementsByTagName('body')[0];", "var b=document.getElementsByTagName('body')[0];",
"b.className=b.className.replace('qa-body-js-off', 'qa-body-js-on');", "b.className=b.className.replace('qa-body-js-off', 'qa-body-js-on');",
'</script>' '</script>'
......
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