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

Feature/components popup #8

Merged
merged 22 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5ef938b
style: applying a style guide into project's files
LorenaSMO Nov 10, 2024
d4b7cc7
fix: adjusting files with prettier
LorenaSMO Nov 13, 2024
be2c562
feat: adicionado estrutura das pastas do projeto
vasconcelos-gabriel Nov 14, 2024
0ab74fb
feat: adicionado os modulos das pastas e criado o componente button
vasconcelos-gabriel Nov 14, 2024
64fd9ee
Merge pull request #2 from estartandodevs-course/feature/estrutura-pa…
LorenaSMO Nov 15, 2024
bfc358e
Merge pull request #3 from estartandodevs-course/feature/components-b…
LorenaSMO Nov 15, 2024
842e024
feat: importando os icons e img
danielbgmg Nov 16, 2024
ecfe666
feat: novas imagens
danielbgmg Nov 20, 2024
ad62f74
feat: initial card popups
LorenaSMO Nov 22, 2024
dcadfd3
feat: create component menu
pablomesquita Nov 24, 2024
c14b3c5
Merge pull request #5 from estartandodevs-course/feature/component-menu
danielbgmg Nov 28, 2024
24fea98
feat: criação do layout base da aplicação
danielbgmg Nov 28, 2024
e04960d
Merge pull request #6 from estartandodevs-course/feature/layout
pablomesquita Nov 29, 2024
a485854
Merge branch 'develop' into feature/components-popup
danielbgmg Nov 29, 2024
268ab3a
Merge pull request #4 from estartandodevs-course/feature/components-p…
danielbgmg Nov 29, 2024
9e3c1e6
feat: adicionando o routerlink no component de botão
danielbgmg Nov 30, 2024
ade92c0
fix: corrigindo algumas váriaveis de cores e na aplicação no componen…
danielbgmg Nov 30, 2024
686fd15
Merge branch 'develop' of https://github.com/estartandodevs-course/ni…
danielbgmg Nov 30, 2024
5e43339
fix: corrigindo a importação das cores
danielbgmg Nov 30, 2024
0544bf1
fix: corrigindo a importação das cores
danielbgmg Nov 30, 2024
4338393
feat: added speech bubble component
LorenaSMO Dec 3, 2024
04d5f1e
fix: fixed linting
LorenaSMO Dec 3, 2024
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ root = true
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
# insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
text=auto eol=lf
7 changes: 4 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"styles": ["src/styles/main.scss"],
"scripts": []
},
"configurations": {
Expand Down Expand Up @@ -83,7 +83,7 @@
"tsConfig": "tsconfig.spec.json",
"inlineStyleLanguage": "scss",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"styles": ["src/styles/main.scss"],
"scripts": []
}
},
Expand All @@ -97,6 +97,7 @@
}
},
"cli": {
"schematicCollections": ["@angular-eslint/schematics"]
"schematicCollections": ["@angular-eslint/schematics"],
"analytics": false
}
}
20 changes: 19 additions & 1 deletion src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { PagesRouting } from './pages/routing';
import { LayoutComponent } from './core/layout/layout.component';

const routes: Routes = [];
const routes: Routes = [
{
path: '',
pathMatch: 'full',
redirectTo: 'home',
},
{
path: '',
component: LayoutComponent,
children: PagesRouting,
},
{
path: '**',
pathMatch: 'prefix',
redirectTo: 'home',
},
];

@NgModule({
imports: [RouterModule.forRoot(routes)],
Expand Down
274 changes: 1 addition & 273 deletions src/app/app.component.html

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';

import { SharedModule } from './shared/shared.module';
import { CoreModule } from './core/core.module';
import { HomeComponent } from './pages/home/home.component';

@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, AppRoutingModule],
declarations: [AppComponent, HomeComponent],
imports: [BrowserModule, AppRoutingModule, SharedModule, CoreModule],
providers: [],
bootstrap: [AppComponent],
})
Expand Down
35 changes: 35 additions & 0 deletions src/app/core/components/menu/menu.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<div [ngClass]="{ menu: true, 'menu-open': isOpen }">
<div class="header-menu">
<div class="container-logo">
<img src="../../../../assets/icons/nibller2-logo.svg" alt="logo nibller" />
<h1 class="title" *ngIf="isOpen">Nibbler</h1>
</div>
<button (click)="toggleMenu()" class="btn-menu">
<img
class="icon"
[ngClass]="{ active: isOpen }"
src="../../../../assets/iconsFeel/chevron-right-circle-svgrepo-com.svg"
alt="seta abrir e fechar" />
</button>
</div>
<ul class="side-nav">
<li class="side-nav-item">
<a routerLink="agenda" class="side-nav-link">
<img class="side-nav-link-icon" src="../../../../assets/icons/book-open-svgrepo-com 1.svg" alt="icone de agenda" />
<span class="side-nav-link-text" *ngIf="isOpen">Agenda</span>
</a>
</li>
<li class="side-nav-item">
<a routerLink="pomodoro" class="side-nav-link">
<img class="side-nav-link-icon" src="../../../../assets/icons/timer-svgrepo-com.svg" alt="icone do pomodoro" />
<span class="side-nav-link-text" *ngIf="isOpen">Pomodoro</span>
</a>
</li>
<li class="side-nav-item">
<a routerLink="diario" class="side-nav-link">
<img class="side-nav-link-icon" src="../../../../assets/icons/emoji-happy-svgrepo-com.svg" alt="icone do diario" />
<span class="side-nav-link-text" *ngIf="isOpen">Meu Diário</span>
</a>
</li>
</ul>
</div>
114 changes: 114 additions & 0 deletions src/app/core/components/menu/menu.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
@import '../../../../styles/main';

$menu-width: 96px;
$menu-padding: 20px;
$menu-margin: auto 0;
$menu-max-height: 764px;
$menu-border-radius: 20px;
$menu-transition: all 0.5s ease;
$menu-background: $primary-color-100;
$menu-box-shadow: 0px 4px 8px -2px rgba(0, 0, 0, 0.25);

.menu {
width: $menu-width;
height: auto;
padding: $menu-padding;
margin: $menu-margin;
max-height: $menu-max-height;
position: relative;
border-radius: $menu-border-radius;
transition: $menu-transition;
background: $menu-background;
box-shadow: $menu-box-shadow;

.header-menu {
display: flex;
margin-bottom: $menu-padding;

.container-logo {
gap: 10px;
width: 100%;
display: flex;
min-height: 68px;
overflow: hidden;
align-items: center;

.title {
font-weight: 700;
font-size: 26px;
font-family: $primary-font;
}
}

.btn-menu {
right: -12px;
position: absolute;
border-radius: 50%;
background-color: transparent;

.icon {
transform: rotate(0deg);
transition: transform 0.1s linear;
}

.active {
transform: rotate(180deg);
}
}
}

.side-nav {
height: 90vh;
display: flex;
overflow: hidden;
list-style: none;
max-height: 695px;
align-items: center;
flex-direction: column;

&:hover {
overflow-y: auto;
}

.side-nav-item {
width: 100%;

.side-nav-link {
gap: 15px;
display: flex;
padding: 0 15px;
min-height: 48px;
align-items: center;
text-decoration: none;
border: 1px solid transparent;

.side-nav-link-icon {
max-height: 24px;
filter: invert(32%) sepia(48%) saturate(366%) hue-rotate(357deg) brightness(90%) contrast(86%);
}

.side-nav-link-text {
font-weight: 600;
color: $neutral-color-800;
font-family: $secondary-font;
}
}
}

.side-nav-item:hover {
.side-nav-link {
border-radius: 99px;
border-color: $tertiary-color-200;
background-color: $tertiary-color-100;

.side-nav-link-icon {
filter: invert(7%) sepia(51%) saturate(423%) hue-rotate(352deg) brightness(92%) contrast(91%);
}
}
}
}
}

.menu-open {
width: 280px;
}
22 changes: 22 additions & 0 deletions src/app/core/components/menu/menu.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { MenuComponent } from './menu.component';

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

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

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

it('should create', () => {
expect(component).toBeTruthy();
});
});
16 changes: 16 additions & 0 deletions src/app/core/components/menu/menu.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-menu',
templateUrl: './menu.component.html',
styleUrl: './menu.component.scss',
})
export class MenuComponent {
isOpen = false;
navData = navData;

toggleMenu(): void {
this.isOpen = !this.isOpen;
}
}
export const navData = [];
18 changes: 18 additions & 0 deletions src/app/core/core.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { NgModule, Optional, SkipSelf } from '@angular/core';
import { CommonModule, NgOptimizedImage } from '@angular/common';
import { RouterModule } from '@angular/router';
import { LayoutComponent } from './layout/layout.component';
import { MenuComponent } from './components/menu/menu.component';
import { SharedModule } from '../shared/shared.module';

@NgModule({
declarations: [LayoutComponent, MenuComponent],
imports: [CommonModule, NgOptimizedImage, RouterModule, SharedModule],
})
export class CoreModule {
constructor(@Optional() @SkipSelf() parentModule?: CoreModule) {
if (parentModule) {
throw new Error('CoreModule has already been loaded. Import this module in the AppModule only.');
}
}
}
9 changes: 9 additions & 0 deletions src/app/core/layout/layout.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<main>
<header>
<app-menu></app-menu>
</header>

<section>
<router-outlet></router-outlet>
</section>
</main>
14 changes: 14 additions & 0 deletions src/app/core/layout/layout.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@import '../../../styles/main';
main {
display: flex;
align-items: center;
height: 100%;
padding: $padding-ultra-large;

section {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
}
}
8 changes: 8 additions & 0 deletions src/app/core/layout/layout.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-layout',
templateUrl: './layout.component.html',
styleUrl: './layout.component.scss',
})
export class LayoutComponent {}
1 change: 1 addition & 0 deletions src/app/pages/home/home.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>home works!</p>
File renamed without changes.
22 changes: 22 additions & 0 deletions src/app/pages/home/home.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { HomeComponent } from './home.component';

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

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

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

it('should create', () => {
expect(component).toBeTruthy();
});
});
8 changes: 8 additions & 0 deletions src/app/pages/home/home.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrl: './home.component.scss',
})
export class HomeComponent {}
16 changes: 16 additions & 0 deletions src/app/pages/pomodoro/pomodoro-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { PomodoroComponent } from './pomodoro.component';

const routes: Routes = [
{
path: '',
component: PomodoroComponent,
},
];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class PomodoroRoutingModule {}
1 change: 1 addition & 0 deletions src/app/pages/pomodoro/pomodoro.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>Pomodoro works!</p>
Empty file.
8 changes: 8 additions & 0 deletions src/app/pages/pomodoro/pomodoro.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-pomodoro',
templateUrl: './pomodoro.component.html',
styleUrl: './pomodoro.component.scss',
})
export class PomodoroComponent {}
11 changes: 11 additions & 0 deletions src/app/pages/pomodoro/pomodoro.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { PomodoroRoutingModule } from './pomodoro-routing.module';
import { PomodoroComponent } from './pomodoro.component';

@NgModule({
declarations: [PomodoroComponent],
imports: [CommonModule, PomodoroRoutingModule],
})
export class PomodoroModule {}
Loading
Loading