Skip to content

Commit

Permalink
better mobile suppoort and default window
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar committed Jun 12, 2024
1 parent f0e9cc8 commit d0d53f0
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 33 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"build": "tsc && vite build",
"lint": "biome lint",
"preview": "vite preview",
"update-deps": "npm add @tscircuit/builder @tscircuit/pcb-viewer kicad-mod-converter",
"update-deps": "npm add @tscircuit/builder@latest @tscircuit/pcb-viewer@latest kicad-mod-converter@latest",
"aider": "aider --no-auto-commits --no-auto-lint"
},
"dependencies": {
"@tscircuit/builder": "^1.5.116",
"@tscircuit/pcb-viewer": "^1.3.12",
"@tscircuit/builder": "^1.5.117",
"@tscircuit/pcb-viewer": "^1.3.14",
"@tscircuit/react-fiber": "^1.1.27",
"kicad-mod-converter": "^0.0.23",
"react": "^18.2.0",
Expand Down
44 changes: 22 additions & 22 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function App() {
</a>
</header>
<div className="flex flex-1 flex-col md:flex-row">
<aside className="bg-gray-200 overflow-y-scroll md:max-w-[400px] md:w-1/3 flex-shrink-0 p-4 text-sm max-h-[30vh] md:max-h-[calc(100vh-110px)]">
<aside className="bg-gray-200 overflow-y-scroll md:max-w-[400px] md:w-1/3 flex-shrink-0 p-4 text-sm max-h-[30vh] md:max-h-[calc(100vh-64px)]">
<div className="flex gap-2">
<div
className="text-blue-600 cursor-pointer"
Expand Down Expand Up @@ -272,8 +272,8 @@ function App() {
</div>
</h3>
{soup && (
<div>
<div className="flex text-gray-500 items-center justify-end text-xs">
<div className="relative">
<div className="absolute top-[-22px] right-0 flex text-gray-500 items-center justify-end text-xs">
<FaRegLightbulb />
<div className="mb-1 ml-1">
press "d" on your keyboard to take measurements
Expand All @@ -282,8 +282,26 @@ function App() {
<PCBViewer
soup={soup}
allowEditing={false}
height={Math.max(800, window.innerHeight - 250)}
height={Math.min(800, window.innerHeight - 200)}
/>
<footer className="p-4 text-xs text-right flex justify-end items-center gap-1">
made with
<a
className="text-blue-600 inline-flex items-center"
href="https://github.com/tscircuit/tscircuit"
>
<FaGithub className="mt-0.5 mr-0.5" />
<span>tscircuit</span>
</a>
by
<a
className="text-blue-600 inline-flex items-center"
href="https://x.com/seveibar"
>
<FaTwitter className="mt-0.5 mr-0.5" />
<span>seveibar</span>
</a>
</footer>
</div>
)}
{/* <pre className="bg-gray-100 p-4">{fileContent}</pre> */}
Expand All @@ -301,24 +319,6 @@ function App() {
)}
</section>
</div>
<footer className="p-4 text-xs text-center flex justify-center items-center gap-1">
made with
<a
className="text-blue-600 inline-flex items-center"
href="https://github.com/tscircuit/tscircuit"
>
<FaGithub className="mt-0.5 mr-0.5" />
<span>tscircuit</span>
</a>
by
<a
className="text-blue-600 inline-flex items-center"
href="https://x.com/seveibar"
>
<FaTwitter className="mt-0.5 mr-0.5" />
<span>seveibar</span>
</a>
</footer>
</div>
)
}
Expand Down

0 comments on commit d0d53f0

Please sign in to comment.