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

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

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

        <div class="bar">
            <a class="bar-body" href="#{link}">

                <!-- 画像 -->
                <figure class="bar-resizable"
                        style="width:459px"
                    >
                    <img
                        src="#{image}"
                        alt=""
                    >
                </figure>

                <!-- 詳細テキスト -->
                <p class="bar-resizable">#{detail}</p>

                <i class="#{iconArrowRightDouble}" aria-hidden="true"></i>
            </a>
        </div>
    </section>
</div>
  • URL: /components/raw/bar-04/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-bar {
        position: absolute;
        z-index: 1;
        border-radius: 50%;
        line-height: 1;
        transition: .25s;
        top: 50%;
        right: 0;
        margin: 0 8px;
        padding: 13px;
        background: 0;
        color: #{style.closeColor};
        font-size: 12px;
        -webkit-transform: translateY(-50%);
                transform: translateY(-50%);
    }
    .btn-close-bar:hover,
    .btn-close-bar:focus {
        opacity: .5;
        -webkit-transform: translateY(-50%) rotate(90deg);
                transform: translateY(-50%) rotate(90deg);
    }
    .btn-close-bar .icon {
        display: inline-block;
        vertical-align: top;
    }
    
    /* 固定バー */
    a.bar-body {
        transition: .2s;
        color: #{style.colorMain};
        text-decoration: none;
    }
    a.bar-body:hover,
    a.bar-body:focus { opacity: .75 }
    .bar {
        padding-right: 48px;
        box-shadow: 0 0 16px rgba(0,0,0,.05), 0 0 14px rgba(0,0,0,.08);
        max-height: calc(~"100vh - 160px");
        overflow-y: auto;
        background: #{style.colorBg} no-repeat 50%;
        background-size: cover;
        color: #{style.colorText};
        font-size: 14px;
        line-height: 1.5;
    }
    .bar-body {
        display: -webkit-flex;
        display: flex;
        -webkit-justify-content: center;
                justify-content: center;
        -webkit-align-items: center;
                align-items: center;
        min-height: 50px;
        color: inherit;
    }
    .bar-body::after {
        content: '';
        min-height: inherit;
        font-size: 0;
    }
    .bar-body > * { margin: 8px }
    .bar-resizable {
        -webkit-flex-shrink: 1.5;
                flex-shrink: 1.5;
    }
    
  • URL: /components/raw/bar-04/variables.csv
  • Content:
    name,folder,folder_name,label,data_type,value,preview_value,help,is_required,is_hidden
    colorMain,style,スタイル,メインカラー,color,#fff,,,,
    colorText,style,スタイル,テキストカラー,color,#fff,,,,
    colorBg,style,スタイル,背景カラー,color,#333,,,,
    closeIcon,style,スタイル,閉じるアイコン,icon,krt-icon-close05,,,,1
    closeColor,style,スタイル,閉じるアイコン カラー,color,#fff,,,,
    image,,,画像,image,https://img-cf.karte.io/image/5a8fb9217e6a3808aec0cc05::template4.png,,,,
    detail,,,詳細テキスト,text,人気アイテム多数!売り切れる前にチェック,,,,
    link,,,リンク先,url,https://example.com/,,,,
    iconArrowRightDouble,,,右矢印アイコン,icon,krt-icon-arrow-double-right01,,,,1