jbilcke-hf HF staff commited on
Commit
d46b5b4
Β·
1 Parent(s): 738663d

more compact layout

Browse files
Files changed (3) hide show
  1. client/src/app.tsx +9 -7
  2. client/src/layout.tsx +2 -2
  3. public/index.js +9 -9
client/src/app.tsx CHANGED
@@ -101,7 +101,7 @@ export function App() {
101
  <AlertDescription>{interruptMessage}</AlertDescription>
102
  </Alert>
103
  )}
104
- <div className="mb-5 relative">
105
  <div className="flex flex-row items-center justify-between w-full">
106
  <div className="flex items-center space-x-2">
107
  <div className="flex items-center justify-center">
@@ -115,20 +115,22 @@ export function App() {
115
  />
116
  <label
117
  htmlFor="imageInput"
118
- className={`cursor-pointer inline-flex items-center px-3 h-10 border border-transparent text-sm font-medium rounded-md text-white ${
 
 
119
  isMediaPipeReady ? 'bg-slate-600 hover:bg-slate-500' : 'bg-slate-500 cursor-not-allowed'
120
  } focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500 shadow-xl`}
121
  >
122
- <PiImageSquare className="w-6 h-6 mr-2" />
123
  {imageFile ? `Replace` : (isMediaPipeReady ? 'Choose a portrait photo' : 'Initializing...')}
124
  </label>
125
  </div>
126
  {previewImage && (
127
  <button
128
  onClick={handleDownload}
129
- className="inline-flex items-center px-3 h-10 border border-transparent text-sm font-medium rounded-md text-white bg-zinc-600 hover:bg-zinc-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-zinc-500 shadow-xl"
130
  >
131
- <FiDownload className="w-5 h-5 mr-2" />
132
  Download
133
  </button>
134
  )}
@@ -155,7 +157,7 @@ export function App() {
155
  Autotrack head
156
  </label>
157
  */}
158
- <label className="mt-4 flex items-center">
159
  <input
160
  type="checkbox"
161
  checked={isDebugMode}
@@ -167,7 +169,7 @@ export function App() {
167
  </div>}
168
  </div>
169
  {previewImage && (
170
- <div className="mt-5 relative shadow-2xl rounded-xl overflow-hidden">
171
  <img
172
  src={previewImage}
173
  alt="Preview"
 
101
  <AlertDescription>{interruptMessage}</AlertDescription>
102
  </Alert>
103
  )}
104
+ <div className="mb-4 relative">
105
  <div className="flex flex-row items-center justify-between w-full">
106
  <div className="flex items-center space-x-2">
107
  <div className="flex items-center justify-center">
 
115
  />
116
  <label
117
  htmlFor="imageInput"
118
+ className={`cursor-pointer inline-flex items-center border border-transparent font-medium rounded-md text-white ${
119
+ imageFile ? 'text-xs px-2 h-8' : 'text-lg px-4 h-12'
120
+ } ${
121
  isMediaPipeReady ? 'bg-slate-600 hover:bg-slate-500' : 'bg-slate-500 cursor-not-allowed'
122
  } focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500 shadow-xl`}
123
  >
124
+ <PiImageSquare className="w-4 h-4 mr-1.5" />
125
  {imageFile ? `Replace` : (isMediaPipeReady ? 'Choose a portrait photo' : 'Initializing...')}
126
  </label>
127
  </div>
128
  {previewImage && (
129
  <button
130
  onClick={handleDownload}
131
+ className="inline-flex items-center px-2 h-8 border border-transparent text-xs font-medium rounded-md text-white bg-zinc-600 hover:bg-zinc-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-zinc-500 shadow-xl"
132
  >
133
+ <FiDownload className="w-4 h-4 mr-1.5" />
134
  Download
135
  </button>
136
  )}
 
157
  Autotrack head
158
  </label>
159
  */}
160
+ <label className="mt-2 flex items-center text-sm mr-2">
161
  <input
162
  type="checkbox"
163
  checked={isDebugMode}
 
169
  </div>}
170
  </div>
171
  {previewImage && (
172
+ <div className="mt-2 relative shadow-2xl rounded-xl overflow-hidden">
173
  <img
174
  src={previewImage}
175
  alt="Preview"
client/src/layout.tsx CHANGED
@@ -4,8 +4,8 @@ export function Layout({ children }: { children: ReactNode }) {
4
  return (
5
  <div className="fixed min-h-screen w-full flex items-center justify-center bg-gradient-to-br from-gray-300 to-stone-300"
6
  style={{ boxShadow: "inset 0 0 10vh 0 rgb(0 0 0 / 30%)" }}>
7
- <div className="min-h-screen w-full py-8 flex flex-col justify-center">
8
- <div className="flex flex-col items-center justify-center p-4 sm:max-w-5xl sm:mx-auto">
9
  {children}
10
  </div>
11
  </div>
 
4
  return (
5
  <div className="fixed min-h-screen w-full flex items-center justify-center bg-gradient-to-br from-gray-300 to-stone-300"
6
  style={{ boxShadow: "inset 0 0 10vh 0 rgb(0 0 0 / 30%)" }}>
7
+ <div className="min-h-screen w-full flex flex-col justify-center">
8
+ <div className="flex flex-col items-center justify-center p-2 sm:max-w-5xl sm:mx-auto">
9
  {children}
10
  </div>
11
  </div>
public/index.js CHANGED
@@ -33475,9 +33475,9 @@ function Layout({ children }) {
33475
  className: "fixed min-h-screen w-full flex items-center justify-center bg-gradient-to-br from-gray-300 to-stone-300",
33476
  style: { boxShadow: "inset 0 0 10vh 0 rgb(0 0 0 / 30%)" },
33477
  children: jsx_dev_runtime3.jsxDEV("div", {
33478
- className: "min-h-screen w-full py-8 flex flex-col justify-center",
33479
  children: jsx_dev_runtime3.jsxDEV("div", {
33480
- className: "flex flex-col items-center justify-center p-4 sm:max-w-5xl sm:mx-auto",
33481
  children
33482
  }, undefined, false, undefined, this)
33483
  }, undefined, false, undefined, this)
@@ -33586,7 +33586,7 @@ function App() {
33586
  ]
33587
  }, undefined, true, undefined, this),
33588
  jsx_dev_runtime4.jsxDEV("div", {
33589
- className: "mb-5 relative",
33590
  children: [
33591
  jsx_dev_runtime4.jsxDEV("div", {
33592
  className: "flex flex-row items-center justify-between w-full",
@@ -33607,10 +33607,10 @@ function App() {
33607
  }, undefined, false, undefined, this),
33608
  jsx_dev_runtime4.jsxDEV("label", {
33609
  htmlFor: "imageInput",
33610
- className: `cursor-pointer inline-flex items-center px-3 h-10 border border-transparent text-sm font-medium rounded-md text-white ${isMediaPipeReady ? "bg-slate-600 hover:bg-slate-500" : "bg-slate-500 cursor-not-allowed"} focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500 shadow-xl`,
33611
  children: [
33612
  jsx_dev_runtime4.jsxDEV(PiImageSquare, {
33613
- className: "w-6 h-6 mr-2"
33614
  }, undefined, false, undefined, this),
33615
  imageFile ? `Replace` : isMediaPipeReady ? "Choose a portrait photo" : "Initializing..."
33616
  ]
@@ -33619,10 +33619,10 @@ function App() {
33619
  }, undefined, true, undefined, this),
33620
  previewImage && jsx_dev_runtime4.jsxDEV("button", {
33621
  onClick: handleDownload,
33622
- className: "inline-flex items-center px-3 h-10 border border-transparent text-sm font-medium rounded-md text-white bg-zinc-600 hover:bg-zinc-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-zinc-500 shadow-xl",
33623
  children: [
33624
  jsx_dev_runtime4.jsxDEV(FiDownload, {
33625
- className: "w-5 h-5 mr-2"
33626
  }, undefined, false, undefined, this),
33627
  "Download"
33628
  ]
@@ -33632,7 +33632,7 @@ function App() {
33632
  previewImage && jsx_dev_runtime4.jsxDEV("div", {
33633
  className: "flex items-center space-x-2",
33634
  children: jsx_dev_runtime4.jsxDEV("label", {
33635
- className: "mt-4 flex items-center",
33636
  children: [
33637
  jsx_dev_runtime4.jsxDEV("input", {
33638
  type: "checkbox",
@@ -33647,7 +33647,7 @@ function App() {
33647
  ]
33648
  }, undefined, true, undefined, this),
33649
  previewImage && jsx_dev_runtime4.jsxDEV("div", {
33650
- className: "mt-5 relative shadow-2xl rounded-xl overflow-hidden",
33651
  children: [
33652
  jsx_dev_runtime4.jsxDEV("img", {
33653
  src: previewImage,
 
33475
  className: "fixed min-h-screen w-full flex items-center justify-center bg-gradient-to-br from-gray-300 to-stone-300",
33476
  style: { boxShadow: "inset 0 0 10vh 0 rgb(0 0 0 / 30%)" },
33477
  children: jsx_dev_runtime3.jsxDEV("div", {
33478
+ className: "min-h-screen w-full flex flex-col justify-center",
33479
  children: jsx_dev_runtime3.jsxDEV("div", {
33480
+ className: "flex flex-col items-center justify-center p-2 sm:max-w-5xl sm:mx-auto",
33481
  children
33482
  }, undefined, false, undefined, this)
33483
  }, undefined, false, undefined, this)
 
33586
  ]
33587
  }, undefined, true, undefined, this),
33588
  jsx_dev_runtime4.jsxDEV("div", {
33589
+ className: "mb-4 relative",
33590
  children: [
33591
  jsx_dev_runtime4.jsxDEV("div", {
33592
  className: "flex flex-row items-center justify-between w-full",
 
33607
  }, undefined, false, undefined, this),
33608
  jsx_dev_runtime4.jsxDEV("label", {
33609
  htmlFor: "imageInput",
33610
+ className: `cursor-pointer inline-flex items-center border border-transparent font-medium rounded-md text-white ${imageFile ? "text-xs px-2 h-8" : "text-lg px-4 h-12"} ${isMediaPipeReady ? "bg-slate-600 hover:bg-slate-500" : "bg-slate-500 cursor-not-allowed"} focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500 shadow-xl`,
33611
  children: [
33612
  jsx_dev_runtime4.jsxDEV(PiImageSquare, {
33613
+ className: "w-4 h-4 mr-1.5"
33614
  }, undefined, false, undefined, this),
33615
  imageFile ? `Replace` : isMediaPipeReady ? "Choose a portrait photo" : "Initializing..."
33616
  ]
 
33619
  }, undefined, true, undefined, this),
33620
  previewImage && jsx_dev_runtime4.jsxDEV("button", {
33621
  onClick: handleDownload,
33622
+ className: "inline-flex items-center px-2 h-8 border border-transparent text-xs font-medium rounded-md text-white bg-zinc-600 hover:bg-zinc-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-zinc-500 shadow-xl",
33623
  children: [
33624
  jsx_dev_runtime4.jsxDEV(FiDownload, {
33625
+ className: "w-4 h-4 mr-1.5"
33626
  }, undefined, false, undefined, this),
33627
  "Download"
33628
  ]
 
33632
  previewImage && jsx_dev_runtime4.jsxDEV("div", {
33633
  className: "flex items-center space-x-2",
33634
  children: jsx_dev_runtime4.jsxDEV("label", {
33635
+ className: "mt-2 flex items-center text-sm mr-2",
33636
  children: [
33637
  jsx_dev_runtime4.jsxDEV("input", {
33638
  type: "checkbox",
 
33647
  ]
33648
  }, undefined, true, undefined, this),
33649
  previewImage && jsx_dev_runtime4.jsxDEV("div", {
33650
+ className: "mt-2 relative shadow-2xl rounded-xl overflow-hidden",
33651
  children: [
33652
  jsx_dev_runtime4.jsxDEV("img", {
33653
  src: previewImage,