Skip to content

Commit

Permalink
adiciona qd nas universidades base de conhecimento (#261)
Browse files Browse the repository at this point in the history
**Português (BR)** | [English
(US)](?quick_pull=1&template=PULL_REQUEST-en-US.md)

## Comunidade

* [x] Eu li e segui o [Guia de
Contribuição](https://github.com/okfn-brasil/querido-diario-frontend/blob/main/docs/CONTRIBUTING.md).
* [x] Eu li e segui o [Código de
Conduta](https://github.com/okfn-brasil/querido-diario-comunidade/blob/main/.github/CODE_OF_CONDUCT.md).

## Tipo de alteração

* [ ] 🐞 Correção de problema
* [x] ✨ Melhoria ou nova funcionalidade
* [ ] 📰 Nova postagem no blog

## Issues relacionadas
Issues que são relacionadas a esta Pull Request:

#247 

<!--
Considere abrir uma issue relacionada à alteração ou conversar com
alguém para que seja aberta e assim termos mapeadas as alterações.

Caso esta Pull Request resolva uma ou mais issues existentes, vincule-as
com uma palavra-chave para que ao ser mergeada, a issue seja fechada.

Ex.: Resolve #123

Mais informações:
https://docs.github.com/pt/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
-->

## Validação

* [ ] Validei a alteração no link gerado pelo bot da Netlify (Deploy
Preview/Preview on mobile)
* [ ] Validei o Layout responsivo (desktop/mobile) após a implementação
* [ ] Verifiquei o registro do deploy (Latest deploy log) e nenhum novo
alerta ou erro foi adicionado

## Evidências
<details>
  <summary>mobile</summary>

![Screen Recording 2024-04-15 at 17 58
27](https://github.com/okfn-brasil/querido-diario-frontend/assets/80350711/64e84ede-9ac8-4538-8735-2d37b50c4f2b)

</details>

<details>
  <summary>desktop</summary>

![Screen Recording 2024-04-15 at 17 57
53](https://github.com/okfn-brasil/querido-diario-frontend/assets/80350711/dd947865-9dfc-47c6-b93e-5d005577dcb7)

</details>

## Documentação

* [ ] A documentação deste repositório foi atualizada (quando
necessário).
* [ ] Esta alteração requer que a documentação externa seja atualizada.
  • Loading branch information
ogecece authored Apr 15, 2024
2 parents 2f71621 + b7db932 commit 5936bda
Show file tree
Hide file tree
Showing 12 changed files with 205 additions and 73 deletions.
5 changes: 4 additions & 1 deletion src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { AboutComponent as AboutComponentEnUS } from './modules/pages/about-en_U
import { TechComponent as TechComponentEnUS } from './modules/pages/tech-en_US/tech.component';
import { PrivacyPolicyComponent as PrivacyPolicyComponentEnUS } from './modules/pages/privacy-policy-en_US/privacy-policy.component';
import { HomeUniversitiesComponent } from './modules/pages/universities/home/home.component';
import { KnowledgeBaseUniversitiesComponent } from './modules/pages/universities/knowledge-base/knowledge-base.component';


const routes: Routes = [
Expand All @@ -48,7 +49,6 @@ const routes: Routes = [
{ path: 'blog', component: BlogListComponent },
{ path: 'blog/:id', component: BlogListComponent },
{ path: 'blog/post/:id', component: BlogPostDetailComponent },
{ path: 'universidades', component: HomeUniversitiesComponent },
//area educação
{ path: 'educacao', component: HomeEducacaoComponent },
{ path: 'educacao/cnpj/:id', component: CnpjComponent },
Expand All @@ -60,6 +60,9 @@ const routes: Routes = [
{ path: 'educacao/relatorio/:id', component: ReportDetailComponent },
{ path: 'educacao/caso/:id', component: ReportDetailComponent },
{ path: 'educacao/redefinir-senha', component: PassResetComponent },
// area universidades
{ path: 'universidades', component: HomeUniversitiesComponent },
{ path: 'universidades/base-de-conhecimento', component: KnowledgeBaseUniversitiesComponent}
];

@NgModule({
Expand Down
4 changes: 2 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ import { AboutComponent as AboutComponentEnUS } from './modules/pages/about-en_U
import { TechComponent as TechComponentEnUS } from './modules/pages/tech-en_US/tech.component';
import { PrivacyPolicyComponent as PrivacyPolicyComponentEnUS } from './modules/pages/privacy-policy-en_US/privacy-policy.component';
import { HomeUniversitiesComponent } from './modules/pages/universities/home/home.component';


import { KnowledgeBaseUniversitiesComponent } from './modules/pages/universities/knowledge-base/knowledge-base.component';

@NgModule({
declarations: [
Expand Down Expand Up @@ -192,6 +191,7 @@ import { HomeUniversitiesComponent } from './modules/pages/universities/home/hom
TechComponentEnUS,
PrivacyPolicyComponentEnUS,
HomeUniversitiesComponent,
KnowledgeBaseUniversitiesComponent
],
imports: [
BrowserModule,
Expand Down
6 changes: 3 additions & 3 deletions src/app/modules/components/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
<a routerLink="/blog"><div class="link bg-white">
Blog
</div></a>
<a routerLink="/sobre"><div class="link bg-white">
Sobre
</div></a>
<a routerLink="/universidades"><div class="link bg-white">
Universidades
</div></a>
<a routerLink="/sobre"><div class="link bg-white">
Sobre
</div></a>
<a routerLink="/apoie"><div class="link bg-orange">
Apoie
</div></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</app-container>
</ng-template>
<ng-container *ngIf="content$ | async as content; else loading">
<div class="banner block-container">
<div class="banner banner--peach block-container">
<div class="content">
<div class="banner-img">
<img
Expand Down
65 changes: 0 additions & 65 deletions src/app/modules/pages/universities/home/home.component.sass
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,6 @@
.home
background-color: white

.banner
background-color: #F3E9E9

.banner .content
display: flex
justify-content: space-between
align-items: center

.banner-content
width: 45%

h1
font-size: rem(56)
margin-bottom: rem(16)
line-height: rem(67)
color: #2C1338

h2, p
line-height: rem(25)
font-size: rem(18)

p
margin-bottom: rem(32)

.banner-img
width: 50%

img
max-width: 100%
max-height: 100%
margin: 0 auto

.home-boxes
background-color: #2D2145

Expand Down Expand Up @@ -62,39 +30,6 @@


@media only screen and (max-width: 768px)
.content
flex-direction: column

.btne-primary
width: 100%
font-weight: bold

.banner .content
.banner-content
width: 100%
text-align: center

h1
margin-top: rem(24)
font-size: rem(28)
line-height: rem(33)
margin-bottom: rem(40)

h2
font-size: rem(20)
line-height: rem(24)

p
font-size: rem(16)
line-height: rem(19)

.banner-img
width: 100%
max-height: rem(300)

img
margin: 0 auto

.home-boxes
.content
row-gap: rem(32)
2 changes: 1 addition & 1 deletion src/app/modules/pages/universities/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ContentService } from 'src/app/services/content/content.service';
@Component({
selector: 'uni-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.sass'],
styleUrls: ['./home.component.sass', '../styles.sass'],
})
export class HomeUniversitiesComponent implements OnInit {
content$: Observable<any> = of(null);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<div class="knowledge-base">
<app-column>
<ng-template #loading>
<app-container fxFill>
<mat-spinner *ngIf="loading"></mat-spinner>
</app-container>
</ng-template>
<ng-container *ngIf="content$ | async as content; else loading">
<div class="banner banner--alabaster block-container">
<div class="content">
<div class="banner-img">
<img
src="https://querido-diario-static.nyc3.cdn.digitaloceanspaces.com/assets-site/hero-kb-qd-uni.png"
alt="Pessoa trabalhando em uma mesa com um computador portátil e um compo de café ao lado"
>
</div>
<div class="banner-content">
<h1>{{ content.title }}</h1>
<h2>{{ content.subtitle }}</h2>
<p>{{ content.paragraph }}</p>
</div>
</div>
</div>
<div class="info block-container">
<div class="content">
<div class="spreadsheet">
<p>{{ content.spreadsheetPreview }}</p>
<button class="btne-primary">{{ content.spreadsheetButton }}</button>
</div>
</div>
</div>
</ng-container>
</app-column>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@import 'src/assets/_tools.sass'

.knowledge-base
background-color: white

.info
background-color: #4F3979
padding-top: rem(20)
padding-bottom: rem(20)

.spreadsheet
width: 45%
display: flex
flex-direction: column
row-gap: rem(24)

p
font-size: rem(16)
line-height: rem(25)
color: white

button
max-width: rem(280)


@media only screen and (max-width: 768px)
.spreadsheet
width: unset
padding-top: rem(64)
padding-bottom: rem(64)

p
text-align: center

button
max-width: unset
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { KnowledgeBaseUniversitiesComponent } from './knowledge-base.component';

describe('KnowledgeBaseUniversitiesComponent', () => {
let component: KnowledgeBaseUniversitiesComponent;
let fixture: ComponentFixture<KnowledgeBaseUniversitiesComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ KnowledgeBaseUniversitiesComponent ]
})
.compileComponents();
});

beforeEach(() => {
fixture = TestBed.createComponent(KnowledgeBaseUniversitiesComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Component, OnInit } from '@angular/core';
import { Observable, of } from 'rxjs';
import { ContentService } from 'src/app/services/content/content.service';

@Component({
selector: 'uni-knowledge-base',
templateUrl: './knowledge-base.component.html',
styleUrls: ['./knowledge-base.component.sass', '../styles.sass'],
})
export class KnowledgeBaseUniversitiesComponent implements OnInit {
content$: Observable<any> = of(null);

constructor(
private contentService: ContentService
) {}

ngOnInit() {
this.content$ = this.contentService.find('knowledge-base-universities');
}
}
71 changes: 71 additions & 0 deletions src/app/modules/pages/universities/styles.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
@import 'src/assets/_tools.sass'

.banner
&--alabaster
background-color: #F8F8F8

&--peach
background-color: #F3E9E9

.banner .content
display: flex
justify-content: space-between
align-items: center

.banner-content
width: 45%

h1
font-size: rem(56)
margin-bottom: rem(16)
line-height: rem(67)
color: #2C1338

h2, p
line-height: rem(25)
font-size: rem(18)

p
margin-bottom: rem(32)

.banner-img
width: 50%

img
max-width: 100%
max-height: 100%
margin: 0 auto

@media only screen and (max-width: 768px)
.content
flex-direction: column

.btne-primary
width: 100%
font-weight: bold

.banner .content
.banner-content
width: 100%
text-align: center

h1
margin-top: rem(24)
font-size: rem(28)
line-height: rem(33)
margin-bottom: rem(40)

h2
font-size: rem(20)
line-height: rem(24)

p
font-size: rem(16)
line-height: rem(19)

.banner-img
width: 100%
max-height: rem(300)

img
margin: 0 auto
8 changes: 8 additions & 0 deletions src/assets/pages/knowledge-base-universities.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"title": "Base de Conhecimento",
"subtitle": "Pesquisa e extensão acadêmica em parceria com projetos de código aberto.",
"paragraph": "Cat ipsum dolor sit amet, pee in the shoe but flop over. I love cats i am one wake up scratch humans leg for food then purr then i have a and relax eat a plant, kill a hand humans,humans, humans oh how much they love us felines we are the center of attention they feed, they clean chew foot nyan fluffness ahh cucumber!",
"bannerButton": "Entenda mais",
"spreadsheetPreview": "Cat ipsum dolor sit amet, pee in the shoe but flop over. I love cats i am one wake up scratch humans leg for food then purr then i have a and relax eat a plant, kill a hand humans,humans, humans oh how much they love us felines we are the center of attention they feed, they clean chew foot nyan fluffness ahh cucumber!",
"spreadsheetButton": "Acessar planilha"
}

0 comments on commit 5936bda

Please sign in to comment.