Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
news-articles.scss 4.77 KiB
Newer Older
  • Learn to ignore specific revisions
  • #news {
        padding: 60px 20px;
        .articles-displayer {
            margin: 0 auto 40px;
            .prev-next-buttons {
                display: flex;
                justify-content: space-between;
                .prev-btn,
                .next-btn {
                    border: none;
                    background: none;
                    display: flex;
                    align-items: center;
                    gap: 10px;
                    padding: 5px 0;
                    &.disabled {
                        visibility: hidden;
                        pointer-events: none;
                    }
                    &.active {
                        cursor: pointer;
                        color: $medium_grey;
                        &:hover {
                            color: $dark_2;
                        }
                    }
                }
                .next-btn {
                    &.active {
                        &::after {
                            content: " ";
                            border-style: solid;
                            border-width: 2px 2px 0 0;
                            width: 8px;
                            height: 8px;
                            transform: rotate(45deg);
                            @include flex-center;
                        }
                    }
                }
                .prev-btn {
                    &.active {
                        &::before {
                            content: " ";
                            border-style: solid;
                            border-width: 2px 2px 0 0;
                            width: 8px;
                            height: 8px;
                            transform: rotate(-135deg);
                            @include flex-center;
                        }
                    }
                }
            }
    
            article {
                display: grid;
                gap: 5px 50px;
                grid-template-rows: auto auto auto 1fr;
                position: relative;
                padding-left: 20px;
    
    peter_rabbit's avatar
    peter_rabbit committed
                &.grid-1 {
                    grid-template-columns: 1fr;
                }
                &.grid-2 {
                    grid-template-columns: 1fr 1fr;
    
                }
                .date {
                    grid-column: 1;
                    grid-row: 1;
                    text-align: right;
                    time {
                        color: $medium_grey;
                        font-style: italic;
                        font-size: 12px;
                    }
                }
                .title {
                    grid-column: 1;
                    grid-row: 2;
                    h3 {
                        margin: 0 0 10px;
                    }
                }
                .subtitle {
                    grid-column: 1;
                    grid-row: 3;
                    font-style: italic;
                    font-size: 15px;
                }
                .body {
                    grid-column: 1;
                    grid-row: 4;
                    min-height: 200px;
                    padding-bottom: 40px;
                    text-align: justify;
                }
                .image-carousel {
                    grid-row: 1 / span 4;
                    grid-column: 2;
                    img {
                        max-height: 100%;
                    }
                }
                &.article-placeholder {
                    padding: 0;
                    * {
                        background-color: $light_0;
                    }
                    .date {
                        height: 10px;
                    }
                    .title {
                        height: 40px;
                    }
                    .subtitle {
                        height: 30px;
                    }
                }
            }
            @media screen and (max-width: $screen_l) {
                article {
                    gap: 5px;
                    padding: 0;
    
    peter_rabbit's avatar
    peter_rabbit committed
                    &.grid-2 {
                        grid-template-columns: 1fr;
                        grid-template-rows: 300px auto auto auto 1fr;
                        .date {
                            grid-row: 2;
                        }
                        .title {
                            grid-row: 3;
                        }
                        .subtitle {
                            grid-row: 4;
                        }
                        .body {
                            grid-row: 5;
                        }
                        .image-carousel {
                            grid-row: 1;
                            grid-column: 1;
                        }
    
    peter_rabbit's avatar
    peter_rabbit committed
                    &.grid-1 {
                        .date {
                            grid-row: 1;
                        }
                        .title {
                            grid-row: 2;
                        }
                        .subtitle {
                            grid-row: 3;
                        }
                        .body {
                            grid-row: 4;
                        }
    
    peter_rabbit's avatar
    peter_rabbit committed
                    .date,
                    .title,
    
                    .subtitle {
                        padding: 0 10px;
                    }
                    .body {
                        padding: 0 10px 30px;
                    }
                }
            }
        }
    }