first commit 2
This commit is contained in:
@@ -0,0 +1,170 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 레이아웃 폴더내 style.css 파일
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_THEME_URL.'/rb.layout_hd/'.$rb_core['layout_hd'].'/style.css?ver='.G5_TIME_YMDHIS.'">', 0);
|
||||
?>
|
||||
|
||||
<!-- Modern Minimal Header -->
|
||||
<header id="header" class="modern-minimal-header">
|
||||
<div class="header-container">
|
||||
<div class="header-content">
|
||||
<!-- 로고 -->
|
||||
<div class="logo-section">
|
||||
<a href="<?php echo G5_URL ?>" class="logo-link">
|
||||
<?php if (!empty($rb_builder['bu_logo_pc']) && !empty($rb_builder['bu_logo_pc_w'])) { ?>
|
||||
<img src="<?php echo G5_URL ?>/data/logos/pc?ver=<?php echo G5_SERVER_TIME ?>" alt="<?php echo $config['cf_title']; ?>" class="logo-img">
|
||||
<?php } else { ?>
|
||||
<img src="<?php echo G5_THEME_URL ?>/rb.img/logos/pc.png?ver=<?php echo G5_SERVER_TIME ?>" alt="<?php echo $config['cf_title']; ?>" class="logo-img">
|
||||
<?php } ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- 네비게이션 -->
|
||||
<nav class="main-navigation">
|
||||
<ul class="nav-menu">
|
||||
<?php
|
||||
if(IS_MOBILE()) {
|
||||
$menu_datas = get_menu_db(1, true);
|
||||
} else {
|
||||
$menu_datas = get_menu_db(0, true);
|
||||
}
|
||||
|
||||
$gnb_zindex = 999;
|
||||
$i = 0;
|
||||
foreach($menu_datas as $row) {
|
||||
if(empty($row)) continue;
|
||||
|
||||
// 1차 메뉴 권한 체크
|
||||
if (!$is_admin && isset($row['me_level']) && $row['me_level'] > 0) {
|
||||
if (isset($row['me_level_opt']) && $row['me_level_opt'] == 2) {
|
||||
if ($row['me_level'] != $member['mb_level']) continue;
|
||||
} else {
|
||||
if ($row['me_level'] > $member['mb_level']) continue;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<li class="nav-item">
|
||||
<a href="<?php echo $row['me_link']; ?>" target="_<?php echo $row['me_target']; ?>" class="nav-link"><?php echo $row['me_name'] ?></a>
|
||||
<?php
|
||||
$k = 0;
|
||||
foreach((array)$row['sub'] as $row2) {
|
||||
if(empty($row2)) continue;
|
||||
|
||||
// 2차 메뉴 권한 체크
|
||||
if (!$is_admin && isset($row2['me_level']) && $row2['me_level'] > 0) {
|
||||
if (isset($row2['me_level_opt']) && $row2['me_level_opt'] == 2) {
|
||||
if ($row2['me_level'] != $member['mb_level']) continue;
|
||||
} else {
|
||||
if ($row2['me_level'] > $member['mb_level']) continue;
|
||||
}
|
||||
}
|
||||
|
||||
if($k == 0)
|
||||
echo '<ul class="sub-menu">'.PHP_EOL;
|
||||
?>
|
||||
<li><a href="<?php echo $row2['me_link']; ?>" target="_<?php echo $row2['me_target']; ?>" class="sub-link"><?php echo $row2['me_name'] ?></a></li>
|
||||
<?php
|
||||
$k++;
|
||||
}
|
||||
|
||||
if($k > 0)
|
||||
echo '</ul>'.PHP_EOL;
|
||||
?>
|
||||
</li>
|
||||
<?php
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($i == 0) {
|
||||
?>
|
||||
<li class="nav-item"><a href="javascript:void(0);" class="nav-link">메뉴 준비 중입니다.</a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<!-- 헤더 액션 -->
|
||||
<div class="header-actions">
|
||||
<!-- 검색 -->
|
||||
<div class="search-section">
|
||||
<button type="button" class="search-btn" id="search_btn">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M8.5 1C4.36 1 1 4.36 1 8.5S4.36 16 8.5 16c1.84 0 3.52-.65 4.85-1.73L18.5 19.5L19.5 18.5L13.27 12.35C14.35 11.02 15 9.34 15 8.5C15 4.36 11.64 1 8.5 1ZM8.5 14C5.46 14 3 11.54 3 8.5S5.46 3 8.5 3S14 5.46 14 8.5S11.54 14 8.5 14Z" fill="currentColor"/>
|
||||
</svg>
|
||||
</button>
|
||||
<div class="search-box" id="search_box">
|
||||
<form name="fsearchbox" method="get" action="<?php echo G5_BBS_URL ?>/search.php" onsubmit="return fsearchbox_submit(this);">
|
||||
<input type="text" name="stx" maxlength="20" class="search-input" placeholder="검색어를 입력하세요">
|
||||
<button type="submit" class="search-submit">검색</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 회원 정보 -->
|
||||
<div class="member-section">
|
||||
<?php if($is_member) { ?>
|
||||
<div class="member-info">
|
||||
<span class="member-name"><?php echo $member['mb_nick'] ?></span>
|
||||
<span class="member-point"><?php echo number_format($member['mb_point']); ?>P</span>
|
||||
</div>
|
||||
<div class="member-actions">
|
||||
<a href="<?php echo G5_BBS_URL ?>/memo.php" class="action-btn" onclick="win_memo(this.href); return false;">
|
||||
<svg width="18" height="18" viewBox="0 0 18 18" fill="none">
|
||||
<path d="M15.27 2.34L2.68 6.89L6.87 9.32L10.57 5.62C10.76 5.43 11.02 5.32 11.28 5.32C11.54 5.32 11.8 5.43 11.99 5.62C12.18 5.81 12.28 6.06 12.28 6.33C12.28 6.6 12.18 6.85 11.99 7.03L8.29 10.73L10.72 14.93L15.27 2.34Z" fill="currentColor"/>
|
||||
</svg>
|
||||
<?php if($memo_not_read > 0) { ?>
|
||||
<span class="badge"><?php echo $memo_not_read ?></span>
|
||||
<?php } ?>
|
||||
</a>
|
||||
<a href="<?php echo G5_BBS_URL ?>/logout.php" class="action-btn">로그아웃</a>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="auth-actions">
|
||||
<a href="<?php echo G5_BBS_URL ?>/login.php" class="auth-btn login-btn">로그인</a>
|
||||
<a href="<?php echo G5_BBS_URL ?>/register.php" class="auth-btn register-btn">회원가입</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<!-- 모바일 메뉴 토글 -->
|
||||
<button type="button" class="mobile-menu-btn" id="mobile_menu_btn">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// 검색 기능
|
||||
$('#search_btn').click(function() {
|
||||
$('#search_box').toggleClass('active');
|
||||
if ($('#search_box').hasClass('active')) {
|
||||
$('.search-input').focus();
|
||||
}
|
||||
});
|
||||
|
||||
// 모바일 메뉴
|
||||
$('#mobile_menu_btn').click(function() {
|
||||
$('.main-navigation').toggleClass('mobile-active');
|
||||
$(this).toggleClass('active');
|
||||
});
|
||||
|
||||
// 검색 폼 제출
|
||||
function fsearchbox_submit(f) {
|
||||
var stx = f.stx.value.trim();
|
||||
if (stx.length < 2) {
|
||||
alert("검색어는 두글자 이상 입력해주세요.");
|
||||
f.stx.select();
|
||||
f.stx.focus();
|
||||
return false;
|
||||
}
|
||||
f.stx.value = stx;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,416 @@
|
||||
/* Modern Minimal Header Styles */
|
||||
|
||||
.modern-minimal-header {
|
||||
background: var(--bg-primary);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
backdrop-filter: blur(10px);
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
}
|
||||
|
||||
.header-container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 var(--spacing-md);
|
||||
}
|
||||
|
||||
.header-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 70px;
|
||||
}
|
||||
|
||||
/* 로고 섹션 */
|
||||
.logo-section {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.logo-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.logo-img {
|
||||
height: 40px;
|
||||
width: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
/* 네비게이션 */
|
||||
.main-navigation {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.nav-menu {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
gap: var(--spacing-xl);
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
display: block;
|
||||
padding: var(--spacing-sm) 0;
|
||||
color: var(--text-primary);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
transition: color 0.3s ease;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nav-link:hover {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.nav-link::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -5px;
|
||||
left: 0;
|
||||
width: 0;
|
||||
height: 2px;
|
||||
background: var(--primary-color);
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
|
||||
.nav-link:hover::after {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 서브메뉴 */
|
||||
.sub-menu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
background: var(--bg-primary);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--shadow-lg);
|
||||
min-width: 200px;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transform: translateY(-10px);
|
||||
transition: all 0.3s ease;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: var(--spacing-sm) 0;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
.nav-item:hover .sub-menu {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.sub-link {
|
||||
display: block;
|
||||
padding: var(--spacing-sm) var(--spacing-md);
|
||||
color: var(--text-secondary);
|
||||
text-decoration: none;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.sub-link:hover {
|
||||
background: var(--bg-secondary);
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
/* 헤더 액션 */
|
||||
.header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
/* 검색 섹션 */
|
||||
.search-section {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
padding: var(--spacing-sm);
|
||||
cursor: pointer;
|
||||
color: var(--text-secondary);
|
||||
transition: color 0.3s ease;
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
.search-btn:hover {
|
||||
color: var(--primary-color);
|
||||
background: var(--bg-secondary);
|
||||
}
|
||||
|
||||
.search-box {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
background: var(--bg-primary);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--shadow-lg);
|
||||
padding: var(--spacing-md);
|
||||
min-width: 300px;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transform: translateY(-10px);
|
||||
transition: all 0.3s ease;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
.search-box.active {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.search-input {
|
||||
width: 100%;
|
||||
padding: var(--spacing-sm);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 0.875rem;
|
||||
margin-bottom: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.search-submit {
|
||||
width: 100%;
|
||||
padding: var(--spacing-sm);
|
||||
background: var(--primary-color);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: var(--radius-sm);
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: background 0.3s ease;
|
||||
}
|
||||
|
||||
.search-submit:hover {
|
||||
background: var(--secondary-color);
|
||||
}
|
||||
|
||||
/* 회원 섹션 */
|
||||
.member-section {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.member-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
margin-right: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.member-name {
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.member-point {
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.member-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: var(--spacing-xs) var(--spacing-sm);
|
||||
color: var(--text-secondary);
|
||||
text-decoration: none;
|
||||
border-radius: var(--radius-sm);
|
||||
transition: all 0.3s ease;
|
||||
position: relative;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.action-btn:hover {
|
||||
color: var(--primary-color);
|
||||
background: var(--bg-secondary);
|
||||
}
|
||||
|
||||
.badge {
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
right: -5px;
|
||||
background: var(--error-color);
|
||||
color: white;
|
||||
font-size: 0.625rem;
|
||||
padding: 2px 6px;
|
||||
border-radius: 10px;
|
||||
min-width: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 인증 버튼 */
|
||||
.auth-actions {
|
||||
display: flex;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.auth-btn {
|
||||
padding: var(--spacing-xs) var(--spacing-md);
|
||||
border-radius: var(--radius-sm);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
font-size: 0.875rem;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
color: var(--text-secondary);
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.login-btn:hover {
|
||||
color: var(--primary-color);
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
|
||||
.register-btn {
|
||||
background: var(--primary-color);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.register-btn:hover {
|
||||
background: var(--secondary-color);
|
||||
}
|
||||
|
||||
/* 모바일 메뉴 버튼 */
|
||||
.mobile-menu-btn {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: var(--spacing-sm);
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.mobile-menu-btn span {
|
||||
width: 20px;
|
||||
height: 2px;
|
||||
background: var(--text-primary);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.mobile-menu-btn.active span:nth-child(1) {
|
||||
transform: rotate(45deg) translate(5px, 5px);
|
||||
}
|
||||
|
||||
.mobile-menu-btn.active span:nth-child(2) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.mobile-menu-btn.active span:nth-child(3) {
|
||||
transform: rotate(-45deg) translate(7px, -6px);
|
||||
}
|
||||
|
||||
/* 반응형 디자인 */
|
||||
@media (max-width: 768px) {
|
||||
.header-content {
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.main-navigation {
|
||||
position: fixed;
|
||||
top: 60px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background: var(--bg-primary);
|
||||
border-top: 1px solid var(--border-color);
|
||||
box-shadow: var(--shadow-lg);
|
||||
transform: translateY(-100%);
|
||||
transition: transform 0.3s ease;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.main-navigation.mobile-active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.nav-menu {
|
||||
flex-direction: column;
|
||||
padding: var(--spacing-md);
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.nav-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
padding: var(--spacing-md);
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sub-menu {
|
||||
position: static;
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: none;
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
background: var(--bg-secondary);
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.mobile-menu-btn {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
min-width: 250px;
|
||||
right: -50px;
|
||||
}
|
||||
|
||||
.member-info {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.auth-actions {
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-xs);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.header-container {
|
||||
padding: 0 var(--spacing-sm);
|
||||
}
|
||||
|
||||
.search-box {
|
||||
min-width: 200px;
|
||||
right: -100px;
|
||||
}
|
||||
|
||||
.logo-img {
|
||||
height: 35px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user