Skip to content

Commit 50f49a7

Browse files
committed
better mobile styles for blog and newsletter
1 parent 80bdeb1 commit 50f49a7

File tree

3 files changed

+27
-29
lines changed

3 files changed

+27
-29
lines changed

app/components/BlogPostTile.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ defineProps<{
1010
<template>
1111
<div>
1212
<Card :class="cardClasses">
13-
<figure class="aspect-video !rounded-box m-4">
14-
<img :src="post.meta.imgSrc" :alt="post.title" class="object-cover h-full w-full object-center">
13+
<figure class="aspect-video !rounded-box md:m-4">
14+
<img :src="post.meta.imgSrc" :alt="post.title" class="object-cover h-full w-full object-center" />
1515
</figure>
1616
<CardBody class="gap-6">
1717
<CardTitle>{{ post.title }}</CardTitle>
1818
<p>{{ post.description }}</p>
1919

2020
<CardActions class="mt-4">
2121
<NuxtLink :to="post.path" class="btn btn-primary btn-ghost">
22-
Read More
22+
Read More
2323
<Icon name="feather:chevron-right" size="24" />
2424
</NuxtLink>
2525
</CardActions>
2626
</CardBody>
2727
</Card>
2828
</div>
29-
</template>
29+
</template>

app/components/NewsletterSubscribe.vue

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,20 @@
44
title="Subscribe to our Newsletter"
55
description="Get new Feathers content as it becomes available."
66
/>
7-
8-
<form action="https://buttondown.email/api/emails/embed-subscribe/feathers" method="post" target="popupwindow"
7+
8+
<form
9+
action="https://buttondown.email/api/emails/embed-subscribe/feathers"
10+
method="post"
11+
target="popupwindow"
912
onsubmit="window.open('https://buttondown.email/feathers', 'popupwindow')"
1013
class="embeddable-buttondown-form flex flex-col"
1114
>
12-
<Join class="mt-8">
15+
<Join class="join-vertical md:join-horizontal mt-8">
1316
<Label xl join floating input class="bg-white/10 py-3 px-3 w-full">
1417
<Text>Enter your email</Text>
15-
<Input
16-
type="email"
17-
placeholder="Enter your email"
18-
id="bd-email"
19-
name="email"
20-
/>
21-
</Label>
22-
<Button join primary type="submit" value="Subscribe" name="Submit" size="xl">
23-
Subscribe
24-
</Button>
18+
<Input type="email" placeholder="Enter your email" id="bd-email" name="email" />
19+
</Label>
20+
<Button join primary type="submit" value="Subscribe" name="Submit" size="xl"> Subscribe </Button>
2521
</Join>
2622
</form>
2723
</div>

app/pages/blog/index.vue

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts" setup>
22
definePageMeta({
3-
layout: 'page',
3+
layout: 'page'
44
})
55
66
const { data: posts } = await useAsyncData(() => queryCollection('blogPosts').order('date', 'DESC').all())
@@ -9,24 +9,26 @@ const otherPosts = computed(() => posts.value?.slice(1))
99
</script>
1010

1111
<template>
12-
<div class="bg-[url('/img/top_background.svg')] bg-no-repeat bg-cover bg-center text-base-content max-w-screen overflow-x-hidden">
12+
<div
13+
class="bg-[url('/img/top_background.svg')] bg-no-repeat bg-cover bg-center text-base-content max-w-screen overflow-x-hidden"
14+
>
1315
<div class="relative mx-auto max-w-[82rem] lg:drawer-open pt-16 px-4">
14-
<Titles title="Latest News" sub-title="Stay up to date with the latest Feathers news and updates" class="py-24"/>
16+
<Titles
17+
title="Latest News"
18+
sub-title="Stay up to date with the latest Feathers news and updates"
19+
class="py-24"
20+
/>
1521
</div>
1622
<div class="h-64"></div>
1723
</div>
18-
<div class="bg-base-200 min-h-screen max-w-[82rem] mx-auto -mt-64 rounded-4xl p-6 pt-12 lg:p-12">
19-
<div class="p-4 md:pt-8 md:pb-7 md:px-5 bg-base-300/50 rounded-4xl">
20-
<Text is="h2" semibold size="2xl" class="px-4">
21-
Latest Post
22-
</Text>
24+
<div class="bg-base-200 min-h-screen max-w-[82rem] mx-auto -mt-64 rounded-4xl p-4 md:p-6 md:pt-12 lg:p-12">
25+
<div class="pb-4 pt-6 md:pt-8 md:pb-7 md:px-5 bg-base-300/50 rounded-4xl">
26+
<Text is="h2" semibold size="2xl" class="px-4"> Latest Post </Text>
2327
<BlogPostTile :post="mostRecentPost!" card-classes="xl:card-side" />
2428
</div>
2529

26-
<div class="p-4 md:pt-8 md:pb-7 md:px-5 mt-24">
27-
<Text is="h2" semibold size="2xl" class="px-4">
28-
Recent Posts
29-
</Text>
30+
<div class="p-2 md:pt-8 md:pb-7 md:px-5 mt-24">
31+
<Text is="h2" semibold size="2xl" class="px-4"> Recent Posts </Text>
3032
<BlogPosts :posts="otherPosts!" class="my-12" />
3133
</div>
3234
</div>

0 commit comments

Comments
 (0)