From 139a2ea3b6d220b098519f618f3e7d67e7587907 Mon Sep 17 00:00:00 2001 From: patak Date: Sun, 18 Dec 2022 14:22:28 +0100 Subject: [PATCH] fix: responsive github cards, don't constrain height --- components/status/StatusPreviewCard.vue | 28 +++------------- components/status/StatusPreviewCardInfo.vue | 36 +++++++++++++++++++++ components/status/StatusPreviewGitHub.vue | 27 ++++++++-------- 3 files changed, 53 insertions(+), 38 deletions(-) create mode 100644 components/status/StatusPreviewCardInfo.vue diff --git a/components/status/StatusPreviewCard.vue b/components/status/StatusPreviewCard.vue index 2603fc25..815ad5e8 100644 --- a/components/status/StatusPreviewCard.vue +++ b/components/status/StatusPreviewCard.vue @@ -26,7 +26,9 @@ const gitHubCards = $(computedEager(() => useFeatureFlags().experimentalGitHubCa diff --git a/components/status/StatusPreviewCardInfo.vue b/components/status/StatusPreviewCardInfo.vue new file mode 100644 index 00000000..4a683959 --- /dev/null +++ b/components/status/StatusPreviewCardInfo.vue @@ -0,0 +1,36 @@ + + + diff --git a/components/status/StatusPreviewGitHub.vue b/components/status/StatusPreviewGitHub.vue index 23d09922..b2b53214 100644 --- a/components/status/StatusPreviewGitHub.vue +++ b/components/status/StatusPreviewGitHub.vue @@ -5,13 +5,11 @@ const props = defineProps<{ card: Card }>() -const isSquare = false -const root = true - type UrlType = 'user' | 'repo' | 'issue' | 'pull' interface Meta { type: UrlType user: string + titleUrl: string avatar: string details: string repo?: string @@ -50,6 +48,7 @@ const meta = $computed(() => { const info = $ref({ type, user, + titleUrl: `https://github.com/${user}${repo ? `/${repo}` : ''}`, details, repo, number, @@ -83,22 +82,20 @@ const meta = $computed(() => { bg-code relative border="base" - :class="{ - 'sm:(min-w-32 w-32 h-32) min-w-22 w-22 h-22 border-r': isSquare, - 'w-full aspect-[1.91] border-b': !isSquare, - 'rounded-lg': root, - }" + w-full min-h-50 md:min-h-60 border-b + justify-center + rounded-lg > -
-
+
+
- + + +