enzostvs HF staff commited on
Commit
e45f8c3
1 Parent(s): 9c2db8d

ui mobile tweaks

Browse files
app/page.tsx CHANGED
@@ -12,7 +12,7 @@ export default async function Home() {
12
  <main className="flex min-h-screen flex-col items-center justify-center lg:justify-start p-8 lg:p-24 lg:pt-44">
13
  <div className="w-full max-w-xl mx-auto grid gap-16 lg:gap-24 grid-cols-1">
14
  <header className="grid grid-cols-1 gap-5">
15
- <h1 className="relative font-sans text-center text-5xl lg:text-7xl font-extrabold max-w-max mx-auto text-transparent bg-clip-text bg-flashy">
16
  Space Shuffler
17
  <Image
18
  src={CardsSvg}
@@ -22,7 +22,7 @@ export default async function Home() {
22
  className="w-10 lg:w-14 absolute -right-9 lg:-right-12 -top-5 lg:-top-6 -rotate-6"
23
  />
24
  </h1>
25
- <h2 className="font-serif text-white/60 text-xl lg:text-2xl text-center">
26
  Find hidden gems from 180k Spaces
27
  </h2>
28
  </header>
 
12
  <main className="flex min-h-screen flex-col items-center justify-center lg:justify-start p-8 lg:p-24 lg:pt-44">
13
  <div className="w-full max-w-xl mx-auto grid gap-16 lg:gap-24 grid-cols-1">
14
  <header className="grid grid-cols-1 gap-5">
15
+ <h1 className="relative font-sans text-center text-4xl lg:text-7xl font-extrabold max-w-max mx-auto text-transparent bg-clip-text bg-flashy">
16
  Space Shuffler
17
  <Image
18
  src={CardsSvg}
 
22
  className="w-10 lg:w-14 absolute -right-9 lg:-right-12 -top-5 lg:-top-6 -rotate-6"
23
  />
24
  </h1>
25
+ <h2 className="font-serif text-white/60 text-lg lg:text-2xl text-center">
26
  Find hidden gems from 180k Spaces
27
  </h2>
28
  </header>
components/shuffler/button.tsx CHANGED
@@ -3,10 +3,10 @@ import { Shuffle } from "lucide-react";
3
  export const ButtonShuffler = ({ onClick }: { onClick: () => void }) => {
4
  return (
5
  <button
6
- className="bg-white/90 hover:bg-white transition-all duration-200 rounded-full text-xl flex items-center justify-center gap-3 text-black px-8 py-5 font-bold"
7
  onClick={onClick}
8
  >
9
- <Shuffle size={28} />
10
  Shuffle
11
  </button>
12
  );
 
3
  export const ButtonShuffler = ({ onClick }: { onClick: () => void }) => {
4
  return (
5
  <button
6
+ className="bg-white/90 hover:bg-white transition-all max-lg:w-full duration-200 lg:rounded-full text-lg lg:text-xl flex items-center justify-center gap-3 text-black px-6 py-3.5 lg:px-8 lg:py-5 font-bold"
7
  onClick={onClick}
8
  >
9
+ <Shuffle className="w-5 lg:w-8" />
10
  Shuffle
11
  </button>
12
  );
components/shuffler/index.tsx CHANGED
@@ -27,7 +27,7 @@ export const Shuffler = ({
27
 
28
  return (
29
  <motion.div className="grid grid-cols-1 gap-10 relative">
30
- <div className="relative w-full h-[350px]">
31
  <AnimatePresence initial={false}>
32
  <Card key={index + 1} front={false}>
33
  <Space space={nextSpace} />
@@ -37,8 +37,8 @@ export const Shuffler = ({
37
  </Card>
38
  </AnimatePresence>
39
  </div>
40
- <div className="w-4 h-[1px] bg-white/50 mx-auto" />
41
- <footer className="flex items-center justify-center">
42
  <ButtonShuffler
43
  onClick={() => {
44
  getSpace().then((newSpace) => {
 
27
 
28
  return (
29
  <motion.div className="grid grid-cols-1 gap-10 relative">
30
+ <div className="relative w-full h-[290px] lg:h-[350px]">
31
  <AnimatePresence initial={false}>
32
  <Card key={index + 1} front={false}>
33
  <Space space={nextSpace} />
 
37
  </Card>
38
  </AnimatePresence>
39
  </div>
40
+ <div className="w-4 h-[1px] bg-white/50 mx-auto hidden lg:block" />
41
+ <footer className="flex items-center justify-center fixed lg:relative bottom-0 left-0 w-full">
42
  <ButtonShuffler
43
  onClick={() => {
44
  getSpace().then((newSpace) => {
components/space/index.tsx CHANGED
@@ -10,7 +10,7 @@ export const Space: React.FC<{ space: SpaceProps }> = ({ space }) => {
10
  <main className="w-full rounded-xl grid grid-cols-1 gap-3">
11
  <SpaceHeader space={space} />
12
  <div className="flex items-start justify-between">
13
- <p className="text-[1.95rem] leading-[2rem] text-white/80 font-light">
14
  {space?.title}
15
  </p>
16
  <Link
@@ -25,7 +25,7 @@ export const Space: React.FC<{ space: SpaceProps }> = ({ space }) => {
25
  </div>
26
  <SpaceAuthor author={space?.authorData} />
27
  {space?.shortDescription && (
28
- <p className="text-xl font-serif text-white/60 flex items-center justify-start gap-1.5 line-clamp-1">
29
  Explore thousands of community trained LoRAs.
30
  </p>
31
  )}
 
10
  <main className="w-full rounded-xl grid grid-cols-1 gap-3">
11
  <SpaceHeader space={space} />
12
  <div className="flex items-start justify-between">
13
+ <p className="text-2xl lg:text-[1.95rem] lg:leading-[2rem] text-white/80 font-light">
14
  {space?.title}
15
  </p>
16
  <Link
 
25
  </div>
26
  <SpaceAuthor author={space?.authorData} />
27
  {space?.shortDescription && (
28
+ <p className="text-lg font-serif text-white/60 flex items-center justify-start gap-1.5 line-clamp-1">
29
  Explore thousands of community trained LoRAs.
30
  </p>
31
  )}
components/space/sub/author.tsx CHANGED
@@ -3,7 +3,7 @@ import Image from "next/image";
3
 
4
  export const SpaceAuthor = ({ author }: { author: SpaceAuthorData }) => {
5
  return (
6
- <p className="text-xl font-serif text-white/60 flex items-center justify-start gap-1.5">
7
  by
8
  <Image
9
  src={
 
3
 
4
  export const SpaceAuthor = ({ author }: { author: SpaceAuthorData }) => {
5
  return (
6
+ <p className="text-lg lg:text-xl font-serif text-white/60 flex items-center justify-start gap-2">
7
  by
8
  <Image
9
  src={
components/space/sub/header.tsx CHANGED
@@ -4,7 +4,7 @@ import { Space } from "@/utils/types";
4
 
5
  export const SpaceHeader = ({ space }: { space: Space }) => {
6
  return (
7
- <figure className="relative z-[1] h-[200px] px-6 py-4 mb-4">
8
  <div
9
  className={`bg-gradient-to-br ${space.colorFrom} ${space.colorTo} absolute w-full top-0 left-0 h-full rounded-2xl -z-[1]`}
10
  />
@@ -21,7 +21,7 @@ export const SpaceHeader = ({ space }: { space: Space }) => {
21
  {space.likes}
22
  </p>
23
  </div>
24
- <p className="absolute top-0 left-0 h-full w-full flex items-center justify-center opacity-90 text-7xl text-center whitespace-nowrap truncate">
25
  {space.emoji}
26
  </p>
27
  </figure>
 
4
 
5
  export const SpaceHeader = ({ space }: { space: Space }) => {
6
  return (
7
+ <figure className="relative z-[1] h-[150px] lg:h-[200px] px-6 py-4 mb-4">
8
  <div
9
  className={`bg-gradient-to-br ${space.colorFrom} ${space.colorTo} absolute w-full top-0 left-0 h-full rounded-2xl -z-[1]`}
10
  />
 
21
  {space.likes}
22
  </p>
23
  </div>
24
+ <p className="absolute top-0 left-0 h-full w-full flex items-center justify-center opacity-90 text-5xl lg:text-7xl text-center whitespace-nowrap truncate">
25
  {space.emoji}
26
  </p>
27
  </figure>