first commit 2
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: zoom_in_hover/banner.skin.php
|
||||
* 배너 그룹 스킨 (래퍼)
|
||||
*/
|
||||
|
||||
// CSS 로드
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_URL.'/rb/rb.mod/banner/skin/zoom_in_hover/style.css">', 0);
|
||||
|
||||
// 배너 목록이 있으면 루프를 돌며 skin.php를 include
|
||||
if (isset($banners) && is_array($banners)) {
|
||||
foreach ($banners as $banner) {
|
||||
include(dirname(__FILE__).'/skin.php');
|
||||
}
|
||||
} else if (isset($banner)) {
|
||||
// 단일 배너인 경우
|
||||
include(dirname(__FILE__).'/skin.php');
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: zoom_in_hover/skin.php
|
||||
* 단일 배너 아이템 스킨
|
||||
*/
|
||||
?>
|
||||
<div class="rb-banner-zoom-in-hover">
|
||||
<a href="<?php echo $banner['bn_url']; ?>"
|
||||
target="_<?php echo $banner['bn_new_win'] ? 'blank' : 'self'; ?>"
|
||||
onclick="banner_click_count(this); return true;"
|
||||
data-banner-id="<?php echo $banner['bn_id']; ?>">
|
||||
<div class="banner-image">
|
||||
<?php echo $banner['bn_img']; ?>
|
||||
</div>
|
||||
<div class="banner-content">
|
||||
<h3><?php echo get_text($banner['bn_alt']); ?></h3>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
@@ -0,0 +1,50 @@
|
||||
.rb-banner-zoom-in-hover {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-zoom-in-hover a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-zoom-in-hover .banner-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-zoom-in-hover .banner-image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
transition: transform 0.4s ease;
|
||||
}
|
||||
|
||||
.rb-banner-zoom-in-hover:hover .banner-image img {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.rb-banner-zoom-in-hover .banner-content {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.rb-banner-zoom-in-hover h3 {
|
||||
margin: 0;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 700;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
Reference in New Issue
Block a user