SVNからのミラー

This commit is contained in:
2025-11-07 22:48:07 +09:00
commit 438c7d8aef
68 changed files with 7619 additions and 0 deletions

8
view/common/footer.maron Normal file
View File

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

59
view/common/header.maron Normal file
View File

@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="ja">
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="/favicon.ico" id="favicon">
<title>{{ SITEINFO['title'] }}: {{ $pagetit }}</title>
<link rel="stylesheet" type="text/css" href="/static/style.css" />
{@ if (isset($custCss) && !empty($custCss) && !is_bool($custCss)) @}
{@ foreach ($custCss as $css) @}
{{{ $css }}}
{@ endforeach @}
{@ endif @}
{@ if (isset($meta)) @}
<meta name="author" content="{{ $meta->author }}" />
{@ 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 property="og:title" content="{{ SITEINFO['title'] }}: {{ $pagetit }}" />
<meta property="og:description" content="{{ $description }}" />
<meta property="og:type" content="{{ isset($meta) && isset($meta->thumbnail) ? 'article' : 'website' }}" />
<meta property="og:url" content="{{ isset($_SERVER['REQUEST_URI']) ? 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] : 'https://'.$_SERVER['HTTP_HOST'] }}" />
{@ if (isset($meta) && isset($meta->thumbnail)) @}
<meta property="og:image" content="https://{{ $_SERVER['HTTP_HOST'] }}/static/article/{{ $meta->thumbnail }}" />
{@ endif @}
{@ if (TWITTER_HANDLE != '') @}
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:card" content="{{ TWITTER_HANDLE }}" />
<meta name="twitter:title" content="{{ SITEINFO['title'] }}: {{ $pagetit }}" />
<meta name="twitter:url" content="{{ isset($_SERVER['REQUEST_URI']) ? 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] : 'https://'.$_SERVER['HTTP_HOST'] }}" />
<meta name="twitter:description" content="{{ $description }}" />
{@ if (isset($meta) && isset($meta->thumbnail)) @}
<meta name="twitter:image:src" content="https://{{ $_SERVER['HTTP_HOST'] }}/static/article/{{ $meta->thumbnail }}" />
{@ endif @}
{@ endif @}
{@ if (ATOM_ENABLED) @}
<link rel="alternate" type="application/atom+xml" title="{{ SITEINFO['title'] }} feed" href="/blog.atom" />
{@ endif @}
</head>
<body>
<div class="container">
<header>
<div class="logo">
{{ SITEINFO['title'] }}
</div>
<nav>
{@ foreach ($menu as $m) @}
{@ if ($m['show']) @}
<a class="{{ $m['class'] }}{{ $curPage == $m['page'] ? ' active' : '' }}" href="{{ $m['href'] }}">{{ $m['text'] }}</a>
{@ endif @}
{@ endforeach @}
</nav>
</header>
<main>

View File

@@ -0,0 +1,23 @@
<article class="news-card">
{@ if (isset($post['thumbnail']) && $post['thumbnail'] != '') @}
<div class="news-image">
<a href="/{{ $section }}/{{ $post['slug'] }}">
<img src="/static/article/{{ $post['thumbnail'] }}" alt="{{ $post['title'] }}" loading="lazy" />
</a>
</div>
{@ endif @}
<div class="news-content">
<div class="news-meta">
<span class="news-date">{{ $post['date'] }}</span>
{# {@ if (isset($post['category']) && is_array($post['category'])) @} #}
{@ foreach ($post['category'] as $cat) @}
<span class="news-category">{{ $cat }}</span>
{@ endforeach @}
{# {@ endif @} #}
</div>
<h2 class="news-title">
<a href="/{{ $section }}/{{ $post['slug'] }}{{{ isset($_GET['q']) ? '?q='.urlencode($_GET['q']) : '' }}}">{{{ $post['title'] }}}</a>
</h2>
<p class="news-preview">{{{ $post['preview'] }}}</p>
</div>
</article>

View File

@@ -0,0 +1,71 @@
{@ if (isset($totalPages) && $totalPages > 1) @}
<div class="pagination">
{# 検索クエリがある場合はページネーションリンクに含める #}
{$ $queryParams = [] $}
{@ if (isset($_GET['q']) && !empty($_GET['q'])) @}
{$ $queryParams['q'] = $_GET['q'] $}
{@ endif @}
{# 前のページへのリンク #}
{@ if (isset($currentPage) && $currentPage > 1) @}
{$ $prevParams = $queryParams $}
{$ $prevParams['page'] = $currentPage - 1 $}
{$ $prevQueryString = http_build_query($prevParams) $}
<a href="?{{ $prevQueryString }}" class="page-link">&laquo; 前</a>
{@ endif @}
{# 表示するページ番号の範囲を計算(モバイル対応の為) #}
{# 最大表示ページ数 #}
{$ $rangeSize = 2 $}
{$ $startPage = max(1, $currentPage - floor($rangeSize / 2)) $}
{$ $endPage = min($totalPages, $startPage + $rangeSize - 1) $}
{# 範囲の調整 #}
{@ if ($endPage - $startPage + 1 < $rangeSize && $startPage > 1) @}
{$ $startPage = max(1, $endPage - $rangeSize + 1) $}
{@ endif @}
{# 最初のページへのリンク(多数のページがある場合) #}
{@ if ($startPage > 1) @}
{$ $firstParams = $queryParams $}
{$ $firstParams['page'] = 1 $}
{$ $firstQueryString = http_build_query($firstParams) $}
<a href="?{{ $firstQueryString }}" class="page-link">1</a>
{@ if ($startPage > 2) @}
<span class="page-ellipsis">...</span>
{@ endif @}
{@ endif @}
{@ for ($i = $startPage; $i <= $endPage; $i++) @}
{$ $pageParams = $queryParams $}
{$ $pageParams['page'] = $i $}
{$ $pageQueryString = http_build_query($pageParams) $}
{@ if ($i == $currentPage) @}
<span class="page-current" aria-current="page">{{ $i }}</span>
{@ else @}
<a href="?{{ $pageQueryString }}" class="page-link">{{ $i }}</a>
{@ endif @}
{@ endfor @}
{@ if ($endPage < $totalPages) @}
{# 最後のページへのリンク(多数のページがある場合) #}
{$ $lastParams = $queryParams $}
{$ $lastParams['page'] = $totalPages $}
{$ $lastQueryString = http_build_query($lastParams) $}
{@ if ($endPage < $totalPages - 1) @}
<span class="page-ellipsis">...</span>
{@ endif @}
<a href="?{{ $lastQueryString }}" class="page-link">{{ $totalPages }}</a>
{@ endif @}
{# 次のページへのリンク #}
{@ if (isset($currentPage) && $currentPage < $totalPages) @}
{$ $nextParams = $queryParams $}
{$ $nextParams['page'] = $currentPage + 1 $}
{$ $nextQueryString = http_build_query($nextParams) $}
<a href="?{{ $nextQueryString }}" class="page-link">次 &raquo;</a>
{@ endif @}
</div>
{@ endif @}

6
view/common/search.maron Normal file
View File

@@ -0,0 +1,6 @@
<div class="search-form">
<form action="/{{ $curblog != 'gd' ? $section : '' }}" method="GET">
<input type="text" name="q" value="{{{ isset($_GET['q']) ? htmlspecialchars($_GET['q']) : '' }}}" placeholder="キーワードを入力して下さい" />
<input type="submit" value="検索" />
</form>
</div>