Skip to content

Commit

Permalink
structure fix
Browse files Browse the repository at this point in the history
  • Loading branch information
HenriqueSouzza committed Oct 24, 2023
1 parent 797e7b3 commit c062a4b
Show file tree
Hide file tree
Showing 26 changed files with 301 additions and 264 deletions.
26 changes: 13 additions & 13 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
* @type {import('next').NextConfig}
*/
const nextConfig = {
output: 'export',
// Optional: Change links `/me` -> `/me/` and emit `/me.html` -> `/me/index.html`
// trailingSlash: true,
// Optional: Prevent automatic `/me` -> `/me/`, instead preserve `href`
// skipTrailingSlashRedirect: true,
// Optional: Change the output directory `out` -> `dist`
// distDir: 'dist',
}
module.exports = nextConfig
output: 'export',
images: { unoptimized: true },
// Optional: Change links `/me` -> `/me/` and emit `/me.html` -> `/me/index.html`
// trailingSlash: true,

// Optional: Prevent automatic `/me` -> `/me/`, instead preserve `href`
// skipTrailingSlashRedirect: true,

// Optional: Change the output directory `out` -> `dist`
// distDir: 'dist',
};

module.exports = nextConfig
28 changes: 13 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,21 @@
"lint": "next lint"
},
"dependencies": {
"clsx": "^2.0.0",
"clsx": "2.0.0",
"next": "13.5.6",
"react": "^18",
"react-dom": "^18",
"react-f": "^0.1.3",
"react-if": "^4.1.5"
"react": "18",
"react-dom": "18"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10",
"daisyui": "^3.9.3",
"eslint": "^8",
"@types/node": "20",
"@types/react": "18",
"@types/react-dom": "18",
"autoprefixer": "10",
"daisyui": "3.9.3",
"eslint": "8",
"eslint-config-next": "13.5.6",
"postcss": "^8",
"tailwindcss": "^3",
"typescript": "^5"
"postcss": "8",
"tailwindcss": "3",
"typescript": "5"
}
}
}
7 changes: 0 additions & 7 deletions src/app/globals.css

This file was deleted.

18 changes: 0 additions & 18 deletions src/app/layout.tsx

This file was deleted.

41 changes: 0 additions & 41 deletions src/app/page.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions src/app/sobre/page.tsx

This file was deleted.

File renamed without changes.
Binary file removed src/assets/images/LicitaX(1).png
Binary file not shown.
14 changes: 0 additions & 14 deletions src/components/Footer.tsx

This file was deleted.

21 changes: 21 additions & 0 deletions src/components/Layout/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import Image from "next/image";

export const Footer = () => {
return (
<footer className="flex flex-col md:flex md:flex-row text-xs text-[#6C6C6C] gap-x-5 items-center gap-y-5">
<Image
alt="logo"
width={96}
height={22}
src="https://exoonero.org/creative-commons.png"
/>
<p>
Dados públicos extraídos de diários oficiais municipais da Associação
dos Municípios do Estado do Ceará (APRECE). Todo o conteúdo do site está disponível
sob a licença Creative Commons Atribuição 4.0 Internacional, o que
significa que pode ser compartilhado e reutilizado para trabalhos
derivados, desde que citada a fonte.
</p>
</footer>
);
};
7 changes: 7 additions & 0 deletions src/components/Layout/Head.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Head from "next/head";

export const HeadCustom = () => (
<Head>
<title>LicitaX</title>
</Head>
)
31 changes: 31 additions & 0 deletions src/components/Layout/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import Image from "next/image";
import Link from "next/link";

export const Navbar = () => {
return (
<div className="bg-gray-900 h-32 flex items-center justify-between p-4" >
<div className="flex items-center">
{/* Logo da Aplicação */}
<Image
alt="logo-unb"
width={240}
height={240}
src="https://i.pinimg.com/originals/7a/16/ca/7a16cae276fbf9f22a1d93999cff390c.png"
/>
</div>
<div className="flex space-x-4">
{/* Links de Navegação Interna com fonte mais negrito (bold) e espaço maior entre eles */}
<Link href="/" className="text-white hover:text-gray-300 text-lg font-semibold ml-4">Home</Link>
<Link href="/sobre" className="text-white hover:text-gray-300 text-lg font-semibold ml-4">Sobre</Link>
<Link
href="https://github.com/unb-mds/2023.2-LicitaX"
target="_blank"
rel="noopener noreferrer"
className="text-white hover:text-gray-300 text-lg font-semibold ml-4"
>
GitHub
</Link>
</div>
</div>
);
}
3 changes: 3 additions & 0 deletions src/components/Layout/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { Footer } from "./Footer";
export { Navbar } from "./Navbar";
export { HeadCustom as Head } from "./Head";
10 changes: 0 additions & 10 deletions src/components/Municipio.tsx

This file was deleted.

Empty file removed src/components/Navbar.tsx
Empty file.
64 changes: 64 additions & 0 deletions src/components/Pages/Home.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import Image from "next/image";
import { useState, useEffect } from "react"
interface TitleProps {
municipio: string;
ano: string;
}

export const Home = ({ municipio, ano }: TitleProps) => {
const [titleText, setTitleText] = useState("Brasília");
const [bids, setBids] = useState<any>([]);
const buildTitle = () => {
fetch(`https://raw.githubusercontent.com/unb-mds/2023-2-Squad07/main/public/resultados.json`, {
method: 'GET',
}).then(res => res.json())
.then(res => setBids(res))
};

useEffect(() => {
buildTitle();

if (municipio === 'geral') {
setTitleText('Ceará')
}
}, [setTitleText, municipio]);

console.log()
return (
<div className="flex">
<div className="bg-teal-500 w-80 h-screen p-4">
<p className="text-white font-bold text-2xl mt-4 mb-4">Confira a quantidade de avisos de licitação nos municípios do Ceará.</p>
<p className="text-white mt-4">Este projeto foi realizado pelo Squad 07 durante o segundo semestre de 2023 na disciplina Métodos de Desenvolvimento de Software da Universidade de Brasília.</p>
{/* Logo da Universidade com dois espaços */}
<Image
alt="logo-unb"
width={240}
height={240}
src="https://i.pinimg.com/originals/84/a7/86/84a786798c453d6a536f31cba73e5409.png"
/>
</div>
<div className="p-4 text-2xl 2xl:text-3xl 3xl:text-[2.4375rem] font-semibold lg:w-[42.93rem] leading-10">
{ano === "geral" ? (
<>
Acompanhe a quantidade de avisos de licitação que ocorreram em
<span className="text-[#4AA381]">{(" " + titleText) as string}</span>
</>
) : (
<>
Acompanhe a quantidade de avisos de licitação que ocorreram em
<span className="text-[#4AA381]">{(" " + titleText) as string} - {(" " + ano) as string}</span>
</>
)}
<br />
<div className="font-semibold">
{bids.map((bid: any, i: number) => (
<div key={i} className="flex-row pt-5 pb-5">
<>{bid.pdf_filename}</>
<>{bid.num_avisos_licitacao}</>
</div>
))}
</div>
</div>
</div>
)
}
1 change: 1 addition & 0 deletions src/components/Pages/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { Home } from './Home';
45 changes: 0 additions & 45 deletions src/components/Title.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions src/layouts/MainLayout.tsx

This file was deleted.

Loading

0 comments on commit c062a4b

Please sign in to comment.