show-box.vue 1.96 KB
<template>
    <div class="show-box" :class="{ 'first-box': isFirst, 'last-box': isLast, 'zero-top-margin': zeroTopMargin }">
        <slot></slot>
    </div>
</template>
<style>
    .show-box {
        position: relative;
        margin-top: 20px;
        background: #fff;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
        padding: 30px;
        word-wrap: break-word;

        .box-toggle {
            position: absolute;
            top: 40px;
            right: 30px;
            font-size: 40px;
        }

        img {
            max-width: 100%;
        }

        p {
            color: #808080;
            font-size: 24px;
            line-height: 48px;
        }

        hr {
            border: none;
            border-bottom: 1px solid #eee;
            margin: 32px 0 20px;
        }

        h2 {
            margin: 0;
            font-size: 32px;
            text-align: left;
            color: #000;
            font-weight: normal;
            display: inline-block;

            + i {
                font-size: 14px;
                font-style: normal;
                color: #b0b0b0;
                font-weight: normal;
            }
        }

        ul {
            list-style: none;
            padding: 0;
        }

        .image-box {
            float: left;
        }

        .text-box {
            float: left;
            margin-left: 20px;
            text-align: center;
            line-height: 36px;
        }

        .clear-fix {
            clear: both;
        }

        &.first-box {
            margin-top: 0;
            padding: 0;
        }

        &.last-box {
            margin-bottom: 99px;
        }

        &.zero-top-margin {
            margin-top: 0;
        }
    }
</style>
<script>
    module.exports = {
        props: {
            isFirst: [Boolean],
            isLast: [Boolean],
            zeroTopMargin: [Boolean]
        },
        data() {
            return {};
        }
    };
</script>