feat: GTSIT 사이트 구축
This commit is contained in:
6
app/Views/blog/index.php
Normal file
6
app/Views/blog/index.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<section class="page-section"><div class="container"><header class="page-heading"><span>BLOG · 자료실</span><h1>시공 이야기 & 알아두면 좋은 정보</h1><p>네트워크·키폰·CCTV 시공 사례와 장비 선택 정보를 정리했습니다.</p></header>
|
||||
<nav class="category-filter" aria-label="게시글 분류"><a href="/blog"<?= $category === '' ? ' aria-current="page"' : '' ?>>전체</a><?php foreach (['네트워크','키폰시스템','CCTV','시공사례'] as $item): ?><a href="/blog?category=<?= rawurlencode($item) ?>"<?= $category === $item ? ' aria-current="page"' : '' ?>><?= e($item) ?></a><?php endforeach; ?></nav>
|
||||
<?php if ($posts): ?><div class="post-grid"><?php foreach ($posts as $post): ?><article class="post-card"><div class="post-thumbnail"><?php if (!empty($post['image_path'])): ?><img src="<?= e($post['image_path']) ?>" alt="<?= e($post['image_alt']) ?>" loading="lazy"><?php else: ?><div class="post-placeholder" data-category="<?= e($post['category']) ?>" aria-hidden="true"><img src="<?= e(asset('images/company-logo-v3.png')) ?>" alt="" width="136" height="63"><small>TECH FIELD NOTE</small></div><?php endif; ?><span class="post-category"><?= e($post['category']) ?></span></div><div class="post-body"><h2><a href="/blog/<?= e($post['slug']) ?>"><?= e($post['title']) ?></a></h2><p><?= e($post['excerpt']) ?></p><time datetime="<?= e(date('Y-m-d', strtotime($post['published_at']))) ?>"><?= e(date('Y.m.d', strtotime($post['published_at']))) ?></time></div></article><?php endforeach; ?></div>
|
||||
<?php else: ?><div class="empty-state"><h2>등록된 게시글이 없습니다</h2><p>선택한 분류의 콘텐츠를 준비하고 있습니다.</p></div><?php endif; ?>
|
||||
<?php $pageCount = max(1, (int) ceil($total / $perPage)); if ($pageCount > 1): ?><nav class="pagination" aria-label="페이지 이동"><?php for ($index = 1; $index <= $pageCount; $index++): ?><a href="/blog?page=<?= $index ?><?= $category ? '&category=' . rawurlencode($category) : '' ?>"<?= $index === $page ? ' aria-current="page"' : '' ?>><?= $index ?></a><?php endfor; ?></nav><?php endif; ?>
|
||||
</div></section>
|
||||
1
app/Views/blog/show.php
Normal file
1
app/Views/blog/show.php
Normal file
@@ -0,0 +1 @@
|
||||
<article class="article"><a class="back-link" href="/blog">← 블로그 목록</a><header><span class="badge"><?= e($post['category']) ?></span><time datetime="<?= e(date('Y-m-d', strtotime($post['published_at']))) ?>"><?= e(date('Y.m.d', strtotime($post['published_at']))) ?></time><h1><?= e($post['title']) ?></h1><p><?= e($post['author']) ?> 기술팀</p></header><?php if (!empty($post['image_path'])): ?><figure class="article-image"><img src="<?= e($post['image_path']) ?>" alt="<?= e($post['image_alt']) ?>"></figure><?php endif; ?><div class="article-body"><?php foreach (preg_split('/\R{2,}/', trim($post['body'])) ?: [] as $paragraph): ?><p><?= nl2br(e($paragraph)) ?></p><?php endforeach; ?></div><aside class="article-cta"><div><strong>비슷한 시공이 필요하신가요?</strong><p>현장 조건에 맞는 구성을 상담해 드립니다.</p></div><a class="button button-primary" href="/contact">상담 신청</a></aside></article>
|
||||
Reference in New Issue
Block a user