web/src/components/things/service-card.scss

112 lines · 2233 bytes

  1.service {
  2  display: flex;
  3  flex-direction: column;
  4  padding: 1rem;
  5  border: 2px solid var(--box-outline);
  6  box-shadow: 6px 6px 0 var(--box-outline);
  7  background: var(--accent-fg);
  8  border-radius: var(--curve-sm);
  9  position: relative;
 10  overflow: hidden;
 11
 12  .service-head {
 13    display: flex;
 14    align-items: center;
 15    gap: 0.5rem;
 16    h4 {
 17      margin: 0;
 18      font-size: 1.4rem;
 19      color: var(--foreground);
 20    }
 21    p {
 22      margin: 0;
 23      font-size: 1rem;
 24      opacity: 0.7;
 25    }
 26    a {
 27      text-decoration: none;
 28    }
 29    h4 {
 30      text-decoration: none;
 31      position: relative;
 32      &:after {
 33        background: none repeat scroll 0 0 transparent;
 34        bottom: 0;
 35        content: '';
 36        display: block;
 37        height: 3px;
 38        left: 50%;
 39        position: absolute;
 40        background: var(--accent-3);
 41        transition:
 42          width 0.2s ease 0s,
 43          left 0.2s ease 0s;
 44        width: 0;
 45      }
 46      &:hover:after {
 47        width: 100%;
 48        left: 0;
 49      }
 50    }
 51  }
 52
 53  .save-listing {
 54    position: absolute;
 55    top: 0.5rem;
 56    right: 0.5rem;
 57  }
 58
 59  .service-body {
 60    display: flex;
 61    align-items: center;
 62    gap: 0.5rem;
 63    img {
 64      border-radius: var(--curve-sm);
 65      font-size: 0.6rem;
 66      color: var(--accent);
 67    }
 68    :global(p) {
 69      display: -webkit-box;
 70      -webkit-line-clamp: 3;
 71      -webkit-box-orient: vertical;
 72      overflow: hidden;
 73      margin: 0.5rem 0;
 74      width: calc(100% - 2rem);
 75      overflow-x: hidden;
 76    }
 77  }
 78
 79  .service-links {
 80    display: flex;
 81    gap: 0.5rem;
 82    justify-content: space-between;
 83    a {
 84      color: var(--accent-3);
 85      font-size: 0.8rem;
 86      display: inline-flex;
 87      align-items: center;
 88      gap: 0.25rem;
 89      opacity: 0.85;
 90      text-decoration: none;
 91      max-width: 50%;
 92      min-width: 25%;
 93      &:not(:last-child) {
 94        margin-right: 0.5rem;
 95      }
 96      &:hover {
 97        text-decoration: underline;
 98        opacity: 1;
 99      }
100      :global(svg) {
101        width: 1rem;
102        height: 1rem;
103      }
104      span {
105        max-width: calc(100% - 1rem);
106        text-overflow: ellipsis;
107        white-space: nowrap;
108        overflow: hidden;
109      }
110    }
111  }
112}