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

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

            <!-- 閉じるボタン -->
            <p style="margin-bottom:10px">
                <button type="button" class="btn btn-close-text karte-close">
                    <i class="icon #{style.closeIcon}" aria-hidden="true"></i><!--
                 --><span style="margin-left:6px">CLOSE</span>
                </button>
            </p>

            <div class="speech _right">

                <!-- 画像 -->
                <figure class="border-2 radius-circle"
                        style="width:58px"
                    >
                    <img
                        src="#{image}"
                        alt=""
                    >
                </figure>

                <!-- 詳細テキスト -->
                <p class="speech-body">
                    <strong>#{detail}</strong><br>
                    <a class="link" href="#{link}">
                        #{linkLabel}
                    </a>
                </p>
            </div>
        </div>
    </section>
</div>
  • URL: /components/raw/notification-01/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-text {
        border: 0;
        padding: 0;
        background: 0;
        color: #{style.closeColor};
        text-transform: uppercase;
        line-height: 1;
    }
    .btn-close-text:hover,
    .btn-close-text:focus { opacity: .5 }
    
    /* セリフ */
    .speech {
        display: -webkit-flex;
        display: flex;
        -webkit-align-items: flex-end;
                align-items: flex-end;
    }
    .speech._right > figure {
        -webkit-order: 1;
                order: 1;
        margin-right: 0;
        margin-left: 1em;
    }
    
    /* - 詳細テキスト */
    .speech._right .speech-body { border-bottom-right-radius: 0 }
    .speech-body {
        -webkit-flex-basis: 0;
                flex-basis: 0;
        -webkit-flex-grow: 1;
                flex-grow: 1;
        margin-bottom: 4px;
        box-shadow: 0 5px 16px rgba(0,0,0,.05), 0 8px 14px rgba(0,0,0,.08);
        border-radius: 24px;
        border: solid 1px rgba(0,0,0,.06);
        padding: 18px 20px;
        background: #{style.colorBg};
    }
    
    /* ユーティリティ */
    .container {
        width: 320px;
        max-width: 90vw;
        max-height: calc(~"100vh - 160px");
    }
    .radius-circle {
        border-radius: 50% !important;
        overflow: hidden;
    }
    .border-2 {
        border: solid #{style.colorMain};
        border-width: 2px !important;
    }
    .link {
        color: #{style.colorMain};
        text-decoration: underline;
        transition: .2s;
    }
    .link:hover,
    .link:focus {
        opacity: .5;
        text-decoration: none;
    }
    
  • URL: /components/raw/notification-01/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,#333,,,,
    image,,,画像,image,https://img-cf.karte.io/image/5a8fc195dd4fcc08f62a0a6c::template3.png,,,,
    detail,,,詳細テキスト,text,ご不明点やお困り事はございますか?,,,,
    linkLabel,,,リンク ラベル,text,» よくある質問はこちら,,,,
    link,,,リンク先,text,https://example.com/,,,,