Compare commits
7 Commits
new_layout
...
fg-mid-ban
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f0f32b3e2 | |||
| e625446711 | |||
| bccf145cf1 | |||
| 999219f2ec | |||
| 2ba6a6fb61 | |||
| c78f5557bb | |||
| 1154d140c1 |
20
rb/rb.widget/rb.fg_banner/style.css
Normal file
20
rb/rb.widget/rb.fg_banner/style.css
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
@charset "utf-8";
|
||||||
|
|
||||||
|
.fg_icon_menu {box-sizing: border-box; margin: 0px auto; width: 100%; background-color: #F3F3F3; padding-top: 50px; padding-bottom: 50px;}
|
||||||
|
.fg_icon_menu .fg_icon_menu_inner {position: relative; margin: 0px auto;}
|
||||||
|
|
||||||
|
.theme_btns {width:100%; height:120px; border-radius: 10px; border:0px; background-repeat: no-repeat; background-size: cover; background-position: 0px 0px; display: flex; align-items: center; color:#fff; font-size: 20px; padding-left: 40px; padding-right: 40px; text-align: left;}
|
||||||
|
.theme_btns img {border:0px !important;}
|
||||||
|
.theme_btns span:nth-child(2) {margin-left: auto; height:20px;}
|
||||||
|
|
||||||
|
@media all and (max-width:1024px) {
|
||||||
|
.fg_icon_menu .fg_icon_menu_inner {width: 100% !important; }
|
||||||
|
.fg_icon_menu .rb_swipper_inner {padding-left: 20px; padding-right:20px; }
|
||||||
|
.fg_icon_menu .rb_swiper_paging_btn {top:14px;}
|
||||||
|
.fg_icon_menu .rb-swiper-slide {width: 100%;}
|
||||||
|
.fg_icon_menu .rb-swiper-slide {width: 100% !important;}
|
||||||
|
.fg_icon_menu .bbs_main_wrap_thumb_top_con {width: 100% !important;}
|
||||||
|
}
|
||||||
|
@media all and (max-width:768px) {
|
||||||
|
.fg_icon_menu .fg_icon_menu_inner {width: 100% !important;}
|
||||||
|
}
|
||||||
62
rb/rb.widget/rb.fg_banner/widget.php
Normal file
62
rb/rb.widget/rb.fg_banner/widget.php
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
?>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="<?php echo G5_URL ?>/rb/rb.widget/rb.fg_icon_menu/style.css?ver=<?php echo G5_TIME_YMDHIS ?>">
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
경로 : /rb/rb.widget/rb.icon_menu/
|
||||||
|
사용자코드를 입력하세요.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<div class="fg_icon_menu">
|
||||||
|
|
||||||
|
<div class="fg_icon_menu_inner" style="width:<?php echo $rb_core['main_width'] ?>px;">
|
||||||
|
<div class="rb_swiper" id="rb_swiper_<?php echo $rb_skin['md_id'] ?>_btm" data-pc-w="3" data-pc-h="2" data-mo-w="1" data-mo-h="1" data-pc-gap="30" data-mo-gap="20" data-autoplay="1" data-autoplay-time="4000" data-pc-swap="0" data-mo-swap="1">
|
||||||
|
|
||||||
|
<div class="rb_swiper_inner">
|
||||||
|
<div class="rb-swiper-wrapper swiper-wrapper">
|
||||||
|
<div class="rb_swiper_list">
|
||||||
|
<button type="button" class="theme_btns" style="background-image:url('<?php echo G5_THEME_URL ?>/rb.img/theme1_bg.png');" onclick="window.open('/VR/2019(day).html');">
|
||||||
|
<span>23가지 테마가 있는<br>퍼스트가든</span>
|
||||||
|
<span><img src="<?php echo G5_THEME_URL ?>/rb.img/vr_ico.svg"></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="rb_swiper_list">
|
||||||
|
<button type="button" class="theme_btns" style="background-image:url('<?php echo G5_THEME_URL ?>/rb.img/theme2_bg.png');" onclick="window.open('/VR/2019(night).html');">
|
||||||
|
<span>별빛이 흐르는<br>퍼스트가든</span>
|
||||||
|
<span><img src="<?php echo G5_THEME_URL ?>/rb.img/vr_ico.svg"></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="rb_swiper_list">
|
||||||
|
<button type="button" class="theme_btns" style="background-image:url('<?php echo G5_THEME_URL ?>/rb.img/theme3_bg.png');" onclick="location.href='<?php echo G5_URL ?>/content/edu1';">
|
||||||
|
<span>교육과 체험이 있는<br>퍼스트가든</span>
|
||||||
|
<span><img src="<?php echo G5_THEME_URL ?>/rb.img/right_ico.svg"></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="rb_swiper_list">
|
||||||
|
<button type="button" class="theme_btns" style="background-image:url('<?php echo G5_THEME_URL ?>/rb.img/theme4_bg.png');" onclick="location.href='<?php echo G5_URL ?>/facilities';">
|
||||||
|
<span>볼거리와 즐길거리가 있는<br>퍼스트가든</span>
|
||||||
|
<span><img src="<?php echo G5_THEME_URL ?>/rb.img/right_ico.svg"></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="rb_swiper_list">
|
||||||
|
<button type="button" class="theme_btns" style="background-image:url('<?php echo G5_THEME_URL ?>/rb.img/theme5_bg.png');" onclick="location.href='<?php echo G5_URL ?>/dining';">
|
||||||
|
<span>맛있는 먹을거리가 있는<br>퍼스트가든</span>
|
||||||
|
<span><img src="<?php echo G5_THEME_URL ?>/rb.img/right_ico.svg"></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="rb_swiper_list">
|
||||||
|
<button type="button" class="theme_btns" style="background-image:url('<?php echo G5_THEME_URL ?>/rb.img/theme6_bg.png');" onclick="location.href='<?php echo G5_URL ?>/news';">
|
||||||
|
<span>365일 쉬지 않는<br>퍼스트가든</span>
|
||||||
|
<span><img src="<?php echo G5_THEME_URL ?>/rb.img/right_ico.svg"></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
@ -107,6 +107,46 @@ $rb_skin['md_auto_is'] 자동롤링 여부(1,0)
|
|||||||
<div class="rb-swiper-wrapper swiper-wrapper">
|
<div class="rb-swiper-wrapper swiper-wrapper">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
$todays = date('Y-m-d');
|
||||||
|
|
||||||
|
foreach ($list as &$item) {
|
||||||
|
$start_date = $item['wr_1'] ?? '';
|
||||||
|
$end_date = $item['wr_2'] ?? '';
|
||||||
|
|
||||||
|
// 상태 및 정렬 우선순위 설정
|
||||||
|
if ($start_date && $end_date) {
|
||||||
|
if ($todays < $start_date) {
|
||||||
|
$item['_status'] = '예정'; // 예정
|
||||||
|
$item['_sort'] = 0;
|
||||||
|
} elseif ($todays > $end_date) {
|
||||||
|
$item['_status'] = '종료'; // 종료
|
||||||
|
$item['_sort'] = 3;
|
||||||
|
} else {
|
||||||
|
$item['_status'] = '진행'; // 진행 중
|
||||||
|
$item['_sort'] = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$item['_status'] = '기타';
|
||||||
|
$item['_sort'] = 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 시작일 없을 경우를 고려한 비교용 날짜 (미입력 시 최후순)
|
||||||
|
$item['_start_date'] = $start_date ? $start_date : '9999-99-99';
|
||||||
|
}
|
||||||
|
unset($item);
|
||||||
|
|
||||||
|
// 정렬: 상태 우선순위(_sort) → 시작일(_start_date)
|
||||||
|
usort($list, function ($a, $b) {
|
||||||
|
if ($a['_sort'] === $b['_sort']) {
|
||||||
|
// 시작일이 빠른 순서대로 하려는 경우 a, b의 순서를 변경하면 됨
|
||||||
|
return strcmp($b['_start_date'], $a['_start_date']);
|
||||||
|
}
|
||||||
|
return $a['_sort'] <=> $b['_sort'];
|
||||||
|
});
|
||||||
|
|
||||||
|
// 정렬 후 list_count 재설정
|
||||||
|
$list_count = count($list);
|
||||||
|
|
||||||
for ($i=0; $i<$list_count; $i++) {
|
for ($i=0; $i<$list_count; $i++) {
|
||||||
|
|
||||||
//썸네일
|
//썸네일
|
||||||
@ -139,17 +179,16 @@ $rb_skin['md_auto_is'] 자동롤링 여부(1,0)
|
|||||||
$end_date = isset($list[$i]['wr_2']) ? $list[$i]['wr_2'] : '';
|
$end_date = isset($list[$i]['wr_2']) ? $list[$i]['wr_2'] : '';
|
||||||
$rb_ev_ico = '';
|
$rb_ev_ico = '';
|
||||||
|
|
||||||
if($start_date && $end_date) {
|
switch ($list[$i]['_status']) {
|
||||||
if ($todays < $start_date) {
|
case '예정':
|
||||||
// 진행 전
|
|
||||||
$rb_ev_ico = '<span class="rb_latest_event_label ev_label1 font-R" style="opacity:0.5;">예정</span>';
|
$rb_ev_ico = '<span class="rb_latest_event_label ev_label1 font-R" style="opacity:0.5;">예정</span>';
|
||||||
} elseif ($todays > $end_date) {
|
break;
|
||||||
// 종료
|
case '종료':
|
||||||
$rb_ev_ico = '<span class="rb_latest_event_label ev_label2 font-R">종료</span>';
|
$rb_ev_ico = '<span class="rb_latest_event_label ev_label2 font-R">종료</span>';
|
||||||
} else {
|
break;
|
||||||
// 진행 중
|
case '진행':
|
||||||
$rb_ev_ico = '<span class="rb_latest_event_label main_rb_bg color-fff font-R">진행</span>';
|
$rb_ev_ico = '<span class="rb_latest_event_label main_rb_bg color-fff font-R">진행</span>';
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user