first commit 2
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
/**
|
||||
* laser.TLRB 레이아웃 설정 파일
|
||||
* 각 영역(Row)별로 가로 칸(Column) 개수를 설정합니다.
|
||||
*/
|
||||
|
||||
$layout_grid_config = [
|
||||
// '영역ID' => 칸 개수
|
||||
'top' => 1, // main-content-top (1칸: 100%)
|
||||
'middle' => 2, // main-content-middle (2칸: 50% / 50%)
|
||||
'middle1' => 1, // main-content-middle1 (1칸: 100%)
|
||||
'bottom' => 3, // main-content-bottom (3칸: 33% / 33% / 33%)
|
||||
'bottom1' => 1, // main-content-bottom (1칸: 100%)
|
||||
'left_ad' => false,
|
||||
'right_ad' => true,
|
||||
// 필요하다면 아래처럼 추가 가능
|
||||
// 'extra' => 4, // main-content-extra (4칸)
|
||||
];
|
||||
?>
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 이 레이아웃 전용 CSS 파일을 불러옵니다.
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_THEME_URL.'/rb.layout/laser.TLRB/style.css?ver='.G5_SERVER_TIME.'">', 0);
|
||||
|
||||
// 💡 [핵심] 설정 파일 로드
|
||||
$config_path = __DIR__ . '/config.php';
|
||||
if (file_exists($config_path)) {
|
||||
include_once($config_path);
|
||||
} else {
|
||||
// 설정 파일이 없을 경우 기본값
|
||||
$layout_grid_config = [
|
||||
'top' => 1,
|
||||
'middle' => 1,
|
||||
'bottom' => 1,
|
||||
'left_ad' => false,
|
||||
'right_ad' => false,
|
||||
];
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="main-content-wrapper">
|
||||
<div class="three-column-layout container">
|
||||
<?php if ($layout_grid_config['left_ad']===true): ?>
|
||||
<!-- 1. 좌측 사이드바 -->
|
||||
<aside class="layout-sidebar-left">
|
||||
<div class="sidebar-inner">
|
||||
<?php if($is_admin) { ?> <h3 class="sidebar-title">광고 영역</h3> <?php } ?>
|
||||
<!-- 💡 [수정] 좌측 모듈 영역에 고유 ID 부여 -->
|
||||
<div class="flex_box flex_box_l" data-layout="main-left"></div>
|
||||
</div>
|
||||
</aside>
|
||||
<?php endif; ?>
|
||||
<!-- Rebuilder 시스템의 메인 콘텐츠 영역 -->
|
||||
<main class="layout-main-content">
|
||||
|
||||
<?php foreach ($layout_grid_config as $row_name => $columns): ?>
|
||||
<!-- 행(Row) 시작 -->
|
||||
<div class="layout-row layout-row-<?php echo $row_name; ?>" data-columns="<?php echo $columns; ?>">
|
||||
|
||||
<?php if ($columns == 1): ?>
|
||||
<!-- 1칸일 경우: 기존 ID 그대로 사용 (호환성 유지) -->
|
||||
<div class="flex_box layout-col" data-layout="main-content-<?php echo $row_name; ?>">
|
||||
<!-- --><?php //echo rb_get_modules('main-content-'.$row_name); ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<!-- 2칸 이상일 경우: 번호를 붙여서 분할 -->
|
||||
<?php for ($i = 1; $i <= $columns; $i++): ?>
|
||||
<div class="flex_box layout-col" data-layout="main-content-<?php echo $row_name; ?>-<?php echo $i; ?>">
|
||||
<!-- --><?php //echo rb_get_modules('main-content-'.$row_name.'-'.$i); ?>
|
||||
</div>
|
||||
<?php endfor; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<!-- 행(Row) 끝 -->
|
||||
<?php endforeach; ?>
|
||||
|
||||
</main>
|
||||
<!-- 3. 우측 사이드바 -->
|
||||
<?php if ($layout_grid_config['right_ad']===true): ?>
|
||||
<aside class="layout-sidebar-right">
|
||||
<div class="sidebar-inner">
|
||||
<?php if($is_admin) { ?> <h3 class="sidebar-title">광고 영역</h3> <?php } ?>
|
||||
<!-- 💡 [수정] 우측 모듈 영역에 고유 ID 부여 -->
|
||||
<div class="flex_box flex_box_r" data-layout="main-right"></div>
|
||||
</div>
|
||||
</aside>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,28 @@
|
||||
/* laser.TLRB Layout Style - Dynamic Grid */
|
||||
|
||||
.layout-main-content {
|
||||
width: 100%;
|
||||
padding-top: 80px !important;
|
||||
}
|
||||
|
||||
|
||||
/* 행(Row) 스타일 */
|
||||
.layout-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 20px; /* 행 사이 간격 */
|
||||
gap: 20px; /* 열 사이 간격 */
|
||||
}
|
||||
|
||||
.layout-row:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* 열(Column) 스타일 */
|
||||
.layout-col {
|
||||
flex: 1; /* 남은 공간을 균등하게 차지 */
|
||||
min-width: 0; /* 내용물이 넘쳐도 레이아웃 깨짐 방지 */
|
||||
}
|
||||
|
||||
/* 모바일 반응형 */
|
||||
|
||||
Reference in New Issue
Block a user