EB콘텐츠 를 두개 사용할 일이 있을 때 생기는 문제점
루트팜
222.♡.192.210
2019-03-16 07:38
16,858
0
-
- 첨부파일 : 2019-03-16_073319.jpg (56.8K) - 다운로드
-
- 관련링크 : http://rootfarm.co.kr/shop/2861회 연결
본문
두개의 코드를 입력하고 배경이미지를 변경하면 관리자 측에서는 바뀌고 실제 css 코드에도 바뀌는데
<style>
.ebcontents-sect02 {position:relative;padding:60px 0;background-image:url("<?php echo $ec_master['ec_img_url'] ? $ec_master['ec_img_url']: $ebcontents_skin_url.'/image/bg_sect02.jpg'; ?>");background-repeat:no-repeat;background-size:cover;background-position:center}
.ebcontents-sect02-inner {padding-left:45%}
이 부분이 .ebcontents-sect02 로 인해서 하단 부분에 바꾼 이미지로 영향을 받아서 각각 다른 이미지로 작업을 할 수가 없네요 그래서 수정해서 사용하고 있는데
다음 버전에서는 두개 이상의 EB콘덴츠를 사용할 수 있게 해주셨으면 합니다.
임시로 수정해서 사용
[수정한 파일] : /theme/eb4_shop_001/skin/ebcontents/shop001_sect02
<?php
if (!defined('_EYOOM_')) exit;
?>
<?php /* eb콘텐츠 편집 버튼 */ ?>
<?php if ($is_admin == 'super' && !G5_IS_MOBILE) { ?>
<div class="btn-edit-mode-wrap <?php if ($ec_master['ec_state'] == '2') { ?>hidden-message<?php } ?>">
<div class="btn-edit-mode text-center hidden-xs hidden-sm">
<div class="btn-group">
<a href="<?php echo G5_ADMIN_URL; ?>/?dir=theme&pid=ebcontents_form&thema=<?php echo $theme; ?>&ec_code=<?php echo $ec_master['ec_code']; ?>&w=u&wmode=1" onclick="eb_admset_modal(this.href); return false;" class="btn-e btn-e-xs btn-e-red btn-e-split"><i class="far fa-edit"></i> EB컨텐츠 마스터 설정</a>
<a href="<?php echo G5_ADMIN_URL; ?>/?dir=theme&pid=ebcontents_form&thema=<?php echo $theme; ?>&ec_code=<?php echo $ec_master['ec_code']; ?>&w=u" target="_blank" class="btn-e btn-e-xs btn-e-red btn-e-split-red dropdown-toggle" title="새창 열기">
<i class="far fa-window-maximize"></i>
</a>
<button type="button" class="btn-e btn-e-xs btn-e-red popovers" data-container="body" data-toggle="popover" data-placement="bottom" data-html="true" data-content="
<span class='font-size-11'>
<strong class='color-indigo'>좌측 [EB컨텐츠 설정하기 버튼] 클릭 후 아래 설명 참고</strong><br>
<div class='margin-hr-5'></div>
<span class='color-indigo'>[설정정보]</span><br>
1. 컨텐츠 마스터 제목 : Main Section 02<br>
2. 스킨선택 : shop001_sect02<br>
3. 컨텐츠 아이템에서 사용할 링크수 : 1개<br>
4. 컨텐츠 아이템에서 사용할 이미지수 : 1개<br>
5. 컨텐츠 아이템에서 사용할 필드수 : 2개<br>
<span class='color-indigo'>[EB 컨텐츠 - 아이템 관리]</span><br>
1. EB컨텐츠 아이템 추가 클릭<br>
2. 텍스트 필드 #1~2 입력<br>
3. 연결주소 [링크] #1 입력<br>
4. 이미지 #1 업로드 [아이콘]<br>
5. 연결주소 [링크] #1 입력
<div class='margin-hr-5'></div>
EB콘텐츠 마스터 타이틀 #2 입력에 strong 태그 이용<br>
이미지 비율 1000x1000 픽셀 이미지 사용.<br>
배경이미지는 마스터에서 등록.
</span>
"><i class="fas fa-question-circle"></i>
</button>
</div>
</div>
</div>
<?php } ?>
<?php if (isset($ec_master) && $ec_master['ec_state'] == '1') { // 보이기 상태에서만 출력 ? ?>
<style>
.ebcontents-sect02<?php echo $ec_master['ec_code']; ?> {position:relative;padding:60px 0;background-image:url("<?php echo $ec_master['ec_img_url'] ? $ec_master['ec_img_url']: $ebcontents_skin_url.'/image/bg_sect02.jpg'; ?>");background-repeat:no-repeat;background-size:cover;background-position:center}
.ebcontents-sect02<?php echo $ec_master['ec_code']; ?>-inner {padding-left:45%}
/* master title */
.ebcontents-sect02<?php echo $ec_master['ec_code']; ?> .master-title {margin-bottom:40px}
.ebcontents-sect02<?php echo $ec_master['ec_code']; ?> .master-title h2 {margin:0 0 10px;font-size:16px;font-weight:700}
.ebcontents-sect02<?php echo $ec_master['ec_code']; ?> .master-title h3 {margin:0 0 30px;font-size:40px;line-height:50px;font-weight:300}
.ebcontents-sect02<?php echo $ec_master['ec_code']; ?> .master-title h3 strong {font-weight:700}
.ebcontents-sect02<?php echo $ec_master['ec_code']; ?> .master-title p {margin:0;font-size:15px;line-height:25px;color:#707070}
/* item */
.sect02-ebslider<?php echo $ec_master['ec_code']; ?> {margin:0 -15px}
.sect02-ebslider<?php echo $ec_master['ec_code']; ?> .slick-list {padding-bottom:10px}
.sect02-ebslider<?php echo $ec_master['ec_code']; ?> .sect02-item {padding:0 15px}
.sect02-ebslider<?php echo $ec_master['ec_code']; ?> .sect02-item a {position:relative;display:block;box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.5)}
.sect02-ebslider<?php echo $ec_master['ec_code']; ?> .sect02-item-content {position:absolute;top:0;left:0;width:100%;height:100%;padding:30px 20px;text-align:center;background:rgba(0,0,0,.5);opacity:0;-webkit-transition:all .35s ease-in-out;-moz-transition:all .35s ease-in-out;-o-transition:all .35s ease-in-out;-ms-transition:all .35s ease-in-out;transition:all .35s ease-in-out;-webkit-transform:translate3d(0,-20px,0);-moz-transform:translate3d(0,-20px,0);-o-transform:translate3d(0,-20px,0);-ms-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}
.sect02-ebslider<?php echo $ec_master['ec_code']; ?> a:hover .sect02-item-content {opacity:1;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}
.sect02-ebslider<?php echo $ec_master['ec_code']; ?> .sect02-item-content h4 {margin:0 0 20px;font-weight:700;font-size:16px;line-height:26px;color:#fff}
.sect02-ebslider<?php echo $ec_master['ec_code']; ?> .sect02-item-content h5 {font-size:14px;color:#fff}
/* control */
.sect02-ebslider<?php echo $ec_master['ec_code']; ?> .slick-prev {left:-15px}
.sect02-ebslider<?php echo $ec_master['ec_code']; ?> .slick-next {right:-15px}
.sect02-ebslider<?php echo $ec_master['ec_code']; ?> .slick-next:before, .sect02-ebslider<?php echo $ec_master['ec_code']; ?> .slick-prev:before {font-family:'Font Awesome\ 5 Free';font-weight:900;color:#999;font-size:28px}
.sect02-ebslider<?php echo $ec_master['ec_code']; ?> .slick-next:before {content:"\f054"}
.sect02-ebslider<?php echo $ec_master['ec_code']; ?> .slick-prev:before {content:"\f053"}
<?php if ($eyoom['is_responsive'] == '1' || G5_IS_MOBILE) { // 반응형 또는 모바일일때 ?>
@media (max-width:1199px){
.sect02-ebslider<?php echo $ec_master['ec_code']; ?> .sect02-item-content h4 {margin-bottom:10px;font-size:14px;line-height:20px}
.sect02-ebslider<?php echo $ec_master['ec_code']; ?> .sect02-item-content h5 {font-size:13px}
}
@media (max-width:991px){
.ebcontents-sect02<?php echo $ec_master['ec_code']; ?> {padding:40px 0;background-position:right center}
.ebcontents-sect02<?php echo $ec_master['ec_code']; ?>-inner {padding-left:0}
}
@media (max-width:767px){
.ebcontents-sect02<?php echo $ec_master['ec_code']; ?> .master-title h3 {margin-bottom:10px;font-size:24px;line-height:34px}
.ebcontents-sect02<?php echo $ec_master['ec_code']; ?> .master-title p {font-size:13px;line-height:23px}
.sect02-ebslider<?php echo $ec_master['ec_code']; ?> a .sect02-item-content {opacity:1;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0);background: -moz-linear-gradient(top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%);background: -webkit-linear-gradient(top, rgba(0,0,0,0.65) 0%,rgba(0,0,0,0) 100%);background: linear-gradient(to bottom, rgba(0,0,0,0.65) 0%,rgba(0,0,0,0) 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a6000000', endColorstr='#00000000',GradientType=0 );}
}
<?php } ?>
</style>
<div class="ebcontents ebcontents-sect02<?php echo $ec_master['ec_code']; ?>">
<div class="container">
<div class="ebcontents-sect02<?php echo $ec_master['ec_code']; ?>-inner">
<?php /* ebcontents master */?>
<div class="master-title">
<?php if ($ec_master['ec_subject_1']) { ?>
<h2><?php echo $ec_master['ec_subject_1']; ?></h2>
<?php } ?>
<?php if ($ec_master['ec_subject_2']) { ?>
<h3><?php echo $ec_master['ec_subject_2']; ?></h3>
<?php } ?>
<?php if ($ec_master['ec_text_1']) { ?>
<p><?php echo $ec_master['ec_text_1']; ?></p>
<?php } ?>
</div>
<div class="sect02-ebslider<?php echo $ec_master['ec_code']; ?>">
<?php /* ebcontents item */?>
<?php if (is_array($contents)) { ?>
<?php foreach ($contents as $k => $item) { ?>
<div class="sect02-item">
<a href="<?php echo $item['href_1']; ?>">
<div class="sect02-item-image">
<img src="<?php echo $item['src_1']?>" alt="image" class="img-responsive">
</div>
<div class="sect02-item-content">
<?php if ($item['ci_subject_1']) { ?>
<h4><?php echo $item['ci_subject_1']; ?></h4>
<?php } ?>
<?php if ($item['ci_subject_2']) { ?>
<h5><?php echo $item['ci_subject_2']; ?></h5>
<?php } ?>
</div>
</a>
</div>
<?php } ?>
<?php } ?>
<?php if ($ec_default) { ?>
<div class="sect02-item">
<a href="">
<div class="sect02-item-image">
<img src="<?php echo $ebcontents_skin_url; ?>/image/01.jpg" alt="image" class="img-responsive">
</div>
<div class="sect02-item-content">
<h4>당일 생산된 신선한 야채</h4>
<h5>당일 생산 제품</h5>
</div>
</a>
</div>
<div class="sect02-item">
<a href="">
<div class="sect02-item-image">
<img src="<?php echo $ebcontents_skin_url; ?>/image/02.jpg" alt="image" class="img-responsive">
</div>
<div class="sect02-item-content">
<h4>풍미 가득한 제빵</h4>
<h5>당일 생산 제품</h5>
</div>
</a>
</div>
<div class="sect02-item">
<a href="">
<div class="sect02-item-image">
<img src="<?php echo $ebcontents_skin_url; ?>/image/03.jpg" alt="image" class="img-responsive">
</div>
<div class="sect02-item-content">
<h4>신선한 아침의 우유</h4>
<h5>당일 생산 제품</h5>
</div>
</a>
</div>
<div class="sect02-item">
<a href="">
<div class="sect02-item-image">
<img src="<?php echo $ebcontents_skin_url; ?>/image/04.jpg" alt="image" class="img-responsive">
</div>
<div class="sect02-item-content">
<h4>샐러드 패키지</h4>
<h5>당일 생산 제품</h5>
</div>
</a>
</div>
<div class="sect02-item">
<a href="">
<div class="sect02-item-image">
<img src="<?php echo $ebcontents_skin_url; ?>/image/05.jpg" alt="image" class="img-responsive">
</div>
<div class="sect02-item-content">
<h4>달콤한 과일</h4>
<h5>당일 생산 제품</h5>
</div>
</a>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
<script src="<?php echo EYOOM_THEME_URL; ?>/plugins/slick/slick.min.js"></script>
<script>
$(window).load(function(){
$('.sect02-ebslider<?php echo $ec_master['ec_code']; ?>').slick({
slidesToShow: 1,
arrows: true,
dots: false,
autoplay: true,
autoplaySpeed: 15000, //15초
slidesToShow: 3,
slidesToScroll: 1,
<?php if ($eyoom['is_responsive'] == '1' || G5_IS_MOBILE) { // 반응형 또는 모바일일때 ?>
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
infinite: true,
dots: true
}
},
{
breakpoint: 600,
settings: {
slidesToShow: 2,
dots: true
}
}
]
<?php } ?>
});
});
</script>
<?php } ?>
댓글목록0