fix(public): improve mobile experiance
This commit is contained in:
@@ -19,7 +19,7 @@ export function GithubButton() {
|
|||||||
// }, []);
|
// }, []);
|
||||||
return (
|
return (
|
||||||
<Button variant={'secondary'} asChild>
|
<Button variant={'secondary'} asChild>
|
||||||
<Link href="https://git.new/openpanel">
|
<Link href="https://git.new/openpanel" className="hidden md:block">
|
||||||
<svg
|
<svg
|
||||||
className="w-5 h-5"
|
className="w-5 h-5"
|
||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useIsDarkMode } from '@/lib/dark-mode';
|
import { useIsDarkMode } from '@/lib/dark-mode';
|
||||||
|
import { cn } from '@/lib/utils';
|
||||||
import { AnimatePresence, motion } from 'framer-motion';
|
import { AnimatePresence, motion } from 'framer-motion';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { Button } from './ui/button';
|
import { Button } from './ui/button';
|
||||||
@@ -77,12 +78,12 @@ export function HeroCarousel() {
|
|||||||
label: 'Retention',
|
label: 'Retention',
|
||||||
Component: () => <Image src="retention" />,
|
Component: () => <Image src="retention" />,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
id: 'profile',
|
// id: 'profile',
|
||||||
key: 'profile',
|
// key: 'profile',
|
||||||
label: 'Inspect profile',
|
// label: 'Inspect profile',
|
||||||
Component: () => <Image src="profile" />,
|
// Component: () => <Image src="profile" />,
|
||||||
},
|
// },
|
||||||
];
|
];
|
||||||
|
|
||||||
const [activeFrames, setActiveFrames] = useState<Frame[]>([frames[0]]);
|
const [activeFrames, setActiveFrames] = useState<Frame[]>([frames[0]]);
|
||||||
@@ -90,7 +91,7 @@ export function HeroCarousel() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="col gap-6 w-full">
|
<div className="col gap-6 w-full">
|
||||||
<div className="row gap-4 justify-center [&>div]:font-medium mt-1">
|
<div className="flex-wrap row gap-x-4 gap-y-2 justify-center [&>div]:font-medium mt-1">
|
||||||
{frames.map((frame) => (
|
{frames.map((frame) => (
|
||||||
<div key={frame.id} className="relative">
|
<div key={frame.id} className="relative">
|
||||||
<Button
|
<Button
|
||||||
@@ -130,7 +131,12 @@ export function HeroCarousel() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="pulled animated-iframe-gradient p-px pb-0 rounded-t-xl">
|
<div className="pulled animated-iframe-gradient p-px pb-0 rounded-t-xl">
|
||||||
<div className="overflow-hidden rounded-xl rounded-b-none w-full bg-background">
|
<div className="overflow-hidden rounded-xl rounded-b-none w-full bg-background">
|
||||||
<div className="relative w-full h-[750px]">
|
<div
|
||||||
|
className={cn(
|
||||||
|
'relative w-full h-[750px]',
|
||||||
|
activeFrame.id !== 'overview' && 'h-auto aspect-[4/3]',
|
||||||
|
)}
|
||||||
|
>
|
||||||
<AnimatePresence mode="popLayout" initial={false}>
|
<AnimatePresence mode="popLayout" initial={false}>
|
||||||
{activeFrames.slice(-2).map((frame) => (
|
{activeFrames.slice(-2).map((frame) => (
|
||||||
<motion.div
|
<motion.div
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export function Hero() {
|
|||||||
{/* Content */}
|
{/* Content */}
|
||||||
<div className="container relative z-10">
|
<div className="container relative z-10">
|
||||||
<div className="max-w-2xl col gap-4 pt-28 text-center mx-auto ">
|
<div className="max-w-2xl col gap-4 pt-28 text-center mx-auto ">
|
||||||
<h1 className="text-6xl font-bold leading-[1.1]">
|
<h1 className="text-4xl md:text-6xl font-bold leading-[1.1]">
|
||||||
An open-source alternative to <span>Mixpanel</span>
|
An open-source alternative to <span>Mixpanel</span>
|
||||||
</h1>
|
</h1>
|
||||||
<p className="text-xl text-muted-foreground">
|
<p className="text-xl text-muted-foreground">
|
||||||
@@ -24,7 +24,7 @@ export function Hero() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* CTA */}
|
{/* CTA */}
|
||||||
<div className="row gap-4 center-center my-12">
|
<div className="col md:row gap-4 center-center my-12">
|
||||||
<Button size="lg" asChild>
|
<Button size="lg" asChild>
|
||||||
<Link href="https://dashboard.openpanel.dev/register">
|
<Link href="https://dashboard.openpanel.dev/register">
|
||||||
Try it for free
|
Try it for free
|
||||||
|
|||||||
@@ -84,7 +84,10 @@ const Navbar = () => {
|
|||||||
<GithubButton />
|
<GithubButton />
|
||||||
{/* Sign in button */}
|
{/* Sign in button */}
|
||||||
<Button asChild>
|
<Button asChild>
|
||||||
<Link href="https://dashboard.openpanel.dev/login">
|
<Link
|
||||||
|
className="hidden md:block"
|
||||||
|
href="https://dashboard.openpanel.dev/login"
|
||||||
|
>
|
||||||
Sign in
|
Sign in
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
@@ -120,6 +123,7 @@ const Navbar = () => {
|
|||||||
key={link.url}
|
key={link.url}
|
||||||
href={link.url!}
|
href={link.url!}
|
||||||
className="text-foreground/80 hover:text-foreground text-xl font-medium p-4 px-4"
|
className="text-foreground/80 hover:text-foreground text-xl font-medium p-4 px-4"
|
||||||
|
onClick={() => setIsMobileMenuOpen(false)}
|
||||||
>
|
>
|
||||||
{link.text}
|
{link.text}
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -120,7 +120,9 @@ export function Faq() {
|
|||||||
>
|
>
|
||||||
{questions.map((q) => (
|
{questions.map((q) => (
|
||||||
<AccordionItem value={q.question} key={q.question}>
|
<AccordionItem value={q.question} key={q.question}>
|
||||||
<AccordionTrigger>{q.question}</AccordionTrigger>
|
<AccordionTrigger className="text-left">
|
||||||
|
{q.question}
|
||||||
|
</AccordionTrigger>
|
||||||
<AccordionContent>
|
<AccordionContent>
|
||||||
<div className="max-w-2xl col gap-2">
|
<div className="max-w-2xl col gap-2">
|
||||||
{q.answer.map((a) => (
|
{q.answer.map((a) => (
|
||||||
|
|||||||
@@ -73,15 +73,17 @@ export function ProfilesFeature() {
|
|||||||
key={profile.name + index.toString()}
|
key={profile.name + index.toString()}
|
||||||
className="w-full flex-shrink-0 p-8"
|
className="w-full flex-shrink-0 p-8"
|
||||||
>
|
>
|
||||||
<div className="row items-center gap-4">
|
<div className="col md:row justify-center md:justify-start items-center gap-4">
|
||||||
<img src={profile.avatar} className="size-32 rounded-full" />
|
<img src={profile.avatar} className="size-32 rounded-full" />
|
||||||
<div>
|
<div>
|
||||||
<div className="text-3xl font-semibold">{profile.name}</div>
|
<div className="text-3xl font-semibold">{profile.name}</div>
|
||||||
<div className="text-muted-foreground">{profile.email}</div>
|
<div className="text-muted-foreground text-center md:text-left">
|
||||||
|
{profile.email}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mt-8 grid grid-cols-2 gap-4">
|
<div className="mt-8 grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||||
<div className="rounded-lg border p-4 bg-background-light">
|
<div className="rounded-lg border p-4 bg-background-light">
|
||||||
<div className="text-sm text-muted-foreground">First seen</div>
|
<div className="text-sm text-muted-foreground">First seen</div>
|
||||||
<div className="text-lg font-medium">
|
<div className="text-lg font-medium">
|
||||||
|
|||||||
@@ -51,10 +51,10 @@ export function TwitterCard({
|
|||||||
</div>
|
</div>
|
||||||
<div className="col gap-1">
|
<div className="col gap-1">
|
||||||
<div className="col">
|
<div className="col">
|
||||||
<div className="row gap-2 items-center">
|
<div className="">
|
||||||
<span className="font-medium">{name}</span>
|
<span className="font-medium">{name}</span>
|
||||||
{verified && (
|
{verified && (
|
||||||
<div className="relative">
|
<div className="relative inline-block top-0.5 ml-1">
|
||||||
<BadgeIcon className="size-4 fill-[#1D9BF0] text-[#1D9BF0]" />
|
<BadgeIcon className="size-4 fill-[#1D9BF0] text-[#1D9BF0]" />
|
||||||
<div className="absolute inset-0 center-center">
|
<div className="absolute inset-0 center-center">
|
||||||
<CheckIcon className="size-2 text-white" strokeWidth={3} />
|
<CheckIcon className="size-2 text-white" strokeWidth={3} />
|
||||||
|
|||||||
Reference in New Issue
Block a user