Skip to content

Commit

Permalink
Merge pull request #157 from LuanRoger/new-home
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanRoger authored Jan 26, 2025
2 parents 12957e3 + 760ef6a commit d73071f
Show file tree
Hide file tree
Showing 39 changed files with 422 additions and 74 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ To develop a Electron app, you probably will need some UI, test, formatter, styl
- [Shadcn UI](https://ui.shadcn.com)
- [Geist](https://vercel.com/font) as default font
- [i18next](https://www.i18next.com)
- [TanStack Router](https://tanstack.com/router)
- [Lucide](https://lucide.dev)

### Test 🧪
Expand All @@ -52,6 +53,7 @@ To develop a Electron app, you probably will need some UI, test, formatter, styl
- `titleBarStyle`: hidden (Using custom title bar)
- Geist as default font
- Some default styles was applied, check the [`styles`](https://github.com/LuanRoger/electron-shadcn/tree/main/src/styles) directory
- React DevTools are installed by default

> If you don't know some of these libraries or tools, I recommend you to check their documentation to understand how they work and how to use them.
Expand All @@ -63,6 +65,7 @@ To develop a Electron app, you probably will need some UI, test, formatter, styl
├── ./src/assets/
│ └── ./src/assets/fonts/
├── ./src/components/
│ ├── ./src/components/template
│ └── ./src/components/ui/
├── ./src/helpers/
│ └── ./src/helpers/ipc/
Expand All @@ -76,6 +79,7 @@ To develop a Electron app, you probably will need some UI, test, formatter, styl
- `src/`: Main directory
- `assets/`: Store assets like images, fonts, etc.
- `components/`: Store UI components
- `template/`: Store the all not important components used by the template. It doesn't include the `WindowRegion` or the theme toggler, if you want to start an empty project, you can safely delete this directory.
- `ui/`: Store Shadcn UI components (this is the default direcotry used by Shadcn UI)
- `helpers/`: Store IPC related functions to be called in the renderer process
- `ipc/`: Directory to store IPC context and listener functions
Expand Down
Binary file modified images/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
154 changes: 154 additions & 0 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
"vite": "^6.0.7"
},
"dependencies": {
"@icons-pack/react-simple-icons": "^11.1.0",
"@radix-ui/react-navigation-menu": "^1.2.3",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-toggle": "^1.1.1",
"@radix-ui/react-toggle-group": "^1.1.1",
Expand Down
Binary file added src/assets/fonts/geist-mono/geist-mono.ttf
Binary file not shown.
Binary file removed src/assets/fonts/geist/Geist-Black.woff2
Binary file not shown.
Binary file removed src/assets/fonts/geist/Geist-Bold.woff2
Binary file not shown.
Binary file removed src/assets/fonts/geist/Geist-Light.woff2
Binary file not shown.
Binary file removed src/assets/fonts/geist/Geist-Medium.woff2
Binary file not shown.
Binary file removed src/assets/fonts/geist/Geist-Regular.woff2
Binary file not shown.
Binary file removed src/assets/fonts/geist/Geist-SemiBold.woff2
Binary file not shown.
Binary file removed src/assets/fonts/geist/Geist-Thin.woff2
Binary file not shown.
Binary file removed src/assets/fonts/geist/Geist-UltraBlack.woff2
Binary file not shown.
Binary file removed src/assets/fonts/geist/Geist-UltraLight.woff2
Binary file not shown.
Binary file added src/assets/fonts/geist/geist.ttf
Binary file not shown.
Binary file not shown.
Binary file added src/assets/fonts/tomorrow/tomorrow-bold.ttf
Binary file not shown.
Binary file added src/assets/fonts/tomorrow/tomorrow-italic.ttf
Binary file not shown.
Binary file added src/assets/fonts/tomorrow/tomorrow-regular.ttf
Binary file not shown.
17 changes: 0 additions & 17 deletions src/components/NavigationMenu.tsx

This file was deleted.

10 changes: 10 additions & 0 deletions src/components/template/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from "react";

export default function Footer() {
return (
<footer className="font-tomorrow inline-flex justify-between text-[0.7rem] uppercase text-muted-foreground">
<p>Made by LuanRoger - Based in Brazil 🇧🇷</p>
<p>Powered by Electron</p>
</footer>
);
}
14 changes: 14 additions & 0 deletions src/components/template/InitialIcons.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react";
import { SiElectron, SiReact, SiVite } from "@icons-pack/react-simple-icons";

export default function InitalIcons() {
const iconSize = 48;

return (
<div className="inline-flex gap-2">
<SiReact size={iconSize} />
<SiVite size={iconSize} />
<SiElectron size={iconSize} />
</div>
);
}
35 changes: 35 additions & 0 deletions src/components/template/NavigationMenu.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React from "react";
import { Link } from "@tanstack/react-router";
import { useTranslation } from "react-i18next";
import {
NavigationMenu as NavigationMenuBase,
NavigationMenuItem,
NavigationMenuLink,
NavigationMenuList,
navigationMenuTriggerStyle,
} from "../ui/navigation-menu";

export default function NavigationMenu() {
const { t } = useTranslation();

return (
<NavigationMenuBase className="px-2 font-mono text-muted-foreground">
<NavigationMenuList>
<NavigationMenuItem>
<Link to="/">
<NavigationMenuLink className={navigationMenuTriggerStyle()}>
{t("titleHomePage")}
</NavigationMenuLink>
</Link>
</NavigationMenuItem>
<NavigationMenuItem>
<Link to="/second-page">
<NavigationMenuLink className={navigationMenuTriggerStyle()}>
{t("titleSecondPage")}
</NavigationMenuLink>
</Link>
</NavigationMenuItem>
</NavigationMenuList>
</NavigationMenuBase>
);
}
2 changes: 1 addition & 1 deletion src/components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "class-variance-authority";

import { cn } from "@/lib/utils";
import { cn } from "@/utils/tailwind";

const buttonVariants = cva(
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
Expand Down
Loading

0 comments on commit d73071f

Please sign in to comment.