Social Card

by sbhomra

HTML

<div class="share-image">
  <h1>My New Process For Automating Social Share Images</h1>
  <div class="post-tags">#puppeteer #gatsbyjs</div>
  <div class="post-attributes"><span>05/09/2020</span><span>5 min read</span></div>
  <footer>www.surinderbhomra.com</footer>
</div>

CSS

body {
    background-color: #E9E6DF;
    color: #333;
    display: flex;
    flex-direction: column;
    font-family: Open Sans,sans-serif;
    min-height: 100vh;
    margin: 0;
}

    .share-image {
        align-items: center;
        background: url('https://www.transparenttextures.com/patterns/climpek.png') repeat #E9E6DF;
        display: flex;
        height: 420px;
        flex-direction: column;
        justify-content: center;
        width: 840px;
    }

        .share-image h1 {
            display: -webkit-box;
            overflow: hidden;
            text-overflow: ellipsis;
            max-height: 3.75em;
            font-weight: 600;
            line-height: 1.25em;
            margin: auto 0;
            max-width: calc(100% - 100px);
            transform: translateY(8px);
            font-size: 39px;
        }

        .share-image .post-tags {
            display: flex; 
            font-size: 20px;
            margin-top: auto;
            padding: 5px 0;
            text-align: left;
        }

        .share-image .post-attributes {
            align-items: center;
            display: flex; 
            font-size: 20px;
            margin-top: auto;
        }

            .share-image .post-attributes span {
                align-items: center;
                margin-right: 25px;
                display: inline-block;
                position: relative;
            }

                .share-image .post-attributes span:after {
                    content: "";
                    display: list-item;
                    list-style: disc;
                    position: absolute;
                    top: 0;
                    right: -19px;
                    width: 10px;
                    list-style-position: inside;
                }

                .share-image .post-attributes span:last-child {
                    margin-right: 0;
                }

                .share-image .post-attributes span:last-child:after {
                  ...