Skip to content

Commit 160c368

Browse files
CSS and section issue resolved
1 parent bb08522 commit 160c368

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

astroid/astroid-framework/framework/library/astroid/Document.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,12 +1081,19 @@ public function astroidCSS()
10811081
// css on page
10821082
$css = $this->renderCss();
10831083
if (Framework::isSite()) {
1084+
// page css
1085+
$pageCSSHash = md5($css);
1086+
$pageCSS = ASTROID_TEMPLATE_PATH . '/css/compiled-' . $pageCSSHash . '.css';
1087+
if (!file_exists($pageCSS)) {
1088+
Helper::putContents($pageCSS, $css);
1089+
}
1090+
$this->addStyleSheet('css/compiled-' . $pageCSSHash . '.css');
10841091
// custom css
10851092
if (file_exists(ASTROID_TEMPLATE_PATH . '/css/custom.css')) {
10861093
$this->addStyleSheet('css/custom.css');
10871094
}
1088-
// return page css
1089-
return '<style>' . $css . '</style>';
1095+
// return
1096+
return '';
10901097
} else {
10911098
$minifier = new Minify\CSS($css);
10921099
return '<style>' . $minifier->minify() . '</style>';

astroid/astroid-framework/framework/library/astroid/Element/Section.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class Section extends BaseElement
1717
{
18-
protected $_tag = 'div';
18+
protected $_tag = 'section';
1919
public $hasComponent = false;
2020
public $hasHeader = false;
2121
public $hasFooter = false;

0 commit comments

Comments
 (0)