diff --git a/src/components/MarketCard.vue b/src/components/MarketCard.vue index 7d07606..72604df 100644 --- a/src/components/MarketCard.vue +++ b/src/components/MarketCard.vue @@ -1,58 +1,55 @@ @@ -90,20 +87,38 @@ const progressColor = computed(() => { background-color: #ffffff; border-radius: 8px; border: 1px solid #e7e7e7; + padding: 12px; +} + +.market-card-content { + display: flex; + flex-direction: column; + height: 100%; + gap: 12px; +} + +/* Top Section */ +.top-section { + display: flex; + justify-content: space-between; + align-items: flex-start; +} + +.image-title-container { + display: flex; + align-items: flex-start; + gap: 12px; + flex: 1; + min-width: 0; } .market-image { - position: absolute; - left: 12px; - top: 12px; + flex-shrink: 0; } .market-title { - position: absolute; - left: 60px; - top: 12px; - width: 180px; - max-height: 32px; + flex: 1; + min-width: 0; font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500; @@ -116,14 +131,12 @@ const progressColor = computed(() => { } .chance-container { - position: absolute; - left: 248px; - top: 10px; - width: 60px; - height: 60px; display: flex; flex-direction: column; align-items: center; + flex-shrink: 0; + width: 60px; + height: 60px; } .progress-bar { @@ -145,11 +158,16 @@ const progressColor = computed(() => { margin-top: 4px; } +/* Options Section */ +.options-section { + display: flex; + gap: 12px; +} + .option-yes { - position: absolute; - left: 12px; - top: 72px; + flex: 1; background-color: #e6f9e6; + height: 40px; } .option-text-yes { @@ -160,10 +178,9 @@ const progressColor = computed(() => { } .option-no { - position: absolute; - left: 158px; - top: 72px; + flex: 1; background-color: #ffe6e6; + height: 40px; } .option-text-no { @@ -173,27 +190,31 @@ const progressColor = computed(() => { color: #ff0000; } +/* Bottom Section */ +.bottom-section { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: auto; +} + .market-info { - position: absolute; - left: 12px; - top: 124px; font-family: 'Inter', sans-serif; font-size: 12px; font-weight: normal; color: #808080; } +.icons-container { + display: flex; + gap: 16px; +} + .gift-icon { - position: absolute; - left: 240px; - top: 124px; color: #808080; } .bookmark-icon { - position: absolute; - left: 270px; - top: 124px; color: #808080; } diff --git a/src/views/Home.vue b/src/views/Home.vue index 75fb4bb..a4630a7 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -1,47 +1,27 @@