리빌더 부분 추가
This commit is contained in:
221
rb/rb.latest.basic/latest.skin.php
Normal file
221
rb/rb.latest.basic/latest.skin.php
Normal file
@ -0,0 +1,221 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
|
||||
$rb_skin = sql_fetch (" select * from {$rb_module_table} where md_id = '{$options}' "); //최신글 환경설정 테이블 조회 (삭제금지)
|
||||
|
||||
$thumb_width = 32;
|
||||
$thumb_height = 32;
|
||||
$list_count = (is_array($list) && $list) ? count($list) : 0;
|
||||
|
||||
//모듈 타이틀이 설정되지 않은 경우 게시판 제목을 보여줍니다.
|
||||
if(isset($rb_skin['md_title']) && $rb_skin['md_title']) {
|
||||
$bo_subject = $rb_skin['md_title'];
|
||||
} else {
|
||||
$bo_subject = $rb_skin['md_title'];
|
||||
}
|
||||
|
||||
// 카테고리 출력옵션을 사용한 경우 카테고리 링크로 이동합니다.
|
||||
if (isset($rb_skin['md_sca']) && $rb_skin['md_sca']) {
|
||||
$links_url = get_pretty_url($bo_table, '', 'sca=' . urlencode($rb_skin['md_sca']));
|
||||
} else {
|
||||
$links_url = get_pretty_url($bo_table);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
모듈설정 연동 변수
|
||||
$rb_skin['md_id'] 설정ID
|
||||
$rb_skin['md_layout'] 레이아웃 섹션ID
|
||||
$rb_skin['md_layout_name'] 레이아웃 스킨명
|
||||
$rb_skin['md_theme'] 테마명
|
||||
$rb_skin['md_title'] 타이틀(제목)
|
||||
$rb_skin['md_bo_table'] 게시판ID
|
||||
$rb_skin['md_skin'] 스킨명
|
||||
$rb_skin['md_cnt'] 출력갯수
|
||||
$rb_skin['md_col'] 행갯수
|
||||
$rb_skin['md_row'] 열갯수
|
||||
$rb_skin['md_col_mo'] 행갯수(모바일)
|
||||
$rb_skin['md_row_mo'] 열갯수(모바일)
|
||||
$rb_skin['md_gap'] 게시물 간격(여백)
|
||||
$rb_skin['md_gap_mo'] 모바일 게시물 간격(여백)
|
||||
$rb_skin['md_width'] 가로사이즈
|
||||
$rb_skin['md_height'] 세로사이즈
|
||||
$rb_skin['md_auto_time'] 자동롤링 시간
|
||||
$rb_skin['md_thumb_is'] 썸네일 출력여부(1,0)
|
||||
$rb_skin['md_nick_is'] 닉네임 출력여부(1,0)
|
||||
$rb_skin['md_date_is'] 작성일 출력여부(1,0)
|
||||
$rb_skin['md_content_is'] 본문내용 출력여부(1,0)
|
||||
$rb_skin['md_icon_is'] 아이콘 출력여부(1,0)
|
||||
$rb_skin['md_comment_is'] 댓글수 출력여부(1,0)
|
||||
$rb_skin['md_swiper_is'] 스와이프 여부(1,0)
|
||||
$rb_skin['md_auto_is'] 자동롤링 여부(1,0)
|
||||
*/
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" href="<?php echo $latest_skin_url ?>/style.css?ver=<?php echo G5_SERVER_TIME ?>">
|
||||
|
||||
|
||||
<div class="bbs_main">
|
||||
|
||||
<!-- { -->
|
||||
<ul class="bbs_main_wrap_tit" style="display:<?php echo (isset($rb_skin['md_title_hide']) && $rb_skin['md_title_hide'] == '1') ? 'none' : 'block'; ?>">
|
||||
|
||||
<li class="bbs_main_wrap_tit_l">
|
||||
<!-- 타이틀 { -->
|
||||
<a href="<?php echo $links_url; ?>">
|
||||
<h2 class="<?php echo isset($rb_skin['md_title_font']) ? $rb_skin['md_title_font'] : 'font-B'; ?>" style="color:<?php echo isset($rb_skin['md_title_color']) ? $rb_skin['md_title_color'] : '#25282b'; ?>; font-size:<?php echo isset($rb_skin['md_title_size']) ? $rb_skin['md_title_size'] : '20'; ?>px; "><?php echo $bo_subject ?></h2>
|
||||
</a>
|
||||
<!-- } -->
|
||||
</li>
|
||||
|
||||
|
||||
<li class="bbs_main_wrap_tit_r">
|
||||
|
||||
<button type="button" class="more_btn" onclick="location.href='<?php echo $links_url; ?>';">더보기</button>
|
||||
|
||||
</li>
|
||||
|
||||
<div class="cb"></div>
|
||||
</ul>
|
||||
<!-- } -->
|
||||
|
||||
<!-- { -->
|
||||
<ul class="bbs_main_wrap_basic_main">
|
||||
|
||||
<div class="rb_swiper"
|
||||
id="rb_swiper_<?php echo $rb_skin['md_id'] ?>"
|
||||
data-pc-w="<?php echo $rb_skin['md_col'] ?>"
|
||||
data-pc-h="<?php echo $rb_skin['md_row'] ?>"
|
||||
data-mo-w="<?php echo $rb_skin['md_col_mo'] ?>"
|
||||
data-mo-h="<?php echo $rb_skin['md_row_mo'] ?>"
|
||||
data-pc-gap="<?php echo $rb_skin['md_gap'] ?>"
|
||||
data-mo-gap="<?php echo $rb_skin['md_gap_mo'] ?>"
|
||||
data-autoplay="<?php echo $rb_skin['md_auto_is'] ?>"
|
||||
data-autoplay-time="<?php echo $rb_skin['md_auto_time'] ?>"
|
||||
data-pc-swap="<?php echo $rb_skin['md_swiper_is'] ?>"
|
||||
data-mo-swap="<?php echo $rb_skin['md_swiper_is'] ?>"
|
||||
>
|
||||
<div class="rb_swiper_inner">
|
||||
<div class="rb-swiper-wrapper swiper-wrapper">
|
||||
|
||||
<?php
|
||||
for ($i=0; $i<$list_count; $i++) {
|
||||
|
||||
//썸네일
|
||||
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true);
|
||||
|
||||
//썸네일여부 확인
|
||||
if($thumb['src']) {
|
||||
$img = $thumb['src'];
|
||||
} else {
|
||||
$img = G5_THEME_URL.'/rb.img/no_image.png';
|
||||
$thumb['alt'] = '이미지가 없습니다.';
|
||||
}
|
||||
|
||||
//썸네일 출력 class="skin_list_image" 필수 (높이값 설정용)
|
||||
$img_content = '<img src="'.$img.'" alt="'.$thumb['alt'].'" class="skin_list_image">';
|
||||
|
||||
//게시물 링크
|
||||
$wr_href = get_pretty_url($bo_table, $list[$i]['wr_id']);
|
||||
$sec_txt = '<span style="opacity:0.6">작성자 및 관리자 외 열람할 수 없습니다.<br>비밀글 기능으로 보호된 글입니다.</span>';
|
||||
$wr_content = strip_tags($list[$i]['wr_content']);
|
||||
?>
|
||||
|
||||
|
||||
<!-- for { -->
|
||||
<!-- swiper-slide-모듈아이디 -->
|
||||
<div class="rb_swiper_list">
|
||||
|
||||
<div>
|
||||
|
||||
<ul class="rb_latest_basic_ul" onclick="location.href='<?php echo $wr_href ?>';">
|
||||
|
||||
<?php if($rb_skin['md_ca_is'] == 1 && $list[$i]['ca_name']) { //모듈설정:카테고리 출력여부(1,0) || 카테고리 있을때만?>
|
||||
<li class="cate_bg_ico"><a href="javascript:void(0);" class="rb_latest_basic_li_ca1"><?php echo $list[$i]['ca_name'] ?></a></li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($rb_skin['md_thumb_is'] == 1 && $thumb['src'] ) { //모듈설정:썸네일 출력여부(1,0)?>
|
||||
<li class="rb_latest_thumb_basic_wrap">
|
||||
<a href="<?php echo $wr_href ?>"><?php echo run_replace('thumb_image_tag', $img_content, $thumb); ?></a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<li class="subj_li" <?php if($rb_skin['md_ca_is'] != 1 || !$list[$i]['ca_name']) { ?>style="padding-left:0px;"<?php } ?>>
|
||||
<?php if($rb_skin['md_subject_is'] == 1) { //모듈설정:제목 출력여부(1,0) ?>
|
||||
<a href="javascript:void(0);" class="subj_cut font-B"><?php echo $list[$i]['subject'] ?></a>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($rb_skin['md_comment_is'] == 1) { //모듈설정:댓글 출력여부(1,0 || 댓글이 0개 이상인 경우)?>
|
||||
<?php if($list[$i]['comment_cnt']) { ?>
|
||||
<span class="comments_span font-B main_color">+<?php echo number_format($list[$i]['wr_comment']); ?></span>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($rb_skin['md_icon_is'] == 1) { //모듈설정:댓글 출력여부(1,0 || 댓글이 0개 이상인 경우)?>
|
||||
<?php if ($list[$i]['icon_new']) echo "<span class=\"lb_ico_new\">N</span>"; ?>
|
||||
<?php if ($list[$i]['icon_hot']) echo "<span class=\"lb_ico_hot\">H</span>"; ?>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<div class="cb"></div>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<?php if($rb_skin['md_date_is'] == 1) { //모듈설정:작성일 출력여부(1,0)?>
|
||||
<li class="rb_latest_basic_ul_li_last"><?php echo passing_time3($list[$i]['wr_datetime']) ?> </li>
|
||||
<?php } ?>
|
||||
<?php if($rb_skin['md_nick_is'] == 1) { //모듈설정:작성자 출력여부(1,0)?>
|
||||
<li class="rb_latest_basic_ul_li_last"><?php echo get_text($list[$i]['wr_name']); ?></li>
|
||||
<?php } ?>
|
||||
|
||||
</ul>
|
||||
|
||||
<?php if($rb_skin['md_content_is'] == 1) { //모듈설정:본문 출력여부(1,0)?>
|
||||
<ul>
|
||||
<?php if (strstr($list[$i]['wr_option'], 'secret')) { ?>
|
||||
<li class="bbs_main_wrap_con_cont">
|
||||
<?php echo $sec_txt; ?>
|
||||
</li>
|
||||
<?php } else { ?>
|
||||
<li class="bbs_main_wrap_con_cont cut2">
|
||||
<a href="<?php echo $wr_href ?>"><?php echo $wr_content; ?></a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<div class="cb"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- } -->
|
||||
|
||||
<?php } ?>
|
||||
<?php if ($list_count == 0) { //게시물이 없을 때 ?>
|
||||
<div class="no_data" style="width:100% !important;">데이터가 없습니다.</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($rb_skin['md_swiper_is'] == 1) { //모듈설정:스와이프 사용여부(1,0)?>
|
||||
<div class="rb_swiper_paging_btn" style="display:<?php echo (isset($rb_skin['md_title_hide']) && $rb_skin['md_title_hide'] == '1') ? 'none' : 'block'; ?>">
|
||||
<!-- 좌우 페이징 { -->
|
||||
<button type="button" class="swiper-button-prev rb-swiper-prev">
|
||||
<img src="<?php echo G5_THEME_URL ?>/rb.img/icon/arr_prev.svg">
|
||||
</button>
|
||||
<button type="button" class="swiper-button-next rb-swiper-next">
|
||||
<img src="<?php echo G5_THEME_URL ?>/rb.img/icon/arr_next.svg">
|
||||
</button>
|
||||
<!-- } -->
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
51
rb/rb.latest.basic/style.css
Normal file
51
rb/rb.latest.basic/style.css
Normal file
@ -0,0 +1,51 @@
|
||||
@charset "utf-8";
|
||||
|
||||
|
||||
.bbs_main_wrap_basic_main {box-sizing: border-box; width: 100%;}
|
||||
.bbs_main_wrap_basic_main dd {position: relative; position: relative;}
|
||||
.bbs_main_wrap_basic_main dd:last-child {margin-bottom: 0px;}
|
||||
.bbs_main_wrap_basic_main .bbs_main_wrap_con_ul1 {width: 70px; height:70px; position: absolute; top:0px; right:0px;}
|
||||
.bbs_main_wrap_basic_main .bbs_main_wrap_con_ul1 img {width: 100%; height:100%; border-radius: 10px; object-fit: cover;}
|
||||
.bbs_main_wrap_basic_main .bbs_main_wrap_con_ul2 {width: 100%; padding-right: 100px; min-height: 75px;}
|
||||
.bbs_main_wrap_basic_main .bbs_main_wrap_con_subj {font-size: 18px;}
|
||||
.bbs_main_wrap_basic_main .bbs_main_wrap_con_subj span {font-size: 14px; display: block; color:#999; margin-bottom: 5px;}
|
||||
.bbs_main_wrap_basic_main .bbs_main_wrap_con_cont {word-break: keep-all; margin-top: 10px;}
|
||||
.bbs_main_wrap_basic_main .bbs_main_wrap_con_cont a {color:#999; font-size: 13px;}
|
||||
.bbs_main_wrap_basic_main .bbs_main_wrap_con_info {font-size: 12px; color:#999; margin-top: 5px;}
|
||||
.bbs_main_wrap_basic_main .bbs_main_wrap_con_writer {margin-top: 10px;}
|
||||
.bbs_main_wrap_basic_main .bbs_main_wrap_con_writer span {display: inline-block;}
|
||||
.bbs_main_wrap_basic_main .prof_tiny_image img {width: 30px; height:auto; border-radius: 50%; margin-right: 5px;}
|
||||
.bbs_main_wrap_basic_main .prof_tiny_name {font-size: 12px; color:#999; line-height: 20px; margin-right: 10px;}
|
||||
.bbs_main_wrap_basic_main .bbs_list_label {line-height: 17px; font-size: 11px; border-radius: 4px; padding-left: 5px; padding-right: 5px;}
|
||||
|
||||
.bbs_main_wrap_basic_main .bbs_list_label.label1 {background-color: #FFC700; color:#fff;}
|
||||
.bbs_main_wrap_basic_main .bbs_list_label.label2 {background-color: #00A3FF; color:#fff;}
|
||||
.bbs_main_wrap_basic_main .bbs_list_label.label3 {background-color: #8ED100; color:#fff;}
|
||||
.bbs_main_wrap_basic_main .bbs_list_label.label4 {background-color: #AA20FF; color:#fff;}
|
||||
.bbs_main_wrap_basic_main .bbs_list_label.label5 {background-color: #25282B; color:#fff;}
|
||||
.bbs_main_wrap_basic_main .bbs_list_label.label6 {background-color: #D6DCE0; color:#000;}
|
||||
|
||||
.bbs_main_wrap_basic_main .rb_latest_basic_ul {display: flex;gap: 5px;align-items: center;width: 100%; padding-top: 0px; border-top: 0px; cursor: pointer;}
|
||||
.bbs_main_wrap_basic_main .rb_latest_basic_ul li {flex-grow: 0;white-space: nowrap; align-items: center;}
|
||||
.bbs_main_wrap_basic_main .rb_latest_basic_ul li.subj_li {flex-grow: 1;min-width: 0;white-space: nowrap;overflow: hidden;text-overflow:ellipsis;padding-left: 10px;}
|
||||
.bbs_main_wrap_basic_main .rb_latest_basic_ul li a.subj_cut {font-size: 16px;display: block;text-overflow: ellipsis;overflow: hidden;white-space: nowrap;max-width: 70%;float:left;margin-right: 5px;}
|
||||
.bbs_main_wrap_basic_main .rb_latest_basic_ul li.rb_latest_basic_ul_li_last {margin-left: auto;white-space: nowrap; color:#888; font-size: 13px;}
|
||||
.bbs_main_wrap_basic_main .rb_latest_basic_li_ca1 {text-align: center; }
|
||||
.bbs_main_wrap_basic_main .rb_latest_basic_li_ca2 {color: #999;border: 1px solid #ddd;padding: 5px 15px 5px 15px;border-radius: 30px;font-size: 14px;text-align: center;}
|
||||
.bbs_main_wrap_basic_main .rb_latest_basic_ul .lb_ico_new {background-color: #8ED100;color: #fff;font-size: 9px;padding: 4px 5px;border-radius: 4px;display: inline-block;line-height: 100%; vertical-align:top; margin-top:0px;}
|
||||
.bbs_main_wrap_basic_main .rb_latest_basic_ul .lb_ico_hot {background-color: #FFC700;color: #fff;font-size: 9px;padding: 4px 5px;border-radius: 4px;display: inline-block;line-height: 100%; vertical-align:top; margin-top:0px;}
|
||||
.bbs_main_wrap_basic_main dd:last-child ul {border-bottom: 0px; padding-bottom: 0px;}
|
||||
.bbs_main_wrap_basic_main .rb_latest_thumb_basic_wrap img {border-radius: 10px; height: 34px; width: 34px; object-fit: cover;}
|
||||
.bbs_main_wrap_basic_main .rb_latest_thumb_basic_wrap {padding-right: 10px; padding-right: 10px; min-width: 42px; max-width: 34px;}
|
||||
.bbs_main_wrap_basic_main .comments_span {margin-right: 10px;}
|
||||
.bbs_main_wrap_basic_main .cate_bg_ico {background-color: #D9D9D9;color: #fff;padding: 5px 15px 5px 15px;border-radius: 30px;font-size: 14px;text-align: center;}
|
||||
.bbs_main_wrap_basic_main .cate_bg_ico a {color:#fff;}
|
||||
/* } */
|
||||
|
||||
@media all and (max-width:1024px) {
|
||||
.bbs_main_wrap_basic_main .bbs_main_wrap_con_ul2 {width: 100%; float:none; padding-right: 120px;}
|
||||
.bbs_main_wrap_basic_main .bbs_main_wrap_con_ul1 {float:none; width: auto; padding-left: 0px; position: absolute; top:30px; right:0px;}
|
||||
.bbs_main_wrap_basic_main .bbs_main_wrap_con_ul1 img {height:100px; width: auto;}
|
||||
.bbs_main_wrap_basic_main .rb_latest_basic_li_ca2 {display: none;}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user