diff --git a/src/Site/Lib/Template.php b/src/Site/Lib/Template.php index 5abfebc..11ab7f3 100644 --- a/src/Site/Lib/Template.php +++ b/src/Site/Lib/Template.php @@ -42,7 +42,7 @@ class Template { */ public function addCss(string $name): void { $this->custCss[] = - ''; + "\n"; $this->assign('custCss', $this->custCss); } diff --git a/view/article.maron b/view/article.maron index 9251f00..dc508c0 100644 --- a/view/article.maron +++ b/view/article.maron @@ -1,16 +1,27 @@ {@ include(common/header) @} +{@ include(common/search) @} +
- {@ if (isset($meta->thumbnail) && $meta->thumbnail != '') @} +{@ if (isset($meta->thumbnail) && $meta->thumbnail != '') @}
- {@ endif @} +{@ endif @}
{{ $meta->date }}
{{ $meta->author }}
+{@ if (isset($meta->category) && !empty($meta->category) && $meta->category[0] !== '') @} +{@ foreach ($meta->category as $cat) @} +
+ {{ $cat }} + +
+{@ endforeach @} +{@ endif @}

{{{ $meta->title }}}

- {{{ $article }}} +{{{ $article }}} +
{@ include(common/footer) @} diff --git a/view/common/footer.maron b/view/common/footer.maron index 088f8bd..3f6dd67 100644 --- a/view/common/footer.maron +++ b/view/common/footer.maron @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/view/common/header.maron b/view/common/header.maron index b34f511..696a739 100644 --- a/view/common/header.maron +++ b/view/common/header.maron @@ -7,15 +7,15 @@ {{ SITEINFO['title'] }}: {{ $pagetit }} {@ if (isset($custCss) && !empty($custCss) && !is_bool($custCss)) @} - {@ foreach ($custCss as $css) @} +{@ foreach ($custCss as $css) @} {{{ $css }}} - {@ endforeach @} +{@ endforeach @} {@ endif @} {@ if (isset($meta)) @} - {@ if (isset($meta->thumbnail)) @} +{@ if (isset($meta->thumbnail)) @} - {@ endif @} +{@ endif @} {@ endif @} @@ -24,23 +24,23 @@ - {@ if (isset($meta) && isset($meta->thumbnail)) @} +{@ if (isset($meta) && isset($meta->thumbnail)) @} - {@ endif @} +{@ endif @} - {@ if (TWITTER_HANDLE != '') @} +{@ if (TWITTER_HANDLE != '') @} - {@ if (isset($meta) && isset($meta->thumbnail)) @} +{@ if (isset($meta) && isset($meta->thumbnail)) @} - {@ endif @} - {@ endif @} - {@ if (ATOM_ENABLED) @} +{@ endif @} +{@ endif @} +{@ if (ATOM_ENABLED) @} - {@ endif @} +{@ endif @}
@@ -50,10 +50,10 @@
-
+
\ No newline at end of file diff --git a/view/common/newscard.maron b/view/common/newscard.maron index 97cb86c..b170f16 100644 --- a/view/common/newscard.maron +++ b/view/common/newscard.maron @@ -1,23 +1,21 @@ -
- {@ if (isset($post['thumbnail']) && $post['thumbnail'] != '') @} -
- - {{ $post['title'] }} - +
+{@ if (isset($post['thumbnail']) && $post['thumbnail'] != '') @} +
+ + {{ $post['title'] }} + +
+{@ endif @} +
+
+ {{ $post['date'] }} +{@ foreach ($post['category'] as $cat) @} + {{ $cat }} +{@ endforeach @}
- {@ endif @} -
-
- {{ $post['date'] }} - {# {@ if (isset($post['category']) && is_array($post['category'])) @} #} - {@ foreach ($post['category'] as $cat) @} - {{ $cat }} - {@ endforeach @} - {# {@ endif @} #} -
-

- {{{ $post['title'] }}} -

-

{{{ $post['preview'] }}}

-
-
\ No newline at end of file +

+ {{{ $post['title'] }}} +

+

{{{ $post['preview'] }}}

+
+
\ No newline at end of file diff --git a/view/common/pagination.maron b/view/common/pagination.maron index c16a471..baf0d51 100644 --- a/view/common/pagination.maron +++ b/view/common/pagination.maron @@ -1,71 +1,71 @@ - {@ if (isset($totalPages) && $totalPages > 1) @} +{@ if (isset($totalPages) && $totalPages > 1) @} - {@ endif @} \ No newline at end of file +{@ endif @} \ No newline at end of file diff --git a/view/home.maron b/view/home.maron index 03ea4a0..0ceebb2 100644 --- a/view/home.maron +++ b/view/home.maron @@ -1,9 +1,11 @@ {@ include(common/header) @} {@ include(common/search) @} +
- {@ foreach ($posts as $post) @} - {@ include(common/newscard) @} - {@ endforeach @} +{@ foreach ($posts as $post) @} +{@ include(common/newscard) @} +{@ endforeach @}
- {@ include(common/pagination) @} + +{@ include(common/pagination) @} {@ include(common/footer) @}