{% 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"
                style="background-image:url(#{image})"
            >
            <div class="bar-body">

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

                <!-- リンク -->
                <p>
                    <a class="link" href="#{link}">
                        #{linkLabel}
                    </a>
                </p>
            </div>
        </div>
    </section>
</div>
  • URL: /components/raw/bar-03/style.css
  • Content:
    /* ベース */
    button {
        margin: 0;
        width: auto;
        height: auto;
        font-family: inherit;
        cursor: pointer;
    }
    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;
    }
    
    /* 固定バー */
    .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;
    }
    
    /* ユーティリティ */
    .link {
        color: #{style.colorMain};
        text-decoration: underline;
        transition: .2s;
    }
    .link:hover,
    .link:focus {
        opacity: .5;
        text-decoration: none;
    }
    
  • URL: /components/raw/bar-03/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/5a8fb7fe7e6a3808aec0cbf1::template3.png,,,,
    detail,,,詳細テキスト,text,ベスト・オブ・パナマ受賞!様々なフルーツを思わせる甘いコーヒー Carmen 入荷しました。,,,,
    linkLabel,,,リンク ラベル,text,» CHECK,,,,
    link,,,リンク先,url,https://example.com/,,,,