mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 10:42:08 +00:00
Updated styles to better fit mobile layout
This commit is contained in:
@@ -27,12 +27,12 @@ const BeerInfoHeader: FC<{
|
|||||||
<article className="card-body">
|
<article className="card-body">
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
<header>
|
<header>
|
||||||
<h1 className="text-4xl font-bold">{beerPost.name}</h1>
|
<h1 className="text-2xl font-bold lg:text-4xl">{beerPost.name}</h1>
|
||||||
<h2 className="text-2xl font-semibold">
|
<h2 className="text-lg font-semibold lg:text-2xl">
|
||||||
by{' '}
|
by{' '}
|
||||||
<Link
|
<Link
|
||||||
href={`/breweries/${beerPost.brewery.id}`}
|
href={`/breweries/${beerPost.brewery.id}`}
|
||||||
className="link-hover link text-2xl font-semibold"
|
className="link-hover link font-semibold"
|
||||||
>
|
>
|
||||||
{beerPost.brewery.name}
|
{beerPost.brewery.name}
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ const BeerPostLikeButton: FC<{
|
|||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className={`btn gap-2 rounded-2xl ${
|
className={`btn-sm btn gap-2 rounded-2xl lg:btn-md ${
|
||||||
!isLiked ? 'btn-ghost outline' : 'btn-primary'
|
!isLiked ? 'btn-ghost outline' : 'btn-primary'
|
||||||
}`}
|
}`}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -41,12 +41,12 @@ const BeerPostLikeButton: FC<{
|
|||||||
>
|
>
|
||||||
{isLiked ? (
|
{isLiked ? (
|
||||||
<>
|
<>
|
||||||
<FaThumbsUp className="text-2xl" />
|
<FaThumbsUp className="lg:text-2xl" />
|
||||||
Liked
|
Liked
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<FaRegThumbsUp className="text-2xl" />
|
<FaRegThumbsUp className="lg:text-2xl" />
|
||||||
Like
|
Like
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -15,15 +15,21 @@ const BeerRecommendations: FunctionComponent<BeerRecommendationsProps> = ({
|
|||||||
<div key={beerPost.id} className="w-full">
|
<div key={beerPost.id} className="w-full">
|
||||||
<div>
|
<div>
|
||||||
<Link className="link-hover" href={`/beers/${beerPost.id}`} scroll={false}>
|
<Link className="link-hover" href={`/beers/${beerPost.id}`} scroll={false}>
|
||||||
<h2 className="text-2xl font-bold">{beerPost.name}</h2>
|
<h2 className="truncate text-lg font-bold lg:text-2xl">
|
||||||
|
{beerPost.name}
|
||||||
|
</h2>
|
||||||
</Link>
|
</Link>
|
||||||
<Link href={`/breweries/${beerPost.brewery.id}`} className="link-hover">
|
<Link href={`/breweries/${beerPost.brewery.id}`} className="link-hover">
|
||||||
<p className="text-lg font-semibold">{beerPost.brewery.name}</p>
|
<p className="truncate text-lg font-semibold lg:text-xl">
|
||||||
|
{beerPost.brewery.name}
|
||||||
|
</p>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>{beerPost.abv}% ABV</p>
|
<div className="text-md space-x-3 lg:text-lg">
|
||||||
<p>{beerPost.ibu} IBU</p>
|
<span>{beerPost.abv}% ABV</span>
|
||||||
|
<span>{beerPost.ibu} IBU</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ const CommentCardBody: FC<CommentCardProps> = ({ comment, mutate, ref }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="card-body animate-in fade-in-10" ref={ref}>
|
<div className="card-body animate-in fade-in-10" ref={ref}>
|
||||||
<div className="flex flex-col justify-between sm:flex-row">
|
<div className="flex flex-row justify-between">
|
||||||
<div>
|
<div>
|
||||||
<h3 className="font-semibold sm:text-2xl">
|
<h3 className="font-semibold sm:text-2xl">
|
||||||
<Link href={`/users/${comment.postedBy.id}`} className="link-hover link">
|
<Link href={`/users/${comment.postedBy.id}`} className="link-hover link">
|
||||||
|
|||||||
@@ -27,12 +27,12 @@ const BeerCard: FC<{ post: z.infer<typeof beerPostQueryResult> }> = ({ post }) =
|
|||||||
<div className="card-body justify-between">
|
<div className="card-body justify-between">
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<Link href={`/beers/${post.id}`}>
|
<Link href={`/beers/${post.id}`}>
|
||||||
<h2 className="link-hover link truncate text-2xl font-bold lg:text-3xl">
|
<h2 className="link-hover link overflow-hidden text-ellipsis whitespace-normal text-2xl font-bold lg:text-3xl">
|
||||||
{post.name}
|
{post.name}
|
||||||
</h2>
|
</h2>
|
||||||
</Link>
|
</Link>
|
||||||
<Link href={`/breweries/${post.brewery.id}`}>
|
<Link href={`/breweries/${post.brewery.id}`}>
|
||||||
<h3 className="text-md link-hover link truncate lg:text-xl">
|
<h3 className="text-md link-hover link overflow-hidden text-ellipsis lg:text-xl">
|
||||||
{post.brewery.name}
|
{post.brewery.name}
|
||||||
</h3>
|
</h3>
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -76,10 +76,10 @@ const BeerByIdPage: NextPage<BeerPageProps> = ({ beerPost, beerRecommendations }
|
|||||||
) : (
|
) : (
|
||||||
<Tab.Group>
|
<Tab.Group>
|
||||||
<Tab.List className="tabs tabs-boxed items-center justify-center rounded-2xl bg-base-300">
|
<Tab.List className="tabs tabs-boxed items-center justify-center rounded-2xl bg-base-300">
|
||||||
<Tab className="tab tab-lg w-1/2 uppercase ui-selected:tab-active">
|
<Tab className="tab tab-md w-1/2 uppercase ui-selected:tab-active">
|
||||||
Comments
|
Comments
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab className="tab tab-lg w-1/2 uppercase ui-selected:tab-active">
|
<Tab className="tab tab-md w-1/2 uppercase ui-selected:tab-active">
|
||||||
Other Beers
|
Other Beers
|
||||||
</Tab>
|
</Tab>
|
||||||
</Tab.List>
|
</Tab.List>
|
||||||
|
|||||||
@@ -39,12 +39,12 @@ const BeerPage: NextPage = () => {
|
|||||||
</Head>
|
</Head>
|
||||||
<div className="flex items-center justify-center bg-base-100" ref={pageRef}>
|
<div className="flex items-center justify-center bg-base-100" ref={pageRef}>
|
||||||
<div className="my-10 flex w-11/12 flex-col space-y-4 lg:w-8/12 2xl:w-7/12">
|
<div className="my-10 flex w-11/12 flex-col space-y-4 lg:w-8/12 2xl:w-7/12">
|
||||||
<header className="my-10 flex justify-between">
|
<header className="my-10 flex flex-col justify-between lg:flex-row">
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<h1 className="text-6xl font-bold">The Biergarten Index</h1>
|
<h1 className="text-6xl font-bold">The Biergarten Index</h1>
|
||||||
</div>
|
</div>
|
||||||
{!!user && (
|
{!!user && (
|
||||||
<div>
|
<div className="mt-6 lg:mt-0">
|
||||||
<Link href="/beers/create" className="btn-primary btn">
|
<Link href="/beers/create" className="btn-primary btn">
|
||||||
Create a new beer post
|
Create a new beer post
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
Reference in New Issue
Block a user