ミラーる
This commit is contained in:
@@ -1,23 +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 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>
|
||||
@@ -1,71 +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">« 前</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">次 »</a>
|
||||
{@ endif @}
|
||||
</div>
|
||||
{@ 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">« 前</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">次 »</a>
|
||||
{@ endif @}
|
||||
</div>
|
||||
{@ endif @}
|
||||
@@ -1,6 +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 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>
|
||||
@@ -1,15 +1,15 @@
|
||||
{@ include(common/header) @}
|
||||
<h1 class="paragraph">Moneroで支援♡</h1>
|
||||
<p class="paragraph">
|
||||
欲しければ、モネロ(XMR)でご支援お願い申し上げます。
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<img src="https://ass.technicalsuwako.moe/keroxmr.png" alt="" />
|
||||
<img src="https://ass.technicalsuwako.moe/xmr-qr.png" alt="" />
|
||||
</p>
|
||||
|
||||
<p class="paragraph">
|
||||
<pre><code>88daW9ANXGVg9zHe6tzHSpQjxHN6JPFDz9wvZBecL1BfTFwmkuLYm9xRsLUt1WAVGPQ6h5pZX6nyu9zXFwE5efSz1gtE1oz</code></pre>
|
||||
</p>
|
||||
{@ include(common/footer) @}
|
||||
{@ include(common/header) @}
|
||||
<h1 class="paragraph">Moneroで支援♡</h1>
|
||||
<p class="paragraph">
|
||||
欲しければ、モネロ(XMR)でご支援お願い申し上げます。
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<img src="https://ass.technicalsuwako.moe/keroxmr.png" alt="" />
|
||||
<img src="https://ass.technicalsuwako.moe/xmr-qr.png" alt="" />
|
||||
</p>
|
||||
|
||||
<p class="paragraph">
|
||||
<pre><code>88daW9ANXGVg9zHe6tzHSpQjxHN6JPFDz9wvZBecL1BfTFwmkuLYm9xRsLUt1WAVGPQ6h5pZX6nyu9zXFwE5efSz1gtE1oz</code></pre>
|
||||
</p>
|
||||
{@ include(common/footer) @}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{@ include(common/header) @}
|
||||
<h1 class="paragraph">秘密のページ</h1>
|
||||
<p class="paragraph">
|
||||
内緒だね~
|
||||
</p>
|
||||
{@ include(common/footer) @}
|
||||
{@ include(common/header) @}
|
||||
<h1 class="paragraph">秘密のページ</h1>
|
||||
<p class="paragraph">
|
||||
内緒だね~
|
||||
</p>
|
||||
{@ include(common/footer) @}
|
||||
|
||||
Reference in New Issue
Block a user