Skip to content

Feature/login #11

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

Closed
wants to merge 14 commits into from
Closed
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
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
82 changes: 82 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"@angular/platform-browser": "^17.3.0",
"@angular/platform-browser-dynamic": "^17.3.0",
"@angular/router": "^17.3.0",
"angular-calendar": "^0.31.1",
"date-fns": "^4.1.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.3"
Expand Down
5 changes: 5 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { PagesRouting } from './pages/routing';
import { LayoutComponent } from './core/layout/layout.component';
import { LoginComponent } from './pages/login/login.component';

const routes: Routes = [
{
path: 'login',
component: LoginComponent,
},
{
path: '',
pathMatch: 'full',
Expand Down
3 changes: 2 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import { AppComponent } from './app.component';
import { SharedModule } from './shared/shared.module';
import { CoreModule } from './core/core.module';
import { HomeComponent } from './pages/home/home.component';
import { LoginComponent } from './pages/login/login.component';

@NgModule({
declarations: [AppComponent, HomeComponent],
declarations: [AppComponent, HomeComponent, LoginComponent],
imports: [BrowserModule, AppRoutingModule, SharedModule, CoreModule],
providers: [],
bootstrap: [AppComponent],
Expand Down
8 changes: 4 additions & 4 deletions src/app/core/components/menu/menu.component.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../styles/main';
@import '../../../../styles/styles.scss';

$menu-width: 96px;
$menu-padding: 20px;
Expand All @@ -11,15 +11,16 @@ $menu-box-shadow: 0px 4px 8px -2px rgba(0, 0, 0, 0.25);

.menu {
width: $menu-width;
height: auto;
height: 100%;
max-height: $menu-max-height;
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;
margin-right: 32px;

.header-menu {
display: flex;
Expand Down Expand Up @@ -58,7 +59,6 @@ $menu-box-shadow: 0px 4px 8px -2px rgba(0, 0, 0, 0.25);
}

.side-nav {
height: 90vh;
display: flex;
overflow: hidden;
list-style: none;
Expand Down
6 changes: 5 additions & 1 deletion src/app/core/layout/layout.component.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
@import '../../../styles/main';
@import '../../../styles/styles';
main {
display: flex;
align-items: center;
height: 100%;
padding: $padding-ultra-large;

header {
height: 100%;
}

section {
display: flex;
align-items: center;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="calendar-container">
<mwl-calendar-month-view [viewDate]="viewDate" [events]="[]"> </mwl-calendar-month-view>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.calendar-container {
display: flex;
justify-content: center;
padding: 20px;
width: 1000px;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Component } from '@angular/core';
import { CalendarView } from 'angular-calendar';

@Component({
selector: 'app-calendar-diary',
templateUrl: './calendar-diary.component.html',
styleUrl: './calendar-diary.component.scss',
})
export class CalendarDiaryComponent {
view: CalendarView = CalendarView.Month;
viewDate: Date = new Date();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<section>
<div class="msg-welcome">
<p>
Bem-vindo ao seu espaço de reflexão! Escreva como se sente e tudo o que deseja lembrar. Cada registro é um passo importante
para se conhecer melhor!
</p>
<img src="assets/imgDiary/nilo-newRegister.png" alt="" />
</div>
<app-button [width]="'306px'" [router]="'register'"> Registrar Emoção </app-button>
</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@import '../../../../../styles/styles';

section {
display: flex;
flex-direction: column;
align-items: center;
gap: 100px;

.msg-welcome {
display: inline-flex;
align-items: center;

p {
width: 416px;
background-color: $bg-color-alternative-2;
padding: $padding-medium;
border-radius: $border-radius-medium;
@include body-font(600);
}

}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { HomeDiaryComponent } from './home-diary.component';

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

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

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

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-home-diary',
templateUrl: './home-diary.component.html',
styleUrl: './home-diary.component.scss',
})
export class HomeDiaryComponent {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<section>
<header>
<span>03/11/2024 - Sexta-feira</span>

<button routerLink="/diario/calendar">
<img src="assets/icons/weekly-calendar-daily-calendar 1.svg" alt="" />
Meus Registros
</button>
</header>
<form #diaryForm="ngForm" (ngSubmit)="submitReflection()">
<div class="emotion-selector">
<span>Como você está se sentindo hoje?</span>
<ul>
<li>
<input type="radio" name="emotion" id="happy" [(ngModel)]="reflection.emotion" value="happy" />
<label for="happy">
<div class="img-content">
<img src="assets/iconsFeel/icon-feel-happy.png" alt="" />
</div>
<span>Feliz</span>
</label>
</li>
<li>
<input type="radio" name="emotion" id="good" [(ngModel)]="reflection.emotion" value="good" />
<label for="good">
<div class="img-content">
<img src="assets/iconsFeel/icon-feel-good.png" alt="" />
</div>
<span>Bem</span>
</label>
</li>
<li>
<input type="radio" name="emotion" id="neutral" [(ngModel)]="reflection.emotion" value="neutral" />
<label for="neutral">
<div class="img-content">
<img src="assets/iconsFeel/icon-feel-neutral.png" alt="" />
</div>
<span>Neutro</span>
</label>
</li>
<li>
<input type="radio" name="emotion" id="anxious" [(ngModel)]="reflection.emotion" value="anxious" />
<label for="anxious">
<div class="img-content">
<img src="assets/iconsFeel/icon-feel-anxious.png" alt="" />
</div>
<span>Ansioso</span>
</label>
</li>
<li>
<input type="radio" name="emotion" id="sad" [(ngModel)]="reflection.emotion" value="sad" />
<label for="sad">
<div class="img-content">
<img src="assets/iconsFeel/icon-feel-sad.png" alt="" />
</div>
<span>Triste</span>
</label>
</li>
<li>
<input type="radio" name="emotion" id="horrible" [(ngModel)]="reflection.emotion" value="horrible" />
<label for="horrible">
<div class="img-content">
<img src="assets/iconsFeel/icon-feel-horrible.png" alt="" />
</div>
<span>Horrível</span>
</label>
</li>
</ul>
</div>
<div class="daily-reflections">
<span>Suas Reflexões do Dia</span>
<textarea
name="reflectionText"
id="reflectionText"
placeholder="Escreva aqui suas ideias, reflexões ou qualquer coisa que queira lembrar. Este é seu espaço livre para anotações."
[(ngModel)]="reflection.reflectionText">
</textarea>
</div>
<button type="submit" class="primary">Register</button>
</form>
</section>
Loading
Loading