메인페이지 최신글 두 가지 버전 사용 채택완료
안녕하세요.
해당 링크에 있는 최신글 스킨 사용해서 두 가지 버전으로 최신글을 사용하고 싶습니다.

상단 최신글 부분 css 적용했을 때의 모습입니다.

하단 최신글 css 적용했을 때 모습입니다.
css 경로 설정이 계속 겹치는데 어떻게 수정해야 할까요?
상단 최신글 css링크
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
$thumb_width = 394;
$thumb_height = 300;
?>
<link rel="stylesheet" href="<?php echo G5_THEME_LATEST_URL ?>/swiper_card2/dist/css/swiper.min.css">
<link rel="stylesheet" href="<?php echo $latest_skin_url ?>/dist/css/swiper.min.css">
<script src="<?php echo $latest_skin_url ?>/dist/js/swiper.min.js"></script>
하단 최신글 css 링크
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
$thumb_width = 394;
$thumb_height = 300;
?>
<link rel="stylesheet" href="<?php echo G5_THEME_LATEST_URL ?>/swiper_card22/dist/css/swiper.min.css">
<link rel="stylesheet" href="<?php echo $latest_skin_url ?>/dist/css/swiper.min.css">
<script src="<?php echo $latest_skin_url ?>/dist/js/swiper.min.js"></script>
답변 2개
.pic_lt { ... }
차이가 나는 css가 이것이라고 했을 때, 최신글 들어 가는 컨테이너에 id 값을 주는데
하나는
#aaaa .pic_lt { ... }
다른 하나는
#bbb .pic_lt { ... }
이렇게 해 보세요.
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
css 내용을 봐야겠죠.
쉽게는 최신글 스킨 폴더를 복사해서 하나 더 만드시고, css가
#aaa .class-a .class-b
이런 식이면
하나는
#aaa .class-a .class-b { ... }
다른 하나는
#bbb .class-a .class-b { ... }
이런 식으로 해 볼 수 있겠네요.
답변에 대한 댓글 4개
하단의 최신글은 [ swiper_card22 ] 폴더로 설정해둔 상태입니다.
상단 최신글의 css는 [ swiper_card2 ] 폴더 안에 있는 css파일을 수정 했고,
하단 최신글의 css는 [ swiper_card22 ] 폴더 안에 있는 css파일을 수정했습니다.
[ swiper_card2 ] css 작업을 마친 뒤에, [ swiper_card22 ] css작업을 했더니
아래 그림처럼 하단 [ swiper_card22 ] css 설정으로 중복 적용이 되고,
[ swiper_card2 ]의 css는 무시됩니다.
링크 연결 문제같은데 어느 부분을 수정해야 할 지 모르겠어서요.
@charset "utf-8";
/* 새글 스킨 (latest) */
.pic_lt{position:relative;margin-bottom:10px;overflow:hidden;background:#fff}
.pic_lt .lat_title {display:block;background:#fcfcfc;padding:0 20px;line-height:35px;font-size:16px;color:#253dbe;}
.pic_lt .lat_title a{color:#253dbe;display:inline-block;position:relative}
.pic_lt .lat_title a:after{position:absolute;bottom:-1px;left:0;width:100%;height:2px;background:#253dbe;content:''}
.pic_lt .lt_more {position:absolute;top:11px;right:10px;display:block;width:25px;line-height:25px;color:#aaa;border-radius:3px;text-align:center;}
.pic_lt .lt_more:hover{color:#777}
.pic_lt ul:after {display:block;visibility:hidden;clear:both;content:""}
.pic_lt ul{padding:10px 15px; }
.pic_lt li{float:left;width:50%;padding:0 10px}
.pic_lt li .lt_img{margin:5px 0;display:block}
.pic_lt li .lt_img img{width:100%;height:auto}
.pic_lt li a:hover{color:#a22121}
.pic_lt li .fa-heart{color:#ff0000;}
.pic_lt li .fa-lock{display: inline-block;line-height: 14px;width: 16px;font-size: 0.833em;color: #4f818c;background: #cbe3e8;text-align: center;border-radius: 2px;font-size: 12px;border:1px solid #a2c6ce}
.pic_lt li .new_icon{display:inline-block;width: 16px;line-height:16px ;font-size:0.833em;color:#ffff00;background:#6db142;text-align:center;border-radius: 2px;}
.pic_lt li .hot_icon{display:inline-block;width: 16px;line-height:16px ;font-size:0.833em;color:#fff;background:#e52955;text-align:center;border-radius: 2px;}
.pic_lt li .fa-caret-right{color:#bbb}
.pic_lt .lt_cmt{background:#5c85c1;color:#fff; font-size:11px;height:16px;line-height:16px;padding:0 5px;border-radius:3px;white-space: nowrap;
-webkit-box-shadow: inset 0 2px 5px rgba(255,255,255,0.4);
-moz-box-shadow: inset 0 2px 5px rgba(255,255,255,0.4);
box-shadow: inset 0 2px 5px rgba(255,255,255,0.4);}
.pic_lt .lt_date{display:block;margin-top:5px;color: #888;}
/* by False9 */
/* 슬라이더 레이아웃 */
.swiper-wrapper {background: #fff;}
.swiper-container {
width: 100%;
height: 300px;
}
.swiper-slide {
text-align: center;
font-size: 18px;
background: #fff;
width:100%;
height: 150px;
border: 1px solid #ddd;
box-sizing: border-box;
margin-right: 16px;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}
.swiper-slide:nth-child(1n) {
width: 24%;
margin-right: 16px;
}
.swiper-slide:nth-child(2n) {
width: 24%;
margin-right: 16px;
}
.swiper-slide:nth-child(3n) {
width: 24%;
margin-right: 16px;
}
.swiper-slide:nth-child(4n) {
width: 24%;
margin-right: 16px;
}
/* 페이징 Dot 기본 */
.swiper-pagination-bullet {
width: 8px !important;
height: 8px !important;
display: inline-block !important;
border-radius: 100% !important;
background: #000 !important;
opacity: .1 !important;
}
/* 페이징 Dot ON 일때 */
.swiper-pagination-bullet-active {
opacity: 1 !important;
background:#FF6666 !important;
}
/* 게시물 레이아웃 */
.sw_tit {
font-size: 18px;
font-weight: bold;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
height: 30px;
line-height: 30px;
display: block;
padding: 0 20px;
box-sizing: border-box;
margin-top: 10px;
}
.sw_img {width:100%; height:150px; /* margin-top:20px; margin-bottom:10px; border-radius: 4px; */ text-align: justify; background: center center;}
.sw_img2 {width:100%; margin-top:7px; height:100px; background-size: cover; background-position: center center; border-radius: 4px;}
.sw_content {font-size: 12px; height:70px; color:#666; text-align: justify; margin-top: 10px; padding: 0 20px; box-sizing: border-box;}
.sw_date {font-size: 12px; height: 20px; color:#666; text-align: right; padding: 0 10px; box-sizing: border-box;}
@charset "utf-8";
/* 새글 스킨 (latest) */
.pic_lt{position:relative;margin-bottom:10px;overflow:hidden;background:#fff}
.pic_lt .lat_title {display:block;background:#fcfcfc;padding:0 20px;line-height:35px;font-size:16px;color:#253dbe;}
.pic_lt .lat_title a{color:#253dbe;display:inline-block;position:relative}
.pic_lt .lat_title a:after{position:absolute;bottom:-1px;left:0;width:100%;height:2px;background:#253dbe;content:''}
.pic_lt .lt_more {position:absolute;top:11px;right:10px;display:block;width:25px;line-height:25px;color:#aaa;border-radius:3px;text-align:center;}
.pic_lt .lt_more:hover{color:#777}
.pic_lt ul:after {display:block;visibility:hidden;clear:both;content:""}
.pic_lt ul{padding:10px 15px; }
.pic_lt li{float:left;width:50%;padding:0 10px}
.pic_lt li .lt_img{margin:5px 0;display:block}
.pic_lt li .lt_img img{width:100%;height:auto}
.pic_lt li a:hover{color:#a22121}
.pic_lt li .fa-heart{color:#ff0000;}
.pic_lt li .fa-lock{display: inline-block;line-height: 14px;width: 16px;font-size: 0.833em;color: #4f818c;background: #cbe3e8;text-align: center;border-radius: 2px;font-size: 12px;border:1px solid #a2c6ce}
.pic_lt li .new_icon{display:inline-block;width: 16px;line-height:16px ;font-size:0.833em;color:#ffff00;background:#6db142;text-align:center;border-radius: 2px;}
.pic_lt li .hot_icon{display:inline-block;width: 16px;line-height:16px ;font-size:0.833em;color:#fff;background:#e52955;text-align:center;border-radius: 2px;}
.pic_lt li .fa-caret-right{color:#bbb}
.pic_lt .lt_cmt{background:#5c85c1;color:#fff; font-size:11px;height:16px;line-height:16px;padding:0 5px;border-radius:3px;white-space: nowrap;
-webkit-box-shadow: inset 0 2px 5px rgba(255,255,255,0.4);
-moz-box-shadow: inset 0 2px 5px rgba(255,255,255,0.4);
box-shadow: inset 0 2px 5px rgba(255,255,255,0.4);}
.pic_lt .lt_date{display:block;margin-top:5px;color: #888;}
/* by False9 */
/* 슬라이더 레이아웃 */
.swiper-wrapper {background: #fff;}
.swiper-container {
width: 100%;
height: 300px;
}
.swiper-slide {
text-align: center;
font-size: 18px;
background: #fff;
width:100%;
height: 300px;
border: 1px solid #ddd;
box-sizing: border-box;
margin-right: 16px;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}
.swiper-slide:nth-child(1n) {
width: 24%;
margin-right: 16px;
}
/* 페이징 Dot 기본 */
.swiper-pagination-bullet {
width: 8px !important;
height: 8px !important;
display: inline-block !important;
border-radius: 100% !important;
background: #000 !important;
opacity: .1 !important;
}
/* 페이징 Dot ON 일때 */
.swiper-pagination-bullet-active {
opacity: 1 !important;
background:#FF6666 !important;
}
/* 게시물 레이아웃 */
.sw_tit {
font-size: 18px;
font-weight: bold;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
height: 30px;
line-height: 30px;
display: block;
padding: 0 20px;
box-sizing: border-box;
margin-top: 10px;
}
.sw_img {
width:100%;
height:300px;
background: no-repeat center center;
}
.sw_img_h {
font-size: 18px;
font-weight: bold;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 30px;
display: block;
padding: 0 20px;
box-sizing: border-box;
background: rgba(0,0,0,0.3);
width: 100%;
height: 30px;
position: absolute;
left: 0;
bottom: 0px;
z-index: 5;
transition: all 1s;
}
.sw_img2 {width:100%; margin-top:7px; height:100px; background-size: cover; background-position: center center; border-radius: 4px;}
.sw_content {font-size: 12px; height:70px; color:#666; text-align: justify; margin-top: 10px; padding: 0 20px; box-sizing: border-box;}
.sw_date {font-size: 12px; height: 20px; color:#666; text-align: right; padding: 0 10px; box-sizing: border-box;}
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
답변 감사합니다.