Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kickstart the repo with the template code #3

Merged
merged 13 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,39 @@ dmypy.json

# pycharm
.idea/

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/florist/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
/florist/tsconfig.json
Binary file removed assets/img/apple-icon.png
Binary file not shown.
Binary file removed assets/img/favicon.png
Binary file not shown.
19 changes: 0 additions & 19 deletions assets/js/plugins/perfect-scrollbar.min.js

This file was deleted.

25 changes: 0 additions & 25 deletions assets/js/plugins/smooth-scrollbar.min.js

This file was deleted.

8 changes: 8 additions & 0 deletions florist/api/index.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from fastapi import FastAPI

app = FastAPI()


@app.get("/api/python")
def hello_world():
lotif marked this conversation as resolved.
Show resolved Hide resolved
return "hello world"
File renamed without changes.
File renamed without changes.
Binary file added florist/app/assets/fonts/nucleo-icons.eot
Binary file not shown.
312 changes: 312 additions & 0 deletions florist/app/assets/fonts/nucleo-icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added florist/app/assets/fonts/nucleo-icons.ttf
Binary file not shown.
Binary file added florist/app/assets/fonts/nucleo-icons.woff
Binary file not shown.
Binary file added florist/app/assets/fonts/nucleo-icons.woff2
Binary file not shown.
Binary file added florist/app/assets/fonts/nucleo.eot
Binary file not shown.
Binary file added florist/app/assets/fonts/nucleo.ttf
Binary file not shown.
Binary file added florist/app/assets/fonts/nucleo.woff
Binary file not shown.
Binary file added florist/app/assets/fonts/nucleo.woff2
Binary file not shown.
File renamed without changes
File renamed without changes.
15 changes: 15 additions & 0 deletions florist/app/client_imports.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"use client"

import { useEffect } from "react";

function ClientImports() {
lotif marked this conversation as resolved.
Show resolved Hide resolved
useEffect(() => {
require("./assets/js/core/popper.min.js");
require("./assets/js/core/bootstrap.min.js");
require("./assets/js/material-dashboard.min.js?v=3.0.0");
}, []);

return null;
}

export default ClientImports;
101 changes: 101 additions & 0 deletions florist/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
import "./assets/css/nucleo-icons.css"
import "./assets/css/nucleo-svg.css"
import "./assets/css/material-dashboard.css?v=3.0.0"

import Script from 'next/script';
import { useEffect } from "react";

import Sidebar from "./sidebar"
import ClientImports from './client_imports';

export const metadata = {
lotif marked this conversation as resolved.
Show resolved Hide resolved
title: "Florist",
}

export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<head>
{/* Fonts and icons */}
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900|Roboto+Slab:400,700" />
{/* Font Awesome Icons */}
<Script src="https://kit.fontawesome.com/42d5adcbca.js" />
{/* Material Icons */}
<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Round" rel="stylesheet" />
{/* Copyright Notice */}
<script dangerouslySetInnerHTML={{ __html: `
<!--
=========================================================
* Material Dashboard 2 - v3.0.0
=========================================================

* Product Page: https://www.creative-tim.com/product/material-dashboard
* Copyright 2021 Creative Tim (https://www.creative-tim.com)
* Licensed under MIT (https://www.creative-tim.com/license)
* Coded by Creative Tim

=========================================================

* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-->
`}} />
</head>
<body className="g-sidenav-show bg-gray-200">
{/* Sidebar */}
<Sidebar />
{/* Body */}
<main className="main-content position-relative max-height-vh-100 h-100 border-radius-lg ">
{/* Navbar */}
<nav className="navbar navbar-main navbar-expand-lg px-0 mx-4 shadow-none border-radius-xl" id="navbarBlur" navbar-scroll="true">
<div className="container-fluid py-1 px-3">
<nav aria-label="breadcrumb">
<ol className="breadcrumb bg-transparent mb-0 pb-0 pt-1 px-0 me-sm-6 me-5">
{/* Breadcrumbs */}
</ol>
</nav>
<div className="collapse navbar-collapse mt-sm-0 mt-2 me-md-0 me-sm-4" id="navbar">
<div className="ms-md-auto pe-md-3 d-flex align-items-center">
<div className="input-group input-group-outline">
{/* Left aligned elements */}
</div>
</div>
</div>
</div>
</nav>
{/* End Navbar */}
<div className="container-fluid py-4">
<div className="row min-vh-80 h-100">
<div className="col-12">
{children}
</div>
</div>
{/* Footer */}
<footer className="footer pt-5">
<div className="container-fluid">
<div className="row align-items-center justify-content-lg-between">
<div className="col-lg-6 mb-lg-0 mb-4">
<div className="copyright text-center text-sm text-muted text-lg-start">
{/* Copyright */}
</div>
</div>
<div className="col-lg-6">
<ul className="nav nav-footer justify-content-center justify-content-lg-end">
{/* Bottom right navbar */}
</ul>
</div>
</div>
</div>
</footer>
</div>
</main>

<ClientImports />

</body>
</html>
)
}
5 changes: 5 additions & 0 deletions florist/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default function Home() {
return (
<span>Content goes here</span>
);
}
30 changes: 30 additions & 0 deletions florist/app/sidebar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import logo_ct from "./assets/img/logo-ct.png"

import Image from 'next/image'

export default function Sidebar() {
return (
<aside className="sidenav navbar navbar-vertical navbar-expand-xs border-0 border-radius-xl my-3 fixed-start ms-3 bg-gradient-dark" id="sidenav-main">
<div className="sidenav-header">
<i className="fas fa-times p-3 cursor-pointer text-white opacity-5 position-absolute end-0 top-0 d-none d-xl-none" aria-hidden="true" id="iconSidenav"></i>
<span className="navbar-brand m-0">
<Image src={logo_ct} className="navbar-brand-img h-100" alt="main_logo" width={32} height={32}/>
<span className="ms-1 font-weight-bold text-white">FLorist</span>
</span>
</div>
<hr className="horizontal light mt-0 mb-2" />
<div className="collapse navbar-collapse w-auto max-height-vh-100" id="sidenav-collapse-main">
<ul className="navbar-nav">
<li className="nav-item">
<a className="nav-link text-white active bg-gradient-primary" href="#">
<div className="text-white text-center me-2 d-flex align-items-center justify-content-center">
<i className="material-icons opacity-10">home</i>
</div>
<span className="nav-link-text ms-1">Home</span>
</a>
</li>
</ul>
</div>
</aside>
);
}
122 changes: 0 additions & 122 deletions index.html

This file was deleted.

30 changes: 30 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
rewrites: async () => {
return [
{
source: "/api/:path*",
destination:
process.env.NODE_ENV === "development"
? "http://127.0.0.1:8000/api/:path*"
: "/api/",
},
{
source: "/docs",
destination:
process.env.NODE_ENV === "development"
? "http://127.0.0.1:8000/docs"
: "/api/docs",
},
{
source: "/openapi.json",
destination:
process.env.NODE_ENV === "development"
? "http://127.0.0.1:8000/openapi.json"
: "/api/openapi.json",
},
];
},
};

module.exports = nextConfig;
Loading
Loading