Newspaper.scss 2.27 KB
Newer Older
Ken's avatar
Ken committed
1
@use "styles/index" as *;
Ken's avatar
Ken committed
2 3

.newspaper {
Ken's avatar
Ken committed
4 5 6 7
  margin-bottom: 72px;
  border: 1px solid $neutral-300;
  border-radius: 12px;
  overflow: hidden;
Ken's avatar
Ken committed
8 9 10
  display: flex;
  flex-direction: column;

11 12 13 14
  @include mobile {
    margin-bottom: 40px;
  }

Ken's avatar
Ken committed
15 16 17 18 19 20
  &-first {
    flex-direction: row;

    .newspaper-img {
      order: 2;
      width: 50%;
21
      min-height: 288px;
Ken's avatar
Ken committed
22 23 24

      img {
        border: 0;
25
        display: block;
Ken's avatar
Ken committed
26 27 28 29 30 31 32
      }
    }

    .newspaper-content {
      padding: 40px;
      width: 50%;

33 34 35 36
      @include tablet {
        padding: 20px;
      }

Ken's avatar
Ken committed
37 38 39 40 41 42
      p {
        margin-bottom: 20px;
      }

      &__desc {
        line-height: 22px;
43
        font-size: 18px;
Ken's avatar
Ken committed
44
        color: $neutral-900;
45
        display: block;
Ken's avatar
Ken committed
46 47 48
      }
    }
  }
Ken's avatar
Ken committed
49 50 51 52 53

  &:hover {
    cursor: pointer;
    box-shadow: $shadow-s;
  }
Ken's avatar
Ken committed
54

Ken's avatar
Ken committed
55 56
  &-img {
    width: 100%;
Ken's avatar
Ken committed
57

Ken's avatar
Ken committed
58
    img {
Ken's avatar
Ken committed
59
      width: 100%;
Ken's avatar
Ken committed
60
      height: 100%;
Ken's avatar
Ken committed
61
      object-fit: cover;
Ken's avatar
Ken committed
62
      border-bottom: 1px solid $neutral-300;
Ken's avatar
Ken committed
63
      display: block;
Ken's avatar
Ken committed
64
    }
Ken's avatar
Ken committed
65
  }
Ken's avatar
Ken committed
66

Ken's avatar
Ken committed
67 68
  &-content {
    padding: 20px;
Ken's avatar
Ken committed
69
    min-height: 180px;
Ken's avatar
Ken committed
70 71 72 73
    display: flex;
    flex-direction: column;
    justify-content: space-between;

74 75 76 77
    @include mobile {
      padding: 16px;
    }

Ken's avatar
Ken committed
78 79 80 81 82
    p {
      font-size: 20px;
      color: $neutral-700;
      font-weight: 700;
      line-height: 25px;
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102

      @include desktop {
        font-size: 18px;
      }

      @include mobile {
        font-size: 16px;
      }
    }

    &__desc {
      display: none;

      &.firstNews {
        display: block;
      }

      @include for-mobile-down {
        display: block;
      }
Ken's avatar
Ken committed
103
    }
Ken's avatar
Ken committed
104

Ken's avatar
Ken committed
105 106 107 108 109 110 111
    &__footer {
      display: flex;
      justify-content: space-between;
      align-items: center;

      .newspaper-category {
        font-size: 11px;
Ken's avatar
Ken committed
112
        padding: 6px 12px;
Ken's avatar
Ken committed
113 114
        border-radius: 12px;
        font-weight: 500;
Ken's avatar
Ken committed
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134

        &__success {
          background-color: $success-150;
          color: $success-600;
        }

        &__secondary {
          background-color: $secondary-150;
          color: $secondary-500;
        }

        &__info {
          background-color: $info-150;
          color: $info-500;
        }

        &__warning {
          background-color: $warning-150;
          color: $warning-500;
        }
Ken's avatar
Ken committed
135 136
      }

Ken's avatar
Ken committed
137 138 139
      .newspaper-time {
        font-size: 12px;
        color: $neutral-500;
Ken's avatar
Ken committed
140
      }
Ken's avatar
Ken committed
141 142 143
    }
  }
}