Skip to content
Snippets Groups Projects
posts.sass 3.26 KiB
.post
    @include article($post-media-background)

    /* TODO toujours d'actualité ou propre à un site ?
    .author,
    .post-categories
        @extend .small
        &,
        a
            color: $post-categories-color

    time
        color: $post-time-color
        display: block
        font-size: px2rem(14)

.posts__section,
.authors__term,
.categories__term
    @if $posts-layout-list
        .posts 
            @include grid(1)
            grid-gap: 0
            > div 
                border-bottom: 1px solid $main-border-color
                margin-bottom: $spacing3
                padding-bottom: $spacing3
                .post
                    display: flex
                    flex-direction: row
                    @include media-breakpoint-up(md)
                        @include grid
                    div:not(.media)
                        grid-column: 4/13
                        @include media-breakpoint-down(md)
                            flex: 1
                            margin-left: $spacing0
                        p:not(.title)
                            @include media-breakpoint-down(md)
                                display: none
                    .media
                        background: none
                        margin: 0
                        @include media-breakpoint-down(md)
                            width: 33.33333%
                        @include media-breakpoint-up(md)
                            grid-column: 1/4
                    @include media-breakpoint-up(md)
                        time 
                            font-size: $h5-size
                            position: absolute
                            right: 0
                            top: 0
                        div:not(.media)
                            h1,
                            p,
                            a
                                max-width: col(6, 9)

    @else 
        .posts
            @include grid(1)
            @include grid(2, md)
            @include grid(3, xl)

.posts__page
    aside
        @include container-margin-left
        margin-top: 0
        top: 0
        left: 0
        height: 100%
        position: absolute
        width: col-outside-container(4)
        .table-infos
            @include sticky($spacing1)

.post-categories
    @include list-reset
    @extend .small
    margin: 0
    li
        display: inline-block
        vertical-align: middle
        margin-left: 10px
        &:last-child
            &::after
                content: none

.table-infos
    border-top: 1px solid $main-border-color
    margin-bottom: 0
    &, li
        font-size: $small-font-size    
    ul
        @include list-reset
    caption
        @include visually-hidden
        position: relative !important // Fix safari iOS border issue
    th
        color: color-contrast($main-color, 25%)
        font-weight: 400
        padding-left: 0
        white-space: nowrap
    tr
        border-color: $main-border-color
    td:last-of-type
        padding-right: 0
        text-align: right
    .share
        justify-content: flex-end
        li:last-child
            margin-right: -$spacing0

.related
    margin-top: $spacing1
    .posts
        @include grid(2, md)
        margin-bottom: 0
    .link
        @extend .link-more