Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ATechAdventurer committed Dec 6, 2023
1 parent a83d83a commit c961265
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 59 deletions.
11 changes: 11 additions & 0 deletions config/fonts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Fira_Code as FontMono, Inter as FontSans } from "next/font/google"

export const fontSans = FontSans({
subsets: ["latin"],
variable: "--font-sans",
})

export const fontMono = FontMono({
subsets: ["latin"],
variable: "--font-mono",
})
7 changes: 7 additions & 0 deletions config/site.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export type SiteConfig = typeof siteConfig;

export const siteConfig = {
name: "Next.js + NextUI",
description: "Make beautiful websites regardless of your design experience.",
links: {},
};
53 changes: 53 additions & 0 deletions src/components/primitives.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { tv } from 'tailwind-variants';

export const title = tv({
base: 'tracking-tight inline font-semibold',
variants: {
color: {
violet: 'from-[#FF1CF7] to-[#b249f8]',
yellow: 'from-[#FF705B] to-[#FFB457]',
blue: 'from-[#5EA2EF] to-[#0072F5]',
cyan: 'from-[#00b7fa] to-[#01cfea]',
green: 'from-[#6FEE8D] to-[#17c964]',
pink: 'from-[#FF72E1] to-[#F54C7A]',
foreground: 'dark:from-[#FFFFFF] dark:to-[#4B4B4B]',
},
size: {
sm: 'text-3xl lg:text-4xl',
md: 'text-[2.3rem] lg:text-5xl leading-9',
lg: 'text-4xl lg:text-6xl',
},
fullWidth: {
true: 'w-full block',
},
},
defaultVariants: {
size: 'md',
},
compoundVariants: [
{
color: [
'violet',
'yellow',
'blue',
'cyan',
'green',
'pink',
'foreground',
],
class: 'bg-clip-text text-transparent bg-gradient-to-b',
},
],
});

export const subtitle = tv({
base: 'w-full md:w-1/2 my-2 text-lg lg:text-xl text-default-600 block max-w-full',
variants: {
fullWidth: {
true: '!w-full',
},
},
defaultVariants: {
fullWidth: true,
},
});
6 changes: 6 additions & 0 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { AppProps } from "next/app";

import { NextUIProvider } from "@nextui-org/react";
import { ThemeProvider as NextThemesProvider } from "next-themes";
import { fontSans, fontMono } from "@/config/fonts";
import { useRouter } from 'next/router';
import "@/styles/globals.css";

Expand All @@ -16,3 +17,8 @@ export default function App({ Component, pageProps }: AppProps) {
</NextUIProvider>
);
}

export const fonts = {
sans: fontSans.style.fontFamily,
mono: fontMono.style.fontFamily,
};
5 changes: 0 additions & 5 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import React from "react";
import { Button } from "@nextui-org/react";
//import {Card, CardBody, CardFooter, Image} from "@nextui-org/react";

// import styles from '@/styles/Home.module.css';
import { Navbar, NavbarBrand, NavbarContent, NavbarItem, Link } from "@nextui-org/react";
import Image from 'next/image';
import DefaultLayout from "@/layouts/default";

export default function App() {
Expand Down
File renamed without changes.
37 changes: 2 additions & 35 deletions src/pages/test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,77 +3,53 @@ import { Card, CardBody, CardFooter, Image } from "@nextui-org/react";
import { useRouter } from 'next/router';
import DefaultLayout from "@/layouts/default";


//import theme from '../themes/theme'; // Adjust the path accordingly
//import '../styles/globals.css'; // Your global styles


export default function App() {
const router = useRouter();
const list1 = [
{
title: "ABOUT US",
// img: "https://nextui.org/images/fruit-1.jpeg",
img: "/images/about.jpg",
onPress: () => router.push('/about_us'),
//price: "$5.50",
},
{
title: "EVENTS",
//img: "https://nextui.org/images/fruit-2.jpeg",
img: "/images/calender.jpg",
onPress: () => router.push('/reservation'),
// price: "$3.00",
},
{
title: "RESERVE MACHINE",
// img: "https://nextui.org/images/fruit-3.jpeg",
img: "/images/3D printer.jpg",
onPress: () => router.push('/reserve_machine'),
//price: "$10.00",
},
{
title: "TICKET",
// img: "https://nextui.org/images/fruit-4.jpeg",
img: "/images/ticket.jpg",
onPress: () => router.push('/ticket'),
//price: "$5.30",
},

}
];
const list2 = [{
title: "DONATE TO MAKERSPACE",
//img: "https://nextui.org/images/fruit-5.jpeg",
img: "/images/donate.jpg",
onPress: () => router.push('/ticket'),
// price: "$15.70",
},
{
title: "PAYMENT OPTIONS",
// img: "https://nextui.org/images/fruit-6.jpeg",
img: "/images/payment.jpg",
onPress: () => router.push('/ticket'),
// price: "$8.00",
},
{
title: "REPORT AN EMERGENCY",
// img: "https://nextui.org/images/fruit-7.jpeg",
img: "/images/emergency.jpg",
onPress: () => router.push('/ticket'),
// price: "$7.50",
},
{
title: "REQUEST A TOUR",
// img: "https://nextui.org/images/fruit-8.jpeg",
img: "/images/tour.jpg",
onPress: () => router.push('/tour'),
// price: "$12.20",
},]
}]
return (
<DefaultLayout>

<div className="w-full flex flex-grow gap-4 p-5">

{list1.map((item, index) => (
<Card className="" shadow="sm" key={index} isPressable onPress={item.onPress}>
<CardBody className="overflow-visible p-0">
Expand All @@ -84,12 +60,10 @@ export default function App() {
alt={item.title}
className="w-full object-cover h-[140px]"
src={item.img}
//src="/images/3D printer.jpg"
/>
</CardBody>
<CardFooter className="text-small justify-between">
<b>{item.title}</b>
{/* <p className="text-default-500">{item.price}</p> */}
</CardFooter>
</Card>
))}
Expand All @@ -101,24 +75,17 @@ export default function App() {
<Image
shadow="sm"
radius="lg"
// width={270}
alt={item.title}
className="w-full object-cover h-[140px]"
src={item.img}

//src="/images/calender.jpg"
/>
</CardBody>
<CardFooter className="text-small justify-between">
<b>{item.title}</b>
{/* <p className="text-default-500">{item.price}</p> */}
</CardFooter>
</Card>

))}

</div>
</DefaultLayout >

);
}
2 changes: 0 additions & 2 deletions src/pages/ticket.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import styles from '@/styles/ticket.module.css';
import Head from 'next/head';
import { Button } from '@nextui-org/react';

//<aside></aside>

export default function ticket() {
return (
<>
Expand Down
31 changes: 14 additions & 17 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
// tailwind.config.js
import {nextui} from "@nextui-org/react";
import { nextui } from '@nextui-org/react';

/** @type {import('tailwindcss').Config} */
const config = {
// prefix : "tw-",
content: [
// ...
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}",
"./pages/home.tsx"
],
theme: {
extend: {},
},
darkMode: "class",
plugins: [nextui()]
}

export default config;
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./app/**/*.{js,ts,jsx,tsx,mdx}',
'./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}',
],
theme: {
extend: {},
},
darkMode: 'class',
plugins: [nextui()],
};

0 comments on commit c961265

Please sign in to comment.