first commit 2
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: split_layout/skin.php
|
||||
* 단일 배너 아이템 스킨 (내용에 따라 3단 변신)
|
||||
*/
|
||||
|
||||
// 이미지와 텍스트 유무 확인
|
||||
$has_image = (isset($banner['bn_img']) && !empty($banner['bn_img']));
|
||||
$has_text = (isset($banner['bn_alt']) && !empty($banner['bn_alt']));
|
||||
|
||||
// 클래스 동적 생성
|
||||
$layout_class = '';
|
||||
if ($has_image && $has_text) {
|
||||
$layout_class = 'has-image-and-text';
|
||||
} elseif ($has_image) {
|
||||
$layout_class = 'has-image-only';
|
||||
} elseif ($has_text) {
|
||||
$layout_class = 'has-text-only';
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="<?php echo G5_URL; ?>/rb/rb.mod/banner/skin/split_layout/style.css?ver=<?php echo G5_SERVER_TIME; ?>">
|
||||
<div class="rb-banner-split-layout <?php echo $layout_class; ?>">
|
||||
<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']; ?>">
|
||||
<?php if ($has_image): ?>
|
||||
<div class="banner-image">
|
||||
<?php echo $banner['bn_img']; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($has_text): ?>
|
||||
<div class="banner-content">
|
||||
<h3><?php echo get_text($banner['bn_alt']); ?></h3>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
Reference in New Issue
Block a user