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,78 @@
.latest-posts-module {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
padding: 30px;
background-color: #fff;
border-radius: 12px;
box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.latest-board-section {
border: 1px solid #eee;
padding: 20px;
border-radius: 8px;
background-color: #fcfcfc;
}
.latest-board-section h2 {
font-size: 1.5rem;
font-weight: 700;
margin-bottom: 15px;
color: #333;
border-bottom: 2px solid #0056b3;
padding-bottom: 10px;
}
.latest-board-section ul {
list-style: none;
padding: 0;
margin: 0;
}
.latest-board-section li {
margin-bottom: 10px;
padding-bottom: 10px;
border-bottom: 1px dashed #eee;
}
.latest-board-section li:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
}
.latest-board-section li a {
display: flex;
align-items: center;
text-decoration: none;
color: #555;
transition: color 0.2s ease;
}
.latest-board-section li a:hover {
color: #0056b3;
}
.latest-board-section li a strong {
flex-grow: 1;
font-size: 1rem;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.latest-board-section li a .datetime {
flex-shrink: 0;
font-size: 0.85rem;
color: #888;
margin-left: 10px;
}
/* 반응형 디자인 */
@media (max-width: 768px) {
.latest-posts-module {
grid-template-columns: 1fr;
}
}
@@ -0,0 +1,5 @@
// latest_posts_section 모듈을 위한 JavaScript
window.initLatestPostsModule = function(moduleId) {
// 이 모듈은 현재 특별한 JavaScript 로직이 필요 없습니다.
// console.log(`Latest Posts Module (ID: ${moduleId}) initialized.`);
};
@@ -0,0 +1,56 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.custom :: latest_posts_section/module.php
* 최신글 5개 모듈
*/
// Assume $md_id is provided by the Rebuilder system. If not, generate a fallback.
if (!isset($md_id)) {
$md_id = uniqid('lps_'); // Fallback unique ID
}
// 최신글을 가져올 게시판 목록
$latest_boards = array('journal', 'coverage', 'interview', 'newsfocus1', 'newsfocus2', 'photonews', 'newtech', 'newproduct');
?>
<div class="latest-posts-module" id="lps-<?php echo $md_id; ?>">
<?php foreach ($latest_boards as $bo_table): ?>
<div class="latest-board-section">
<?php
// 'basic' 최신글 스킨을 사용하여 각 게시판의 최신글 5개를 가져옵니다.
echo latest('theme/basic', $bo_table, 5, 40);
?>
</div>
<?php endforeach; ?>
</div>
<link rel="stylesheet" href="<?php echo G5_THEME_URL; ?>/rb.custom/latest_posts_section/module.css?ver=<?php echo G5_CSS_VER; ?>">
<script>
(function() {
const currentModuleId = 'lps-<?php echo $md_id; ?>';
const initFunctionName = 'initLatestPostsModule';
const scriptId = 'latest-posts-module-script-' + currentModuleId;
if (document.getElementById(scriptId)) {
if (typeof window[initFunctionName] === 'function') {
window[initFunctionName](currentModuleId);
}
return;
}
const script = document.createElement('script');
script.id = scriptId;
script.src = '<?php echo G5_THEME_URL; ?>/rb.custom/latest_posts_section/module.js?ver=<?php echo G5_JS_VER; ?>';
script.async = true;
script.onload = () => {
if (typeof window[initFunctionName] === 'function') {
window[initFunctionName](currentModuleId);
}
return;
};
document.head.appendChild(script);
})();
</script>