first commit 2

This commit is contained in:
hmw1001
2026-06-11 18:47:38 +09:00
parent c768729ce6
commit 6f534e33a6
11095 changed files with 1595758 additions and 0 deletions
@@ -0,0 +1,15 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.custom :: photo_news_lwd/config.php
* 포토 뉴스 모듈 설정
*/
$photo_news_config = array(
'board_id' => 'photo_news', // 게시판 ID
'limit' => 4, // 가져올 게시물 수
'title' => 'PHOTO NEWS', // 섹션 타이틀
'link_url' => G5_BBS_URL . '/board.php?bo_table=photo_news', // 더보기 링크
);
?>
@@ -0,0 +1,73 @@
.photo-news-lwd {
margin-top: 40px;
max-width: 1200px;
margin-left: auto;
margin-right: auto;
}
.photo-news-header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2px solid #333;
padding-bottom: 10px;
margin-bottom: 20px;
}
.photo-news-header h2 {
font-size: 1.5rem;
font-weight: 700;
color: #333;
margin: 0;
}
.photo-news-header .btn-more {
font-size: 0.9rem;
color: #666;
text-decoration: none;
}
.photo-news-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
}
.photo-item a {
text-decoration: none;
color: inherit;
display: block;
}
.photo-item .photo-thumb {
width: 100%;
height: 180px;
overflow: hidden;
margin-bottom: 10px;
background-color: #f5f5f5;
border-radius: 4px;
}
.photo-item .photo-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s;
}
.photo-item:hover .photo-thumb img {
transform: scale(1.05);
}
.photo-item .photo-info h3 {
font-size: 1rem;
font-weight: 500;
line-height: 1.4;
margin: 0;
height: 2.8em; /* 2줄 제한 */
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
@@ -0,0 +1,43 @@
<?php
if (!defined('_GNUBOARD_')) exit;
$config_path = __DIR__ . '/config.php';
if (!file_exists($config_path)) return;
include_once($config_path);
$visual_id = 'photo-news-lwd-' . uniqid();
// 게시물 가져오기
$list = get_latest($photo_news_config['board_id'], $photo_news_config['limit'], 50);
if (empty($list)) return;
?>
<div class="photo-news-lwd" id="<?php echo $visual_id; ?>">
<div class="photo-news-header">
<h2><?php echo $photo_news_config['title']; ?></h2>
<a href="<?php echo $photo_news_config['link_url']; ?>" class="btn-more">+ 더보기</a>
</div>
<div class="photo-news-grid">
<?php foreach ($list as $post): ?>
<div class="photo-item">
<a href="<?php echo $post['href']; ?>">
<div class="photo-thumb">
<?php
$thumb = get_list_thumbnail($post['bo_table'], $post['wr_id'], 300, 200);
if ($thumb['src']) {
echo '<img src="' . $thumb['src'] . '" alt="' . $post['subject'] . '">';
} else {
echo '<span class="no-img">No Image</span>';
}
?>
</div>
<div class="photo-info">
<h3><?php echo $post['subject']; ?></h3>
</div>
</a>
</div>
<?php endforeach; ?>
</div>
</div>
<link rel="stylesheet" href="<?php echo G5_THEME_URL; ?>/rb.custom/photo_news_lwd/module.css?ver=<?php echo G5_CSS_VER; ?>">