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

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

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

                <!-- 画像 -->
                <figure class="card-image _fit-card">
                    <img
                        src="#{image}"
                        alt=""
                    >
                </figure>

                <!-- 見出し -->
                <h1 class="card-heading">
                    #{heading|safe}
                </h1>

                <!-- 詳細テキスト -->
                <p class="card-detail">
                    #{detail|safe}
                </p>

                <!-- リンク -->
                <p class="card-link">
                    <a class="link" href="#{link}">
                        #{linkLabel}
                    </a>
                </p>
            </div>
        </div>
    </section>
</div>
  • URL: /components/raw/card-06/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;
    }
    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;
    }
    
    /* カード */
    .card {
        display: -webkit-flex;
        display: flex;
        -webkit-flex-direction: column;
                flex-direction: column;
        box-shadow: 0 5px 16px rgba(0,0,0,.05), 0 8px 14px rgba(0,0,0,.08);
        border-radius: 8px;
        width: 320px;
        max-width: 90vw;
        max-height: calc(~"100vh - 160px");
        overflow-y: auto;
        background: #{style.colorBg} no-repeat 50%;
        background-size: cover;
        color: #{style.colorText};
    }
    .card._edged { border-radius: 0 }
    .card-body { padding: 18px 20px 0 }
    .card-body::after {
        display: block;
        height: 18px;
        content: "";
        position: relative;
        z-index: -1;
    }
    .card-body {
        position: relative;
        overflow: inherit;
    }
    .card ._fit-card {
        margin-left: -20px;
        margin-right: -20px;
    }
    
    /* - 画像 */
    .card-image {
        margin: 0 auto;
        text-align: center;
    }
    .card-image:not(:last-child) { margin-bottom: 12px }
    .card-image._fit-card { margin-top: -18px }
    
    /* - 見出し */
    .card-heading {
        color: #{style.colorMain};
        font-weight: 600;
        font-size: 16px;
        line-height: 1.375;
    }
    .card-heading:not(:last-child) { margin-bottom: .5em }
    
    /* - 詳細テキスト */
    .card-detail:not(:last-child) { margin-bottom: 12px }
    
    /* ユーティリティ */
    .link {
        color: #{style.colorMain};
        text-decoration: underline;
        transition: .2s;
    }
    .link:hover,
    .link:focus {
        opacity: .5;
        text-decoration: none;
    }
    
  • URL: /components/raw/card-06/variables.csv
  • Content:
    name,folder,folder_name,label,data_type,value,preview_value,help,is_required,is_hidden
    colorMain,style,スタイル,メインカラー,color,#333,,,,
    colorText,style,スタイル,テキストカラー,color,#333,,,,
    colorBg,style,スタイル,背景カラー,color,#fff,,,,
    closeIcon,style,スタイル,閉じるアイコン,icon,krt-icon-close05,,,,1
    closeColor,style,スタイル,閉じるアイコン カラー,color,#999,,,,
    image,,,画像,image,https://img-cf.karte.io/image/5a8f8c39afcded2a4f39dd7c::template4.png,,,,
    heading,,,見出し,text,欲しいモノ、揃えました!,,,,
    detail,,,詳細テキスト,text,"この季節必須の主役 アウターをご紹介します。
    人気アイテムは予約がおすすめです。",,,,
    linkLabel,,,リンク ラベル,textCHECK,,,,
    link,,,リンク先,url,https://example.com/,,,,