-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from CalvinWalzel/v2/layout-improvements
- Loading branch information
Showing
14 changed files
with
264 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Link as InertiaLink, InertiaLinkProps } from "@inertiajs/react"; | ||
|
||
import { Button } from "@/components/ui/button"; | ||
|
||
interface Props extends InertiaLinkProps {} | ||
|
||
function Link({ children, ...props }: Props) { | ||
return ( | ||
<Button variant="link" asChild className="px-0 py-0"> | ||
<InertiaLink {...props}>{children}</InertiaLink> | ||
</Button> | ||
); | ||
} | ||
|
||
export default Link; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import * as React from "react"; | ||
|
||
import { cn } from "@/utils/ui"; | ||
|
||
const Card = React.forwardRef< | ||
HTMLDivElement, | ||
React.HTMLAttributes<HTMLDivElement> | ||
>(({ className, ...props }, ref) => ( | ||
<div | ||
ref={ref} | ||
className={cn( | ||
"rounded-lg border bg-card text-card-foreground shadow-sm", | ||
className, | ||
)} | ||
{...props} | ||
/> | ||
)); | ||
Card.displayName = "Card"; | ||
|
||
const CardHeader = React.forwardRef< | ||
HTMLDivElement, | ||
React.HTMLAttributes<HTMLDivElement> | ||
>(({ className, ...props }, ref) => ( | ||
<div | ||
ref={ref} | ||
className={cn("flex flex-col space-y-1.5 p-6", className)} | ||
{...props} | ||
/> | ||
)); | ||
CardHeader.displayName = "CardHeader"; | ||
|
||
const CardTitle = React.forwardRef< | ||
HTMLParagraphElement, | ||
React.HTMLAttributes<HTMLHeadingElement> | ||
>(({ className, children, ...props }, ref) => ( | ||
<h3 | ||
ref={ref} | ||
className={cn( | ||
"text-2xl font-semibold leading-none tracking-tight", | ||
className, | ||
)} | ||
{...props} | ||
> | ||
{children} | ||
</h3> | ||
)); | ||
CardTitle.displayName = "CardTitle"; | ||
|
||
const CardDescription = React.forwardRef< | ||
HTMLParagraphElement, | ||
React.HTMLAttributes<HTMLParagraphElement> | ||
>(({ className, ...props }, ref) => ( | ||
<p | ||
ref={ref} | ||
className={cn("text-sm text-muted-foreground", className)} | ||
{...props} | ||
/> | ||
)); | ||
CardDescription.displayName = "CardDescription"; | ||
|
||
const CardContent = React.forwardRef< | ||
HTMLDivElement, | ||
React.HTMLAttributes<HTMLDivElement> | ||
>(({ className, ...props }, ref) => ( | ||
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} /> | ||
)); | ||
CardContent.displayName = "CardContent"; | ||
|
||
const CardFooter = React.forwardRef< | ||
HTMLDivElement, | ||
React.HTMLAttributes<HTMLDivElement> | ||
>(({ className, ...props }, ref) => ( | ||
<div | ||
ref={ref} | ||
className={cn("flex items-center p-6 pt-0", className)} | ||
{...props} | ||
/> | ||
)); | ||
CardFooter.displayName = "CardFooter"; | ||
|
||
export { | ||
Card, | ||
CardHeader, | ||
CardFooter, | ||
CardTitle, | ||
CardDescription, | ||
CardContent, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import Footer from "@/layouts/application/footer"; | ||
|
||
interface Props { | ||
children: React.ReactNode; | ||
} | ||
|
||
function Layout({ children }: Props) { | ||
return ( | ||
<div className="min-h-screen bg-gray-100"> | ||
<header className="bg-white shadow"> | ||
<div className="container mx-auto py-6"> | ||
<h1 className="text-3xl font-bold text-red-600">Ruby Companies</h1> | ||
</div> | ||
</header> | ||
<main> | ||
<div className="container mx-auto pt-5 pb-10">{children}</div> | ||
</main> | ||
<Footer /> | ||
</div> | ||
); | ||
} | ||
|
||
Layout.displayName = "layouts/application"; | ||
|
||
export default Layout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import ExternalLink from "@/components/external_link"; | ||
import { Button } from "@/components/ui/button"; | ||
|
||
import githubImage from "@/images/brands/github.svg"; | ||
|
||
function Footer() { | ||
return ( | ||
<footer className="bg-background border-t"> | ||
<div className="container mx-auto py-4 px-4 sm:px-6 lg:px-8"> | ||
<div className="flex flex-col sm:flex-row justify-between items-start sm:items-center space-y-4 sm:space-y-0"> | ||
<div className="flex flex-row items-center space-x-2"> | ||
<Button variant="ghost" size="icon" asChild className="p-0 h-auto"> | ||
<a | ||
href="https://github.com/CalvinWalzel/ruby-companies" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<img src={githubImage} alt="GitHub" className="w-5 h-5 m-0" /> | ||
<span className="sr-only">GitHub repository</span> | ||
</a> | ||
</Button> | ||
<div className="text-sm text-muted-foreground"> | ||
created by Calvin Walzel & Gitta van der Pol | ||
</div> | ||
</div> | ||
<div className="flex items-center space-x-4"> | ||
<span className="text-sm text-muted-foreground flex items-center"> | ||
sponsored by{" "} | ||
<ExternalLink | ||
href="https://avohq.io" | ||
className="ml-1" | ||
icon={null} | ||
> | ||
AvoHQ | ||
</ExternalLink> | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
</footer> | ||
); | ||
} | ||
|
||
Footer.displayName = "layouts/application/footer"; | ||
|
||
export default Footer; |
Oops, something went wrong.