summaryrefslogtreecommitdiff
path: root/skin/main.skin.php
diff options
context:
space:
mode:
Diffstat (limited to 'skin/main.skin.php')
-rw-r--r--skin/main.skin.php44
1 files changed, 32 insertions, 12 deletions
diff --git a/skin/main.skin.php b/skin/main.skin.php
index a1a4910..c0ab40a 100644
--- a/skin/main.skin.php
+++ b/skin/main.skin.php
@@ -144,22 +144,28 @@ HTML;
// post page
// ---------
-function post($ctx, $id, $title, $unsafe_html, $date, $visible, $url, $tags, $email, $urlencoded_reply_subject) {
+function post($ctx, $id, $title, $unsafe_html, $unsafe_toc_html, $date, $visible, $url, $tags, $email, $urlencoded_reply_subject) {
$html = <<<HTML
-<div class="blog-post">
- <div class="blog-post-title">
- <h1>{$title}</h1>
- <div class="blog-post-date">
- {$ctx->if_not($visible, '<b>'.$ctx->lang('blog_post_hidden').'</b> |')}
- {$date}
- {$ctx->if_admin($ctx->postAdminLinks, $url, $id)}
- </div>
- <div class="blog-post-tags clearfix">
- {$ctx->for_each($tags, fn($tag) => $ctx->postTag($tag->getUrl(), $tag->tag))}
+<div class="blog-post-wrap2">
+ <div class="blog-post-wrap1">
+ <div class="blog-post">
+ <div class="blog-post-title">
+ <h1>{$title}</h1>
+ <div class="blog-post-date">
+ {$ctx->if_not($visible, '<b>'.$ctx->lang('blog_post_hidden').'</b> |')}
+ {$date}
+ {$ctx->if_admin($ctx->postAdminLinks, $url, $id)}
+ </div>
+ <div class="blog-post-tags clearfix">
+ {$ctx->for_each($tags, fn($tag) => $ctx->postTag($tag->getUrl(), $tag->tag))}
+ </div>
+ </div>
+ <div class="blog-post-text">{$unsafe_html}</div>
</div>
+ {$ctx->if_true($unsafe_toc_html, $ctx->postToc, $unsafe_toc_html)}
</div>
- <div class="blog-post-text">{$unsafe_html}</div>
</div>
+
<div class="blog-post-comments">
{$ctx->langRaw('blog_comments_text', $email, $urlencoded_reply_subject)}
</div>
@@ -168,6 +174,20 @@ HTML;
return [$html, markdownThemeChangeListener()];
}
+function postToc($ctx, $unsafe_toc_html) {
+return <<<HTML
+<div class="blog-post-toc">
+ <div class="blog-post-toc-wrap">
+ <div class="blog-post-toc-inner-wrap">
+ <div class="blog-post-toc-title">{$ctx->lang('toc')}</div>
+ {$unsafe_toc_html}
+ </div>
+ </div>
+</div>
+HTML;
+
+}
+
function postAdminLinks($ctx, $url, $id) {
return <<<HTML
<a href="{$url}edit/">{$ctx->lang('edit')}</a>