|
1 | | -# Astro Starter Kit: Minimal |
| 1 | +# CPPS - Centro de Pesquisa Política e Social |
2 | 2 |
|
3 | | -```sh |
4 | | -npm create astro@latest -- --template minimal |
5 | | -``` |
| 3 | +<p align="center"> |
| 4 | + <img src="public/imagens/logos/cpps/logo-cpps-01_rev_1.png" alt="Logo CPPS" width="300"/> |
| 5 | +</p> |
| 6 | + |
| 7 | +Site institucional do Centro de Pesquisa Política e Social da Faculdade de Ciências Humanas e Sociais (FCHS) da Universidade Estadual Paulista (UNESP), campus Franca. |
| 8 | + |
| 9 | +## 🚀 Tecnologias |
| 10 | + |
| 11 | +- **[Astro](https://astro.build/)** - Framework web moderno para sites rápidos |
| 12 | +- **[TypeScript](https://www.typescriptlang.org/)** - JavaScript com tipagem estática |
| 13 | +- **[Tailwind CSS](https://tailwindcss.com/)** + **[DaisyUI](https://daisyui.com/)** - Estilização e componentes UI |
| 14 | +- **[MDX](https://mdxjs.com/)** - Markdown com componentes |
| 15 | +- **[Pagefind](https://pagefind.app/)** - Busca estática no site |
| 16 | + |
| 17 | +## 📋 Pré-requisitos |
| 18 | + |
| 19 | +- Node.js 18+ |
| 20 | +- npm ou yarn |
6 | 21 |
|
7 | | -[](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal) |
8 | | -[](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/minimal) |
9 | | -[](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/minimal/devcontainer.json) |
| 22 | +## 🔧 Instalação |
10 | 23 |
|
11 | | -> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun! |
| 24 | +```bash |
| 25 | +# Clone o repositório |
| 26 | +git clone https://github.com/seu-usuario/cpps-unesp.git |
| 27 | +cd cpps-unesp |
12 | 28 |
|
13 | | -## 🚀 Project Structure |
| 29 | +# Instale as dependências |
| 30 | +npm install |
14 | 31 |
|
15 | | -Inside of your Astro project, you'll see the following folders and files: |
| 32 | +# Inicie o servidor de desenvolvimento |
| 33 | +npm run dev |
| 34 | +``` |
| 35 | + |
| 36 | +O site estará disponível em `http://localhost:4321` |
| 37 | + |
| 38 | +## 📁 Estrutura do Projeto |
16 | 39 |
|
17 | | -```text |
18 | | -/ |
19 | | -├── public/ |
| 40 | +``` |
| 41 | +cpps-unesp/ |
20 | 42 | ├── src/ |
21 | | -│ └── pages/ |
22 | | -│ └── index.astro |
| 43 | +│ ├── components/ # Componentes reutilizáveis |
| 44 | +│ ├── content/ # Conteúdo em MDX |
| 45 | +│ │ ├── membros/ # Perfis dos membros da equipe |
| 46 | +│ │ ├── noticias/ # Posts de notícias |
| 47 | +│ │ └── docs/ # Documentação |
| 48 | +│ ├── i18n/ # Internacionalização |
| 49 | +│ │ ├── locales/ # Arquivos de tradução (pt.json, en.json, es.json) |
| 50 | +│ │ └── routes.ts # Rotas traduzidas |
| 51 | +│ ├── layouts/ # Layouts base |
| 52 | +│ ├── pages/ # Páginas do site |
| 53 | +│ │ └── [lang]/ # Páginas por idioma |
| 54 | +│ ├── styles/ # Estilos globais |
| 55 | +│ └── utils/ # Funções utilitárias |
| 56 | +├── public/ # Assets estáticos |
| 57 | +│ ├── imagens/ # Imagens do site |
| 58 | +│ └── scripts/ # Scripts do cliente |
| 59 | +├── astro.config.mjs # Configuração do Astro |
| 60 | +├── tailwind.config.mjs # Configuração do Tailwind |
23 | 61 | └── package.json |
24 | 62 | ``` |
25 | 63 |
|
26 | | -Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. |
| 64 | +## 🌐 Internacionalização |
| 65 | + |
| 66 | +O site suporta 3 idiomas: |
| 67 | +- 🇧🇷 Português (pt) |
| 68 | +- 🇺🇸 Inglês (en) |
| 69 | +- 🇪🇸 Espanhol (es) |
| 70 | + |
| 71 | +### Adicionando traduções |
| 72 | + |
| 73 | +1. Edite os arquivos em `src/i18n/locales/` |
| 74 | +2. Adicione rotas traduzidas em `src/i18n/routes.ts` |
| 75 | +3. Crie conteúdo específico por idioma em `src/content/` |
| 76 | + |
| 77 | +## 👥 Gerenciando Membros da Equipe |
| 78 | + |
| 79 | +### Adicionando um novo membro |
| 80 | + |
| 81 | +1. Crie um arquivo MDX em `src/content/membros/`: |
| 82 | + ``` |
| 83 | + nome-do-membro.pt.mdx # Versão em português |
| 84 | + nome-do-membro.en.mdx # Versão em inglês (opcional) |
| 85 | + nome-do-membro.es.mdx # Versão em espanhol (opcional) |
| 86 | + ``` |
| 87 | + |
| 88 | +2. Use o seguinte template: |
| 89 | + ```mdx |
| 90 | + --- |
| 91 | + title: "Nome do Membro" |
| 92 | + lang: "pt" |
| 93 | + foto: "/imagens/equipe/foto.jpg" |
| 94 | + cargo: "Cargo do Membro" |
| 95 | + redes: |
| 96 | + - tipo: "lattes" |
| 97 | + url: "http://lattes.cnpq.br/..." |
| 98 | + icone: "/imagens/logos/lattes_icon.svg" |
| 99 | + contribuicao: "Descrição opcional" |
| 100 | + --- |
| 101 | + |
| 102 | + # Biografia |
| 103 | + |
| 104 | + Texto da biografia... |
| 105 | + ``` |
| 106 | + |
| 107 | +3. Adicione o membro no arquivo de equipe em `src/i18n/locales/pt.json` |
| 108 | + |
| 109 | +## 📰 Gerenciando Notícias |
| 110 | + |
| 111 | +### Criando uma notícia |
| 112 | + |
| 113 | +1. Adicione um arquivo em `src/content/noticias/`: |
| 114 | + ```markdown |
| 115 | + --- |
| 116 | + title: "Título da Notícia" |
| 117 | + date: 2024-01-15 |
| 118 | + resumo: "Resumo breve da notícia" |
| 119 | + tags: ["tag1", "tag2"] |
| 120 | + image: "/images/noticias/imagem.jpg" |
| 121 | + lang: "pt" |
| 122 | + --- |
| 123 | + |
| 124 | + Conteúdo da notícia... |
| 125 | + ``` |
| 126 | + |
| 127 | +## 🎨 Temas |
| 128 | + |
| 129 | +O site suporta temas claro e escuro, com detecção automática do sistema. Os temas são configurados em `src/styles/global.css` usando DaisyUI. |
| 130 | + |
| 131 | +## 🔍 Busca |
| 132 | + |
| 133 | +A busca é implementada com Pagefind e indexa automaticamente todo o conteúdo do site durante o build. |
| 134 | + |
| 135 | +## 📝 Scripts Disponíveis |
| 136 | + |
| 137 | +```bash |
| 138 | +# Desenvolvimento |
| 139 | +npm run dev # Servidor de desenvolvimento |
| 140 | + |
| 141 | +# Build |
| 142 | +npm run build # Build de produção |
| 143 | +npm run preview # Preview do build |
| 144 | + |
| 145 | +# Linting |
| 146 | +npm run lint # Verifica erros de código |
| 147 | +npm run format # Formata o código |
| 148 | +``` |
| 149 | + |
| 150 | +## 🚀 Deploy |
| 151 | + |
| 152 | +### Build para produção |
| 153 | + |
| 154 | +```bash |
| 155 | +npm run build |
| 156 | +``` |
| 157 | + |
| 158 | +Os arquivos estáticos serão gerados em `./dist/` |
| 159 | + |
| 160 | +### Configurações importantes |
| 161 | + |
| 162 | +- Atualize a URL base em `astro.config.mjs` |
| 163 | +- Configure o sitemap em `pages/sitemap.xml.ts` |
| 164 | +- Ajuste as meta tags em `layouts/BaseLayout.astro` |
| 165 | + |
| 166 | +## 🤝 Contribuindo |
| 167 | + |
| 168 | +1. Fork o projeto |
| 169 | +2. Crie uma branch para sua feature (`git checkout -b feature/MinhaFeature`) |
| 170 | +3. Commit suas mudanças (`git commit -m 'Adiciona MinhaFeature'`) |
| 171 | +4. Push para a branch (`git push origin feature/MinhaFeature`) |
| 172 | +5. Abra um Pull Request |
| 173 | + |
| 174 | +## 📄 Licença |
| 175 | + |
| 176 | +Este projeto está sob a licença [MIT](LICENSE). |
| 177 | + |
| 178 | +## 📞 Contato |
27 | 179 |
|
28 | | -There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. |
| 180 | +Centro de Pesquisa Política e Social - UNESP Franca |
29 | 181 |
|
30 | | -Any static assets, like images, can be placed in the `public/` directory. |
| 182 | +- Website: [cpps.franca.unesp.br](https://cpps.franca.unesp.br) |
| 183 | +- Email: cpps@franca.unesp.br |
31 | 184 |
|
32 | | -## 🧞 Commands |
| 185 | +## Agradecimentos |
33 | 186 |
|
34 | | -All commands are run from the root of the project, from a terminal: |
| 187 | +- @ArthurCarrenho - primeira versão do readme e otimizações iniciais |
| 188 | +- @ligiadlsimplicio - inclusão as informações inciais no site |
35 | 189 |
|
36 | | -| Command | Action | |
37 | | -| :------------------------ | :----------------------------------------------- | |
38 | | -| `npm install` | Installs dependencies | |
39 | | -| `npm run dev` | Starts local dev server at `localhost:4321` | |
40 | | -| `npm run build` | Build your production site to `./dist/` | |
41 | | -| `npm run preview` | Preview your build locally, before deploying | |
42 | | -| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | |
43 | | -| `npm run astro -- --help` | Get help using the Astro CLI | |
| 190 | +--- |
44 | 191 |
|
45 | | -## 👀 Want to learn more? |
| 192 | +Desenvolvido com ❤️ pela equipe do CPPS - UNESP Franca |
46 | 193 |
|
47 | | -Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). |
|
0 commit comments