Skip to content

Commit

Permalink
Merge branch 'main' into feature/search-bar-header
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmnzs committed Jun 9, 2024
2 parents 5f2d26e + eeb1a7c commit e196a4f
Show file tree
Hide file tree
Showing 32 changed files with 949 additions and 421 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,20 @@ Um agradecimento especial a todos que contribuíram ao projeto!
</td>
<td align="center">
<a href="https://github.com/LivHelen12">
<img src="https://avatars.githubusercontent.com/u/62712621?v=4" width="100px;" alt="Foto da Livia Helen"/><br>
<img src="https://avatars.githubusercontent.com/u/62712621?v=4" width="100px;" alt="Foto do Livia Helen"/><br>
<sub>
<b>Livia Helen</b>
</sub>
</a>
</td>
<td align="center">
<a href="https://github.com/bernardoSemiOficial">
<img src="https://avatars.githubusercontent.com/u/114026716?v=4" width="100px;" alt="Foto do Bernardo Pereira"/><br>
<sub>
<b>Bernardo Pereira</b>
</sub>
</a>
</td>
<td align="center">
<a href="https://github.com/gabrielmnzs">
<img src="https://avatars.githubusercontent.com/u/8618609?v=4" width="100px;" alt="Foto do Gabriel Menezes"/><br>
Expand Down
70 changes: 70 additions & 0 deletions db/db.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"events": [
{
"id": "6d80",
"title": "EVENTO TESTE",
"type": "Presencial",
"description": "Estamos empolgados em ajudar você a divulgar seus eventos! Para cadastrar um evento, preencha as informações abaixo. Isso garantirá que seu evento seja exibido corretamente em nosso site.",
"date": "09-12-2024",
"city": "Siriri",
"state": "SE",
"url": "https://devfest.com.br/",
"bannerUrl": "https://t3.ftcdn.net/jpg/03/86/44/66/240_F_386446626_SD0ksiMkmtDIlfuIgXStXQHPZeMjkLm2.jpg"
},
{
"id": "8dd4",
"title": "EVENTO TESTE REMOTO",
"type": "Remoto",
"description": "Estamos empolgados em ajudar você a divulgar seus eventos! Para cadastrar um evento, preencha as informações abaixo. Isso garantirá que seu evento seja exibido corretamente em nosso site.",
"date": "2026-11-01",
"city": null,
"state": null,
"url": "https://angular.dev/",
"bannerUrl": "https://blogger.googleusercontent.com/img/a/AVvXsEj-LG-1NzdCAk8DkFqFl4HemoD5HX7EnCYPnmzm7419ahflq3axCE8JoxwARbUXh2OG8I5ibG5Q2_XQEauq86byWCs6vlANin_ZtG4xR6Wk4oeIa76cP5PxkOlZBisaHLuD3l-erluagNdC-ASB3yxjhjjEQAfgQzFCE3tn5liDDGe0B0po3o5ZXsT4=s16000"
},
{
"id": "f1f9",
"title": "DEV TALK",
"type": "Presencial",
"description": "Foto do Evento: Faça upload de uma imagem representativa do seu evento. Imagens ajudam a atrair a atenção e dar uma melhor ideia sobre o que se trata o evento. (Formatos aceitos: JPG, PNG, GIF; Tamanho máximo: 5MB)",
"date": "2025-06-01",
"city": "Adamantina",
"state": "SP",
"url": "https://angular.dev/",
"bannerUrl": "https://www.proway.com.br/foto/png/blog/750/workshop-gratuito-game-developer.jpg"
},
{
"id": "35bc",
"title": "Pinguim coding",
"type": "Presencial",
"description": "O pinguim é uma ave da família Spheniscidae, altamente modificadas para a uma vida aquática, sendo suas asas adaptadas para promover impulso através da água. Wikipédia",
"date": "2025-03-09",
"city": "Boa Vista do Sul",
"state": "RS",
"url": "https://pt.wikipedia.org/wiki/Pinguim",
"bannerUrl": "https://media4.giphy.com/media/v1.Y2lkPTc5MGI3NjExZDd3ZTFsc3F3OXB0dmNra3o4ZWV4OHRyZjRtbWxhcXB0czFkODF1eSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/2IudUHdI075HL02Pkk/giphy.webp"
},
{
"id": "6f86",
"title": "Coding",
"type": "Presencial",
"description": "It is a channel of tradicional animation 2D; I make some gifs Follow me on Instagram.",
"date": "2026-02-01",
"city": "Acrelândia",
"state": "AC",
"url": "https://giphy.com/gifs/computador-gu-tecnology-bGgsc5mWoryfgKBx1u",
"bannerUrl": "https://media4.giphy.com/media/v1.Y2lkPTc5MGI3NjExNjc5NG02b2tsZXFmenlrZmZ2bDEycHVwc2U4eDVpZWtzdTRzeTU4ayZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/bGgsc5mWoryfgKBx1u/giphy.webp"
},
{
"id": "5fb2",
"title": "Apple Worldwide Developer Conference",
"type": "Presencial",
"description": "Apple Worldwide Developer Conference (WWDC) 2024: Announcements, News, and More",
"date": "2024-12-04",
"city": "Ingazeira",
"state": "PE",
"url": "https://www.lifewire.com/wwdc-5101136",
"bannerUrl": "https://www.lifewire.com/thmb/2rVmOhR6pI3wWARumksQE0k5L8A=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/wwdc-2024-5f5e99a8b8184355ad54fed19abfa671.png"
}
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"backend": "json-server --watch db/db.json",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"test:watch": "ng test --watch",
Expand Down
16 changes: 10 additions & 6 deletions src/app/app.routes.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import { Routes } from '@angular/router';
import { HomeComponent } from './pages/home/home.component';
import { RegisterEventComponent } from './pages/register-event/register-event.component';

export const routes: Routes = [
{ path: '', redirectTo: 'eventos', pathMatch: 'full' },
{
path: '',
component: HomeComponent,
path: 'eventos',
loadComponent: () =>
import('./pages/home/home.component').then((c) => c.HomeComponent),
},
{
path: 'registra-evento',
component: RegisterEventComponent,
path: 'criar-evento',
loadComponent: () =>
import('./pages/create-event/create-event.component').then(
(c) => c.CreateEventComponent,
),
},
{ path: '**', redirectTo: 'eventos' },
];
61 changes: 41 additions & 20 deletions src/app/components/event/event.component.html
Original file line number Diff line number Diff line change
@@ -1,35 +1,56 @@
<li>
<div class="overflow-hidden rounded-lg bg-white shadow">
<div class="overflow-hidden rounded-lg bg-white shadow w-96 h-96 relative">
<div>
<img class="rounded-md" src="{{ banner }}" alt="Event Banner" />
<a [href]="url">
<img
class="rounded-md h-60 w-full border border-solid border-gray-200"
src="{{ bannerUrl }}"
alt="banner do evento"
/>
</a>
</div>
<div class="px-4 py-4 sm:px-6">
<dl class="relative flex flex-wrap gap-x-3">
<div class="px-4 sm:px-6">
<dl class="relative flex flex-wrap gap-x-2">
<dt class="sr-only">Data do Evento</dt>
<dd class="mt-2 text-sm font-bold text-kipperdev-purple-primary">
{{ date | date: 'dd/MM/yyyy' }}
</dd>
<dt class="sr-only">Local do Evento</dt>
@if (state && city) {
<ng-container>
<dd
class="mt-2 flex items-center gap-x-3 text-sm font-normal text-gray-500"
>
{{ state }}, {{ city }}
</dd>
</ng-container>
}
@if (type === 'Remoto') {
<ng-container>
<dd
class="mt-2 flex items-center gap-x-3 text-sm font-semibold text-gray-500"
>
{{ type }}
</dd>
</ng-container>
}
<dt class="sr-only">Nome do Evento</dt>
<dd
class="w-full flex-none text-lg font-semibold tracking-tight cursor-pointer text-gray-900"
class="mt-2 w-full flex-none text-lg font-semibold tracking-tight cursor-pointer text-kipperdev-purple-dark"
>
<a [href]="url">
{{ title }}
<span class="absolute inset-0" aria-hidden="true"></span>
</a>
<p>{{ title }}</p>
<span class="absolute inset-0" aria-hidden="true"></span>
</dd>
<dt class="sr-only">Descrição</dt>
<dd class="mt-2 w-full flex-none text-base leading-7 text-gray-600">
{{ description }}
</dd>

<dt class="sr-only">Data do Evento</dt>
<dd class="mt-4 text-base font-semibold leading-7 text-gray-900">
{{ date }}
</dd>
<dt class="sr-only">Local do Evento</dt>
<dd
class="mt-4 flex items-center gap-x-3 text-base leading-7 text-gray-500"
class="mt-2 w-full flex-none text-sm text-gray-600 max-h-10 overflow-hidden"
>
{{ place }}
{{ description }}
</dd>
</dl>
</div>
<div
class="absolute inset-x-0 bottom-7 h-5 bg-gradient-to-t from-white via-white to-transparent pointer-events-none"
></div>
</div>
</li>
Empty file.
2 changes: 2 additions & 0 deletions src/app/components/event/event.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { EventComponent } from './event.component';
import { provideHttpClient } from '@angular/common/http';

describe('EventComponent', () => {
let component: EventComponent;
Expand All @@ -9,6 +10,7 @@ describe('EventComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [EventComponent],
providers: [provideHttpClient()],
}).compileComponents();

fixture = TestBed.createComponent(EventComponent);
Expand Down
18 changes: 10 additions & 8 deletions src/app/components/event/event.component.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import { CommonModule } from '@angular/common';
import { Component, Input } from '@angular/core';

@Component({
selector: 'app-event',
standalone: true,
imports: [],
imports: [CommonModule],
templateUrl: './event.component.html',
styleUrl: './event.component.scss',
})
export class EventComponent {
@Input() title: string = 'Não conseguimos carregar';
@Input() description: string = 'descrição virá em breve! hehe';
@Input() date: string = '19/10/2024';
@Input() place: string = 'Online';
@Input() banner: string = 'https://images.sympla.com.br/630305a3009a1-lg.png';
@Input() url: string = 'https://hacktown.com.br/';
@Input() title: string = '';
@Input() type: string = '';
@Input() description: string = '';
@Input() date: string = '';
@Input() city: string = '';
@Input() state: string = '';
@Input() bannerUrl: string = '';
@Input() url: string = '';
}
19 changes: 12 additions & 7 deletions src/app/components/header/header.component.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
<header class="bg-white">
<header class="bg-white z-50 relative">
<nav
class="mx-auto flex flex-col flex-wrap md:flex-nowrap sm:flex-row sm:gap-x-6 gap-8 max-w-7xl items-center justify-between p-6 lg:px-8"
aria-label="Global"
>
<div class="flex justify-center sm:justify-start">
<a href="#" class="-m-1.5 p-1.5 text-center sm:text-left">
<a
[routerLink]="['/eventos']"
class="-m-1.5 p-1.5 text-center sm:text-left"
>
<span class="sr-only">EventosTec</span>
<h3 class="text-base font-semibold leading-6 text-gray-900">
<h3
class="text-base font-semibold leading-6 text-kipperdev-purple-dark"
>
EventosTec | Eventos de Tecnologia 🇧🇷
</h3>
</a>
Expand Down Expand Up @@ -35,12 +40,12 @@ <h3 class="text-base font-semibold leading-6 text-gray-900">
/>
</div>
<div class="flex order-2 md:order-3 items-center justify-end gap-x-6">
<a
href="/registra-evento"
class="rounded-md bg-indigo-600 px-3 py-2 text-sm sm:text-base font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
<button
[routerLink]="['/criar-evento']"
class="rounded-md bg-kipperdev-purple-primary px-3 py-2 text-sm sm:text-base font-semibold text-white shadow-sm hover:opacity-95 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-kipperdev-purple-primary"
>
Adicionar um evento
</a>
</button>
</div>
</nav>
</header>
Empty file.
3 changes: 3 additions & 0 deletions src/app/components/header/header.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { HeaderComponent } from './header.component';
import { provideRouter } from '@angular/router';
import { routes } from '../../app.routes';

describe('HeaderComponent', () => {
let component: HeaderComponent;
Expand All @@ -9,6 +11,7 @@ describe('HeaderComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [HeaderComponent],
providers: [provideRouter(routes)],
}).compileComponents();

fixture = TestBed.createComponent(HeaderComponent);
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/header/header.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Component, EventEmitter, Output } from '@angular/core';
import { RouterModule } from '@angular/router';

@Component({
selector: 'app-header',
standalone: true,
imports: [],
imports: [RouterModule],
templateUrl: './header.component.html',
styleUrl: './header.component.scss',
})
export class HeaderComponent {
searchTerm: string = '';
Expand Down
3 changes: 3 additions & 0 deletions src/app/environments/environment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const environment = {
API: 'http://localhost:3000/',
};
Loading

0 comments on commit e196a4f

Please sign in to comment.