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,94 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// Trend01 헤더 전용 CSS, JS 파일을 불러옵니다.
add_stylesheet('<link rel="stylesheet" href="'.G5_THEME_URL.'/shop/rb.layout_hd/Trend01/style.css?ver='.G5_SERVER_TIME.'">', 0);
add_javascript('<script src="'.G5_THEME_URL.'/shop/rb.layout_hd/Trend01/script.js?ver='.G5_SERVER_TIME.'"></script>', 1);
?>
<header id="site-header" class="trend01-header">
<div class="header-inner container">
<!-- 로고 -->
<div class="header-logo">
<a href="<?php echo G5_SHOP_URL; ?>/">
<!-- 💡 [수정] 로고 이미지 경로 변경 -->
<img src="<?php echo G5_THEME_URL; ?>/img/logo/logo.jpg" alt="<?php echo $config['cf_title']; ?>">
</a>
</div>
<!-- 메인 메뉴 (GNB): 1차 분류 자동 출력 -->
<nav class="header-gnb">
<ul>
<?php
$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where length(ca_id) = 2 and ca_use = '1' order by ca_order, ca_id ";
$result = sql_query($sql);
while ($row = sql_fetch_array($result)) {
echo '<li><a href="'.G5_SHOP_URL.'/list.php?ca_id='.$row['ca_id'].'">'.get_text($row['ca_name']).'</a></li>';
}
?>
</ul>
</nav>
<!-- 유틸리티 메뉴 -->
<div class="header-utils">
<ul>
<?php if ($is_member) { ?>
<li><a href="<?php echo G5_BBS_URL; ?>/logout.php">Logout</a></li>
<li><a href="<?php echo G5_SHOP_URL; ?>/mypage.php">My Page</a></li>
<?php } else { ?>
<li><a href="<?php echo G5_BBS_URL; ?>/login.php">Login</a></li>
<li><a href="<?php echo G5_BBS_URL; ?>/register.php">Join</a></li>
<?php } ?>
<li><a href="<?php echo G5_SHOP_URL; ?>/cart.php">Cart</a></li>
<?php if ($is_admin) { ?>
<li><a href="<?php echo G5_ADMIN_URL; ?>">Admin</a></li>
<?php } ?>
</ul>
</div>
<!-- 모바일 메뉴 버튼 -->
<button type="button" class="mobile-menu-trigger">
<span></span>
<span></span>
<span></span>
</button>
</div>
<!-- 모바일 메뉴 패널 (숨겨진 상태) -->
<div class="mobile-menu-panel">
<div class="mobile-menu-header">
<div class="header-logo">
<a href="<?php echo G5_SHOP_URL; ?>/">
<!-- 💡 [수정] 로고 이미지 경로 변경 -->
<img src="<?php echo G5_THEME_URL; ?>/img/logo/logo.jpg" alt="<?php echo $config['cf_title']; ?>">
</a>
</div>
<button type="button" class="mobile-menu-close">&times;</button>
</div>
<!-- 모바일 메뉴: 1차 분류 자동 출력 -->
<nav class="mobile-gnb">
<ul>
<?php
$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where length(ca_id) = 2 and ca_use = '1' order by ca_order, ca_id ";
$result = sql_query($sql);
while ($row = sql_fetch_array($result)) {
echo '<li><a href="'.G5_SHOP_URL.'/list.php?ca_id='.$row['ca_id'].'">'.get_text($row['ca_name']).'</a></li>';
}
?>
</ul>
</nav>
<div class="mobile-utils">
<ul>
<?php if ($is_member) { ?>
<li><a href="<?php echo G5_BBS_URL; ?>/logout.php">Logout</a></li>
<li><a href="<?php echo G5_SHOP_URL; ?>/mypage.php">My Page</a></li>
<?php } else { ?>
<li><a href="<?php echo G5_BBS_URL; ?>/login.php">Login</a></li>
<li><a href="<?php echo G5_BBS_URL; ?>/register.php">Join</a></li>
<?php } ?>
<li><a href="<?php echo G5_SHOP_URL; ?>/cart.php">Cart</a></li>
</ul>
</div>
</div>
</header>
@@ -0,0 +1,24 @@
document.addEventListener('DOMContentLoaded', function () {
const trigger = document.querySelector('.mobile-menu-trigger');
const panel = document.querySelector('.mobile-menu-panel');
const closeBtn = document.querySelector('.mobile-menu-close');
if (trigger && panel && closeBtn) {
// 메뉴 열기
trigger.addEventListener('click', function () {
panel.classList.add('active');
});
// 메뉴 닫기
closeBtn.addEventListener('click', function () {
panel.classList.remove('active');
});
// 패널 바깥 영역 클릭 시 닫기 (선택적)
document.addEventListener('click', function(e) {
if (!panel.contains(e.target) && !trigger.contains(e.target)) {
panel.classList.remove('active');
}
});
}
});
@@ -0,0 +1,168 @@
/* Trend01 Header Style - Minimal & Clean */
#site-header {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 80px;
background-color: #fff;
border-bottom: 1px solid #eee;
z-index: 1000;
transition: background-color 0.3s ease;
}
.header-inner {
display: flex;
align-items: center;
justify-content: space-between;
height: 100%;
padding: 0 20px;
}
/* 로고 */
.header-logo img {
height: 30px; /* 로고 이미지 높이 */
width: auto;
}
/* 메인 메뉴 (GNB) */
.header-gnb ul {
display: flex;
gap: 40px;
margin: 0;
padding: 0;
list-style: none;
}
.header-gnb a {
text-decoration: none;
color: #333;
font-weight: 600;
font-size: 1rem;
position: relative;
padding: 5px 0;
}
.header-gnb a::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 2px;
background-color: #111;
transition: width 0.3s ease;
}
.header-gnb a:hover::after {
width: 100%;
}
/* 유틸리티 메뉴 */
.header-utils ul {
display: flex;
align-items: center;
gap: 20px;
margin: 0;
padding: 0;
list-style: none;
}
.header-utils a {
text-decoration: none;
color: #555;
font-size: 0.9rem;
}
/* 모바일 메뉴 (기본 숨김) */
.mobile-menu-trigger,
.mobile-menu-panel {
display: none;
}
/* --- 반응형: 모바일 --- */
@media (max-width: 1024px) {
.header-gnb,
.header-utils {
display: none;
}
.mobile-menu-trigger {
display: flex;
flex-direction: column;
justify-content: space-around;
width: 30px;
height: 25px;
background: transparent;
border: none;
cursor: pointer;
padding: 0;
}
.mobile-menu-trigger span {
display: block;
width: 100%;
height: 2px;
background-color: #333;
transition: all 0.3s ease;
}
.mobile-menu-panel {
position: fixed;
top: 0;
right: -100%; /* 오른쪽 바깥에 숨김 */
width: 80%;
max-width: 300px;
height: 100%;
background-color: #fff;
box-shadow: -5px 0 15px rgba(0,0,0,0.1);
transition: right 0.4s ease;
padding: 20px;
z-index: 1100;
}
.mobile-menu-panel.active {
right: 0; /* 활성화 시 오른쪽에서 나타남 */
}
.mobile-menu-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 40px;
}
.mobile-menu-close {
font-size: 2rem;
background: none;
border: none;
cursor: pointer;
}
.mobile-gnb ul,
.mobile-utils ul {
flex-direction: column;
gap: 25px;
padding: 0;
list-style: none;
}
.mobile-gnb {
border-bottom: 1px solid #eee;
padding-bottom: 30px;
margin-bottom: 30px;
}
.mobile-gnb a {
font-size: 1.2rem;
color: #333;
text-decoration: none;
}
.mobile-utils a {
font-size: 1rem;
color: #555;
text-decoration: none;
}
}