Update (js): redesign

This commit is contained in:
2023-10-05 00:31:08 +08:00
parent 7374d66a21
commit c2656ebbc0
21 changed files with 43 additions and 42 deletions

View File

@@ -234,7 +234,7 @@ private function injectPublishDateAndAuthor($post, $content)
$authorName = $post->author->name;
// Create the HTML structure for publish date and author
$publishInfo = "<div class=\"mb-4\"><span class=\"text-secondary small\">Published on {$publishedAtFormatted} by {$authorName}<i class=\"bi bi-dot\"></i>" . markdown_min_read($post->body) . "</span></div>";
$publishInfo = "<div class=\"mb-4\"><span class=\"text-secondary small\">Published on {$publishedAtFormatted} by {$authorName}<i class=\"bi bi-dot\"></i>".markdown_min_read($post->body).'</span></div>';
// Inject the publish date and author information after the `h1` tag
$content = preg_replace('/(<\/h1>)/', '$1'.$publishInfo, $content, 1);