cbillowes/curious-programmer-oxygen

View on GitHub
src/templates/post.css

Summary

Maintainability
Test Coverage
#post .cover-less {
    padding-top: 3.5em;
}

#post .cover,
#post .cover-blur {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top center;
    background-attachment: fixed;
}

#post .cover-blur {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
}

#post .cover .post-wrapper {
    margin-top: 10em;
}

#post .post-wrapper {
    background-color: rgba(255,255,255,.5);
    background: linear-gradient(180deg,rgba(250,250,250,.85) 0,rgba(250,250,250,.7) 1%,rgba(255,255,255,.5));
    padding: 3em 5em;
    box-shadow: 0 3px 6px rgba(0,0,0,0.05), 0 3px 6px rgba(0,0,0,0.1);
}

#post .body mark {
    border-radius: .3em;
    background-color: #cc0000;
    text-shadow: 1px 1px 1px #333;
    color: #fff;
}

#post .body img {
    display: inline-block;
    margin: 0 auto;
}

#post .body video {
    width: 100%;
}

#post .body blockquote {
    border-left: #cc0000 0.5em solid;
    padding-left: 1.5em;
}

#post #accordion .card-body a:link,
#post .body a:link {
    color: #cc0000 !important;
    text-decoration: none;
    font-weight: bold;
}

#post #accordion .card-body a:visited,
#post .body a:visited {
    color: #198459;
    text-decoration: none;
    font-weight: bold;
}

#post #accordion .card-body a:hover,
#post .body a:hover {
    color: teal;
    text-decoration: none;
    font-weight: bold;
}

#post #accordion .card-body a:active,
#post .body a:active {
    color: black;
}

#post #accordion .card-body a:visited:hover,
#post .body a:visited:hover {
    color: #cc0000;
}

#post .body .post-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#post .body .video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    padding-top: 25px;
    height: 0;
    margin-bottom: 1em;
}

#post .body .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#post .post-wrapper .post-tag-container .button {
    background-color: #cc0000;
    color: #fff;
}

#post .post-wrapper .post-tag-container .button:hover {
    background-color: teal;
    color: #fff;
}

#post code {
    background-color: #ffffff44;
    border: solid 1px #ffffff33;
    color: #303030;
}

#post pre code {
    background-color: transparent;
    border: transparent;
    color: #cccccc;
}

#post .twitter-tweet {
    margin-left: auto;
    margin-right: auto;
}

#post img {
    text-align: center;
    max-width: 100%;
    display: block;
}

#post .gif {
    cursor: pointer;
}

@media (max-width: 700px) {
    #post .cover .post-wrapper {
        margin-top: 5em;
    }

    #post .post-wrapper {
        padding: 1em 2em;
        background-color: rgba(255,255,255,.5);
    }
}

#post .body .image-wrapper {
    position: relative;
}

#post .body .image-wrapper .indicator {
    position: absolute;
    top: 25px;
    left: 25px;
    display: none;
}

#post .body .image-wrapper.loading {
    opacity: 0.1;
}

#post .body .image-wrapper.loading .indicator {
    display: block;
}

#post #accordion h2 {
    font-size: 1.25rem;
    padding: 1rem 0;
    cursor: pointer;
    height: 100%;
    padding: 2rem 2rem 2rem 2rem;
    line-height: 0rem;
    margin: 0px;
}

#post #accordion h2:hover {
    color: #cc0000;
}

#post #accordion h2 img {
    position: absolute;
    right: 2rem;
    top: 1em;
    width: 350px;
}

#post #accordion img {
    display: inline;
}

#post #accordion .card {
    border: solid 1px #e9e9e9;
    margin-bottom: 1px;
}

#post #accordion .card-header {
    padding: 0px;
    background-color: #fdfdfd;
    border: none;
}

#post #accordion .card-body {
    padding: 0em 2em;
}

#post #accordion .card-body div {
    line-height: 2.5;
    margin-bottom: 1em;
}

@media (max-width: 1300px) {
    #post #accordion h2 {
        line-height: 1.5;
    }

    #post #accordion h2 img  {
        position: relative;
        margin-left: 2rem;
    }
}