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

<div class="wrapper">
    <section krt-if="state == 1"
            class="card _fit-height"
        >
        <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>

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

            <!-- コンテンツ -->
            <section>
                <h2 class="card-heading _size-sm" style="margin:16px 0 4px">
                    <a class="link" href="#{list.link1}">
                        <figure class="card-image">
                            <img
                                src="#{list.image1}"
                                alt=""
                            >
                        </figure>
                        #{list.heading1|safe}
                    </a>
                </h2>
                <p class="card-detail">
                    #{list.detail1}
                </p>
            </section>
            <section>
                <h2 class="card-heading _size-sm" style="margin:16px 0 4px">
                    <a class="link" href="#{list.link2}">
                        <figure class="card-image">
                            <img
                                src="#{list.image2}"
                                alt=""
                            >
                        </figure>
                        #{list.heading2|safe}
                    </a>
                </h2>
                <p class="card-detail">
                    #{list.detail2}
                </p>
            </section>
            <section>
                <h2 class="card-heading _size-sm" style="margin:16px 0 4px">
                    <a class="link" href="#{list.link3}">
                        <figure class="card-image">
                            <img
                                src="#{list.image3}"
                                alt=""
                            >
                        </figure>
                        #{list.heading3|safe}
                    </a>
                </h2>
                <p class="card-detail">
                    #{list.detail3}
                </p>
            </section>

        </div>
        <footer class="card-foot">

            <!-- ボタン -->
            <div class="card-button _fit-card">
                <ul class="button-block">
                    <li>
                        <a class="btn _fit-width _transparented"
                                href="#{btnLink}"
                            >
                            #{btnLabel}
                        </a>
                    </li>
                </ul>
            </div>
        </footer>
    </section>
</div>
  • URL: /components/raw/sidebar-02/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._fit-width { width: 100% }
    .btn._transparented {
        background: 0;
        color: #{style.colorMain};
    }
    .btn._transparented:hover,
    .btn._transparented:focus { opacity: .5 }
    
    /* 閉じるボタン */
    .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;
    }
    
    /* ボタンブロック */
    .button-block li { list-style: none }
    .button-block.columns > li {
        -webkit-flex-basis: calc(~"25% - 10px");
                flex-basis: calc(~"25% - 10px");
    }
    .button-block:not(.columns) li + li { margin-top: 10px }
    .card-button._fit-card .button-block.columns,
    .card-button._fit-card .button-block.columns li { margin: 0 }
    .card-button._fit-card .button-block.columns li { max-width: 50% }
    .card-button._fit-card .button-block.columns > li + li { border-left: solid 1px rgba(0,0,0,.06) }
    .card-button._fit-card .button-block:not(.columns) li + li { margin-top: 0 }
    .card-button._fit-card .button-block:not(.columns) li + li .btn {
        border-top: solid 1px rgba(0,0,0,.06);
    }
    .card-button._fit-card .button-block .btn {
        border-radius: 0;
        width: 100%;
    }
    
    /* カラム */
    .columns {
        display: -webkit-flex;
        display: flex;
        -webkit-flex-wrap: wrap;
                flex-wrap: wrap;
        margin: -10px 0 0 -10px;
    }
    .columns > li {
        -webkit-flex-grow: 1;
                flex-grow: 1;
        margin: 10px 0 0 10px;
    }
    .columns > li { list-style: none }
    .card .columns > li {
        -webkit-flex-basis: calc(~"25% - 10px");
                flex-basis: calc(~"25% - 10px");
    }
    
    /* カード */
    .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-body,
    .card-foot { padding: 18px 20px 0 }
    .card-body::after,
    .card-foot::after {
        display: block;
        height: 18px;
        content: "";
        position: relative;
        z-index: -1;
    }
    .card-body {
        position: relative;
        overflow: inherit;
    }
    .card-foot {
        box-shadow: 0 -1px rgba(0,0,0,.06);
        min-height: auto;
    }
    .card ._fit-card {
        margin-left: -20px;
        margin-right: -20px;
    }
    .card ._fit-card:first-child { margin-top: -18px }
    .card ._fit-card:last-child { margin-bottom: -18px }
    .card._fit-height {
        border-radius: 0;
        height: 0;
        min-height: 100%;
    }
    .card._fit-height .card-body {
        -webkit-flex-grow: 1;
                flex-grow: 1;
        -webkit-flex-basis: 0;
                flex-basis: 0;
    }
    
    /* - 画像 */
    .card-image {
        margin: 0 auto;
        text-align: center;
    }
    
    /* - 見出し */
    .card-heading {
        color: #{style.colorMain};
        font-weight: 600;
        font-size: 16px;
        line-height: 1.375;
    }
    .card-heading:not(:last-child) { margin-bottom: .5em }
    .card-heading._size-sm {
        font-size: 14px;
        line-height: 1.5;
    }
    .card-heading._bordered-b {
        border-bottom: solid 1px;
        padding-bottom: .5em;
    }
    .card-heading .card-image { margin-bottom: .5em }
    
    /* ユーティリティ */
    .link {
        color: #{style.colorMain};
        text-decoration: underline;
        transition: .2s;
    }
    .link:hover,
    .link:focus {
        opacity: .5;
        text-decoration: none;
    }
    
  • URL: /components/raw/sidebar-02/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,,,,
    image1,list,リスト,画像1,image,https://img-cf.karte.io/image/5a8fbbdbdc2e0708fb5517ea::template2.png,,,,
    heading1,list,リスト,見出し1,text,"UIデザイナーが知っておくべき7つの
    デザインルール",,,,
    detail1,list,リスト,詳細テキスト1,text,UIデザイナーだけどなかなか上達しない、今よりスキルアップしたいという方必読です。,,,,
    link1,list,リスト,リンク1,url,https://example.com/,,,,
    image2,list,リスト,画像2,image,https://img-cf.karte.io/image/5a8fbc0bdc2e0708fb5517f0::template2.png,,,,
    heading2,list,リスト,見出し2,text,"UIデザイナーが知っておくべき7つの
    デザインルール",,,,
    detail2,list,リスト,詳細テキスト2,text,UIデザイナーだけどなかなか上達しない、今よりスキルアップしたいという方必読です。,,,,
    link2,list,リスト,リンク2,url,https://example.com/,,,,
    image3,list,リスト,画像3,image,https://img-cf.karte.io/image/5a8fbc32dc2e0708fb5517f1::template2.png,,,,
    heading3,list,リスト,見出し3,text,"UIデザイナーが知っておくべき7つの
    デザインルール",,,,
    detail3,list,リスト,詳細テキスト3,text,UIデザイナーだけどなかなか上達しない、今よりスキルアップしたいという方必読です。,,,,
    link3,list,リスト,リンク3,url,https://example.com/,,,,
    heading,,,見出し,text,新着記事,,,,
    btnLabel,,,ボタン ラベル,text,いますぐ確認する,,,,
    btnLink,,,ボタン リンク先,text,https://example.com/,,,,