|
| 1 | +<template> |
| 2 | + <transition enter-active-class="bloom-in"> |
| 3 | + <div class="repo-card" v-if="Object.keys(this.repo).length > 0"> |
| 4 | + <a :href='this.repo.clone_url' target="_blank"> |
| 5 | + <div class="card-background"> |
| 6 | + <div class="repo-content"> |
| 7 | + <div class="repo-header"> |
| 8 | + <div class="repo-title">{{this.repo.name}}</div> |
| 9 | + </div> |
| 10 | + <div class="repo-description">{{this.repo.description}}</div> |
| 11 | + </div> |
| 12 | + </div> |
| 13 | + </a> |
| 14 | + </div> |
| 15 | + </transition> |
| 16 | +</template> |
| 17 | + |
| 18 | +<script> |
| 19 | +export default { |
| 20 | + name: 'Repo', |
| 21 | + props: { |
| 22 | + repo: { |
| 23 | + type: Object, |
| 24 | + default: () => ({}), |
| 25 | + }, |
| 26 | + }, |
| 27 | +}; |
| 28 | +</script> |
| 29 | + |
| 30 | +<style scoped> |
| 31 | + .repo-card { |
| 32 | + margin: 16px 0; |
| 33 | + position: relative; |
| 34 | + } |
| 35 | +
|
| 36 | + .repo-card a { |
| 37 | + text-decoration: none; |
| 38 | + } |
| 39 | +
|
| 40 | + .card-background { |
| 41 | + background: linear-gradient(135deg, hsl(0, 78%, 98%) 0%, hsl(300, 36%, 96%) 50%, hsl(120, 36%, 96%) 100%); |
| 42 | + border: 2px solid hsl(355, 53%, 81%); |
| 43 | + border-radius: 20px; |
| 44 | + padding: 20px; |
| 45 | + position: relative; |
| 46 | + box-shadow: |
| 47 | + 0 8px 25px hsla(355, 53%, 81%, 0.3), |
| 48 | + 0 4px 10px hsla(351, 100%, 86%, 0.2); |
| 49 | + transition: all 0.3s ease; |
| 50 | + overflow: hidden; |
| 51 | + } |
| 52 | +
|
| 53 | + .card-background::before { |
| 54 | + content: ''; |
| 55 | + position: absolute; |
| 56 | + top: -50%; |
| 57 | + left: -50%; |
| 58 | + width: 200%; |
| 59 | + height: 200%; |
| 60 | + background: radial-gradient(circle, hsla(351, 100%, 86%, 0.1) 0%, transparent 70%); |
| 61 | + animation: gentle-float 6s ease-in-out infinite; |
| 62 | + z-index: 0; |
| 63 | + } |
| 64 | +
|
| 65 | + .card-background:hover { |
| 66 | + transform: translateY(-5px) scale(1.02); |
| 67 | + box-shadow: |
| 68 | + 0 15px 35px hsla(355, 53%, 81%, 0.4), |
| 69 | + 0 8px 15px hsla(351, 100%, 86%, 0.3); |
| 70 | + border-color: hsl(355, 35%, 74%); |
| 71 | + cursor: pointer; |
| 72 | + } |
| 73 | +
|
| 74 | + .repo-content { |
| 75 | + position: relative; |
| 76 | + z-index: 2; |
| 77 | + } |
| 78 | +
|
| 79 | + .repo-header { |
| 80 | + display: flex; |
| 81 | + align-items: center; |
| 82 | + margin-bottom: 12px; |
| 83 | + gap: 12px; |
| 84 | + } |
| 85 | +
|
| 86 | + .repo-title { |
| 87 | + flex: 1; |
| 88 | + color: hsl(330, 31%, 42%); |
| 89 | + text-decoration: none; |
| 90 | + font-weight: 600; |
| 91 | + font-size: 18px; |
| 92 | + font-family: 'Georgia', serif; |
| 93 | + transition: all 0.3s ease; |
| 94 | + position: relative; |
| 95 | + } |
| 96 | +
|
| 97 | + .repo-title:hover { |
| 98 | + color: hsl(332, 43%, 83%); |
| 99 | + text-shadow: 0 2px 4px hsla(330, 31%, 42%, 0.2); |
| 100 | + } |
| 101 | +
|
| 102 | + .repo-title::after { |
| 103 | + content: '✨'; |
| 104 | + margin-left: 8px; |
| 105 | + opacity: 0; |
| 106 | + transition: opacity 0.3s ease; |
| 107 | + } |
| 108 | +
|
| 109 | + .repo-title:hover::after { |
| 110 | + opacity: 1; |
| 111 | + } |
| 112 | +
|
| 113 | + .repo-description { |
| 114 | + color: hsl(280, 12%, 40%); |
| 115 | + font-size: 15px; |
| 116 | + line-height: 1.5; |
| 117 | + margin-bottom: 12px; |
| 118 | + padding-left: 44px; |
| 119 | + font-family: 'Georgia', serif; |
| 120 | + } |
| 121 | +
|
| 122 | + .bloom-in { |
| 123 | + animation: bloom-in 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; |
| 124 | + } |
| 125 | +
|
| 126 | + @keyframes bloom-in { |
| 127 | + 0% { |
| 128 | + opacity: 0; |
| 129 | + transform: scale(0.8) rotate(-2deg); |
| 130 | + } |
| 131 | + 50% { |
| 132 | + transform: scale(1.05) rotate(1deg); |
| 133 | + } |
| 134 | + 100% { |
| 135 | + opacity: 1; |
| 136 | + transform: scale(1) rotate(0deg); |
| 137 | + } |
| 138 | + } |
| 139 | +
|
| 140 | + @keyframes gentle-float { |
| 141 | + 0%, 100% { |
| 142 | + transform: translateY(0px) rotate(0deg); |
| 143 | + } |
| 144 | + 50% { |
| 145 | + transform: translateY(-10px) rotate(180deg); |
| 146 | + } |
| 147 | + } |
| 148 | +
|
| 149 | + @media (max-width: 768px) { |
| 150 | + .card-background { |
| 151 | + padding: 16px; |
| 152 | + margin: 0 5px; |
| 153 | + } |
| 154 | +
|
| 155 | + .repo-header { |
| 156 | + flex-direction: column; |
| 157 | + align-items: flex-start; |
| 158 | + gap: 8px; |
| 159 | + } |
| 160 | +
|
| 161 | + .repo-description { |
| 162 | + padding-left: 0; |
| 163 | + } |
| 164 | +
|
| 165 | + .floral-decoration { |
| 166 | + top: 8px; |
| 167 | + right: 12px; |
| 168 | + } |
| 169 | + } |
| 170 | +</style> |
0 commit comments