HTMLを綺麗に、色んなテスト関係関数の修正

This commit is contained in:
2025-11-20 22:39:28 +09:00
parent 8513c530f5
commit 4f70e6d4e4
11 changed files with 145 additions and 71 deletions

View File

@@ -1,6 +1,5 @@
{@ include(common/header) @}
{@ include(common/search) @}
<div class="news-article">
{@ if (isset($meta->thumbnail) && $meta->thumbnail != '') @}
<div class="thumbnail{{ isset($meta->thumborient) && $meta->thumborient != 'center' ? ' '.$meta->thumborient : '' }}">
@@ -12,16 +11,11 @@
<div class="meta-author">{{ $meta->author }}</div>
{@ if (isset($meta->category) && !empty($meta->category) && $meta->category[0] !== '') @}
{@ foreach ($meta->category as $cat) @}
<div class="meta-category">
{{ $cat }}
</div>
<div class="meta-category">{{ $cat }}</div>
{@ endforeach @}
{@ endif @}
</div>
<h1 class="title">{{{ $meta->title }}}</h1>
{{{ $article }}}
{{{ $article."\n" }}}
</div>
{@ include(common/footer) @}
{@ include(common/footer) @}

View File

@@ -1,7 +1,9 @@
</main>
<footer>
<address>Copyright{{ defined('COPYRIGHT_YEAR') ? ' '.COPYRIGHT_YEAR : '' }} © <a href="https://076.moe/">076スタジオ合同会社</a></address><br />
<address>
Copyright{{ defined('COPYRIGHT_YEAR') ? ' '.COPYRIGHT_YEAR : '' }} © <a href="https://076.moe/">076スタジオ合同会社</a><br />
Powered By <a href="https://technicalsuwako.moe/littlebeast">Little Beast</a>
</address>
</footer>
</div>
</body>

View File

@@ -12,13 +12,15 @@
{@ endforeach @}
{@ endif @}
{@ if (isset($meta)) @}
{@ if (isset($meta->author)) @}
<meta name="author" content="{{ $meta->author }}" />
{@ endif @}
{@ if (isset($meta->thumbnail)) @}
<meta name="thumbnail" content="/static/{{ $meta->thumbnail }}" />
{@ endif @}
{@ endif @}
<meta name="description" content="{{ $description }}" />
<meta name="keywords" content="{{ SITEINFO['tags'].',' }}{@ if (isset($meta)) @}{@ foreach ($meta->category as $cat) @}{{ $cat.',' }}{@ endforeach @}{@ endif @}" />
<meta name="keywords" content="{{ SITEINFO['tags'].(isset($meta->category) ? ',' : '') }}{@ if (isset($meta) && isset($meta->category)) @}{@ foreach ($meta->category as $k => $cat) @}{{ $cat.($k === array_key_last($meta->category) ? '' : ',') }}{@ endforeach @}{@ endif @}" />
<meta property="og:title" content="{{ SITEINFO['title'] }}: {{ $pagetit }}" />
<meta property="og:description" content="{{ $description }}" />
@@ -46,7 +48,7 @@
<div class="container">
<header>
<div class="logo">
{{ SITEINFO['title'] }}
{{ SITEINFO['title'] }}{{ "\n" }}
</div>
<nav>
{@ foreach ($menu as $m) @}