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,85 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
add_stylesheet('<link rel="stylesheet" href="'.G5_THEME_URL.'/shop/rb.layout_hd/Trend07/style.css?ver='.G5_SERVER_TIME.'">', 0);
add_javascript('<script src="'.G5_THEME_URL.'/shop/rb.layout_hd/Trend07/script.js?ver='.G5_SERVER_TIME.'"></script>', 1);
?>
<header id="site-header" class="trend07-header">
<div class="header-inner">
<!-- 로고 -->
<div class="header-logo">
<a href="<?php echo G5_SHOP_URL; ?>/">
<!-- 로고 이미지는 CSS 배경으로 처리하거나 img 태그 사용 (여기서는 텍스트로 대체하되 이미지 교체 가능) -->
<img src="<?php echo G5_THEME_URL; ?>/img/logo/logo.jpg" alt="<?php echo $config['cf_title']; ?>" class="logo-img">
</a>
</div>
<!-- 메인 메뉴 (GNB) -->
<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>';
// 2차 메뉴 (드롭다운)
$sql2 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where length(ca_id) = 4 and ca_use = '1' and ca_id like '{$row['ca_id']}%' order by ca_order, ca_id ";
$result2 = sql_query($sql2);
if(sql_num_rows($result2) > 0) {
echo '<ul class="sub-menu">';
while ($row2 = sql_fetch_array($result2)) {
echo '<li><a href="'.G5_SHOP_URL.'/list.php?ca_id='.$row2['ca_id'].'">'.get_text($row2['ca_name']).'</a></li>';
}
echo '</ul>';
}
echo '</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" class="cart-btn"><i class="fa fa-shopping-bag"></i></a></li>
<li><button type="button" class="search-btn"><i class="fa fa-search"></i></button></li>
</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">
<span class="mobile-logo-text">MENU</span>
<button type="button" class="mobile-menu-close">&times;</button>
</div>
<nav class="mobile-gnb">
<ul>
<?php
$result = sql_query($sql); // 위 쿼리 재사용
if(sql_num_rows($result) > 0) sql_data_seek($result, 0);
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>
</header>
@@ -0,0 +1,26 @@
document.addEventListener('DOMContentLoaded', function () {
const header = document.getElementById('site-header');
const trigger = document.querySelector('.mobile-menu-trigger');
const panel = document.querySelector('.mobile-menu-panel');
const closeBtn = document.querySelector('.mobile-menu-close');
// 스크롤 감지
window.addEventListener('scroll', function() {
if (window.scrollY > 50) {
header.classList.add('scrolled');
} else {
header.classList.remove('scrolled');
}
});
// 모바일 메뉴
if (trigger && panel && closeBtn) {
trigger.addEventListener('click', function () {
panel.classList.add('active');
});
closeBtn.addEventListener('click', function () {
panel.classList.remove('active');
});
}
});
@@ -0,0 +1,225 @@
/* Trend07 Header Style - PNS Style */
#site-header {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 90px;
background-color: transparent; /* 초기 투명 */
border-bottom: 1px solid rgba(255,255,255,0.2);
z-index: 1000;
transition: all 0.3s ease;
}
/* 스크롤 시 스타일 변경 (JS로 클래스 추가) */
#site-header.scrolled {
background-color: #fff;
height: 80px;
border-bottom: 1px solid #eee;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.header-inner {
max-width: 1600px;
margin: 0 auto;
height: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 40px;
}
.header-logo img {
height: 30px;
width: auto;
filter: brightness(0) invert(1); /* 초기 흰색 로고 */
transition: filter 0.3s;
}
#site-header.scrolled .header-logo img {
filter: none; /* 스크롤 시 원래 색상 */
}
.header-gnb ul {
display: flex;
gap: 50px;
margin: 0;
padding: 0;
list-style: none;
}
.header-gnb > ul > li {
position: relative;
}
.header-gnb a {
text-decoration: none;
color: #fff;
font-size: 16px;
font-weight: 500;
transition: color 0.3s;
display: block;
padding: 30px 0;
}
#site-header.scrolled .header-gnb a {
color: #333;
}
.header-gnb a:hover {
color: #009fe3; /* PNS Blue */
}
/* 2차 메뉴 (드롭다운) */
.sub-menu {
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
background: #fff;
min-width: 180px;
padding: 15px 0;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
border-top: 3px solid #009fe3;
opacity: 0;
visibility: hidden;
transition: all 0.3s;
display: block !important; /* flex 덮어쓰기 */
}
.header-gnb li:hover .sub-menu {
opacity: 1;
visibility: visible;
top: 80%;
}
.sub-menu li {
text-align: center;
}
.sub-menu a {
color: #555 !important;
padding: 10px 20px;
font-size: 14px;
}
.sub-menu a:hover {
background-color: #f9f9f9;
color: #009fe3 !important;
}
.header-utils ul {
display: flex;
align-items: center;
gap: 20px;
margin: 0;
padding: 0;
list-style: none;
}
.header-utils a, .header-utils button {
text-decoration: none;
color: #fff;
font-size: 13px;
background: none;
border: none;
cursor: pointer;
transition: color 0.3s;
}
#site-header.scrolled .header-utils a,
#site-header.scrolled .header-utils button {
color: #333;
}
.header-utils a:hover, .header-utils button:hover {
color: #009fe3;
}
/* 모바일 메뉴 */
.mobile-menu-trigger, .mobile-menu-panel {
display: none;
}
@media (max-width: 1024px) {
.header-gnb, .header-utils {
display: none;
}
.mobile-menu-trigger {
display: block;
width: 30px;
height: 20px;
position: relative;
background: none;
border: none;
cursor: pointer;
}
.mobile-menu-trigger span {
display: block;
width: 100%;
height: 2px;
background-color: #fff;
position: absolute;
left: 0;
transition: all 0.3s;
}
#site-header.scrolled .mobile-menu-trigger span {
background-color: #333;
}
.mobile-menu-trigger span:nth-child(1) { top: 0; }
.mobile-menu-trigger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.mobile-menu-trigger span:nth-child(3) { bottom: 0; }
.mobile-menu-panel {
display: block;
position: fixed;
top: 0;
right: -100%;
width: 100%;
height: 100%;
background: #fff;
z-index: 1100;
transition: right 0.4s ease;
padding: 20px;
}
.mobile-menu-panel.active {
right: 0;
}
.mobile-menu-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 40px;
border-bottom: 1px solid #eee;
padding-bottom: 20px;
}
.mobile-menu-close {
font-size: 30px;
background: none;
border: none;
cursor: pointer;
}
.mobile-gnb ul {
list-style: none;
padding: 0;
margin: 0;
}
.mobile-gnb a {
display: block;
padding: 15px 0;
font-size: 18px;
color: #333;
text-decoration: none;
border-bottom: 1px solid #f5f5f5;
}
}