{% include '@style-variables' -%}
{% include '@self-resources' %}

<div class="wrapper">
    <section krt-if="state == 1">

        <!-- 閉じるボタン -->
        <button type="button" class="btn btn-close karte-close"
                aria-label="閉じる"
            >
            <i class="icon #{style.closeIcon}" aria-hidden="true"></i>
        </button>

        <!-- バナー -->
        <a class="banner" href="#{link}">
            <figure>
                <img
                    src="#{image}"
                    alt=""
                >
            </figure>
        </a>
    </section>
</div>
  • URL: /components/raw/banner-03/style.css
  • Content:
    /* ベース */
    figure { margin: 0 }
    img {
        max-width: 100%;
        vertical-align: bottom;
    }
    button {
        margin: 0;
        width: auto;
        height: auto;
        font-family: inherit;
        cursor: pointer;
    }
    a *,
    button * { cursor: inherit }
    .wrapper {
        position: relative;
        height: 100%;
        text-align: left;
        font-size: 12px;
        line-height: 1.66667;
    }
    .wrapper * {
        box-sizing: border-box;
        white-space: inherit;
        font-size: 100%;
        line-height: inherit;
    }
    
    /* ボタン */
    .btn {
        transition: .2s;
        display: inline-block;
        border-radius: 4px;
        border: solid 1px transparent;
        padding: 13px 16px;
        background: #{style.colorMain};
        color: #fff;
        vertical-align: middle;
        text-decoration: none;
        text-align: center;
        line-height: 1.25;
    }
    .btn:hover,
    .btn:focus { opacity: .75 }
    
    /* 閉じるボタン */
    .btn-close {
        position: absolute;
        z-index: 1;
        border-radius: 50%;
        line-height: 1;
        transition: .25s;
        top: 7px;
        right: 7px;
        padding: 6px;
        background: 0;
        color: #{style.closeColor};
    }
    .btn-close:hover,
    .btn-close:focus {
        opacity: .5;
        -webkit-transform: rotate(90deg);
                transform: rotate(90deg);
    }
    .btn-close .icon {
        display: inline-block;
        vertical-align: top;
    }
    
    /* バナー */
    a.banner { transition: .2s }
    a.banner:hover,
    a.banner:focus {
        box-shadow: 0 5px 16px rgba(0,0,0,.1), 0 8px 28px rgba(0,0,0,.16);
    }
    .banner {
        box-shadow: 0 5px 16px rgba(0,0,0,.05), 0 8px 14px rgba(0,0,0,.08);
        display: block;
    }
    .banner img {
        margin: 0 auto;
        width: 320px;
        max-width: 90vw;
        max-height: calc(~"100vh - 160px");
    }
    
  • URL: /components/raw/banner-03/variables.csv
  • Content:
    name,folder,folder_name,label,data_type,value,preview_value,help,is_required,is_hidden
    colorMain,style,スタイル,メインカラー,color,#333,,,,
    closeIcon,style,スタイル,閉じるアイコン,icon,krt-icon-close05,,,,1
    closeColor,style,スタイル,閉じるアイコン カラー,color,#333,,,,
    image,,,画像,image,https://img-cf.karte.io/image/5ab31eb8b055f6090dbfbdcd::banner_template3.png,,,,
    link,,,リンク先,url,https://example.com/,,,,