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

feat(footer): implement footer component #173

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions modules/layout/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './lib/footer/footer.component';
export * from './lib/header/header.component';
10 changes: 10 additions & 0 deletions modules/layout/src/lib/footer/footer.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<footer id="footer">
Copy link
Member

@Werisu Werisu Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adicionar a class p-20px e mt-20px

<address>
<p class="footer-title">ASCEPA - Associação de e para Cegos do Pará</p>
<p class="footer-subtitle">Rua Tal, 123 - CEP 91234-123 - Cidade/Estado</p>
</address>
<p class="footer-copyright">
Copyright © {{ currentYear }} ASCEPA - Desenvolvido voluntariamente por Tech
Experts
</p>
</footer>
14 changes: 14 additions & 0 deletions modules/layout/src/lib/footer/footer.component.scss
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Boa Tarde Guerreiro, Firme ?

Sua implementação funcionou legal, mas precisa realizar 2 ajustes.
I. Utilizar o Tokens de margens e cor;
II. Ajuste o Media Queries, com px não fica renderizando conforme o tamanho.
image

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@import './../../../../../src/scss/tokens/colors/token';
@import './../../../../../src/scss/tokens/generic/mixin';
@import './../../../../../src/scss/tokens/generic/token';

footer {
text-align: center;
padding: 20px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remover padding:20px

background-color: #f8f8f8;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acredito que não exista essa cor no projeto do figma

projeto figma

utilizar o token $color-white

margin-top: 20px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remover margin-top: 20px

}

address {
font-style: normal;
}
21 changes: 21 additions & 0 deletions modules/layout/src/lib/footer/footer.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FooterComponent } from './footer.component';

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

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [FooterComponent],
}).compileComponents();

fixture = TestBed.createComponent(FooterComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
13 changes: 13 additions & 0 deletions modules/layout/src/lib/footer/footer.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { CommonModule, NgOptimizedImage } from '@angular/common';
import { Component } from '@angular/core';

@Component({
selector: 'lib-footer',
standalone: true,
imports: [CommonModule, NgOptimizedImage],
templateUrl: './footer.component.html',
styleUrl: './footer.component.scss',
})
export class FooterComponent {
currentYear: number = new Date().getFullYear();
}
1 change: 1 addition & 0 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<lib-header></lib-header>
<router-outlet />
<lib-footer></lib-footer>
4 changes: 2 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Component } from '@angular/core';
import { RouterModule } from '@angular/router';
import { HeaderComponent } from '@portal-ascepa/layout';
import { FooterComponent, HeaderComponent } from '@portal-ascepa/layout';

@Component({
standalone: true,
imports: [RouterModule, HeaderComponent],
imports: [RouterModule, HeaderComponent, FooterComponent],
selector: 'app-root',
templateUrl: './app.component.html',
styleUrl: './app.component.scss',
Expand Down
18 changes: 18 additions & 0 deletions src/scss/components/typography/_mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,21 @@
font-size: $font-size-body-p;
color: $color-secondary;
}

@mixin footer-title-style {
font-weight: $font-weight-bold;
font-size: $font-size-h3;
color: $color-primary;
}

@mixin footer-subtitle-style {
font-weight: $font-weight-regular;
font-size: $font-size-h4;
color: $color-primary;
}

@mixin footer-copyright-style {
font-weight: $font-weight-regular;
font-size: $font-size-h5;
color: $color-primary;
}
14 changes: 14 additions & 0 deletions src/scss/components/typography/_styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,17 @@ h3 {
.body-p {
@include body-p-style;
}

.footer-title {
@include footer-title-style;
margin-bottom: 10px;
}

.footer-subtitle {
@include footer-subtitle-style;
}

.footer-copyright {
@include footer-copyright-style;
margin-top: 30px;
}
3 changes: 3 additions & 0 deletions src/scss/tokens/typography/_token.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ $font-weight-regular: 400;
$font-size-h1: 2rem;
$font-size-h2: 1.5rem;
$font-size-h3: 1.25rem;
$font-size-h4: 1rem;
$font-size-h5: 0.75rem;
$font-size-h6: 0.5rem;
$font-size-body-l: 1rem;
$font-size-body-m: 0.875rem;
$font-size-body-p: 0.75rem;
Loading