Skip to content

Commit

Permalink
Merge pull request #30 from Star-Academy/graph
Browse files Browse the repository at this point in the history
Graph
  • Loading branch information
FrOZEn-FurY authored Aug 28, 2024
2 parents 0a119cc + c557ffa commit d15882f
Show file tree
Hide file tree
Showing 48 changed files with 2,288 additions and 167 deletions.
664 changes: 658 additions & 6 deletions project/package-lock.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
"@angular/platform-server": "^18.1.0",
"@angular/router": "^18.1.0",
"@angular/ssr": "^18.1.2",
"@types/d3": "^7.4.3",
"d3": "^7.9.0",
"express": "^4.18.2",
"jalaali-js": "^1.2.7",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.3"
Expand Down
12 changes: 8 additions & 4 deletions project/src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ import {EditProfileComponent} from "./components/dashboard/edit-profile/edit-pro
import {ChangePasswordComponent} from "./components/dashboard/change-password/change-password.component";
import {ManageUsersComponent} from "./components/dashboard/manage-users/manage-users.component";
import {ShowDataComponent} from "./components/dashboard/show-data/show-data.component";
import {isAdminGuard} from "./guards/admin/is-admin.guard";
import { DashboardhomeComponent } from './components/dashboard/dashboardhome/dashboardhome.component';

export const routes: Routes = [
{path: 'dashboard', component: DashboardComponent, children: [
{path: 'profile', component: ProfileComponent},
{path: 'edit-profile', component: EditProfileComponent},
{path: 'change-password', component: ChangePasswordComponent},
{path: 'manage-users', component: ManageUsersComponent},
{path: 'home', component: DashboardhomeComponent},
{path: 'profile', component: ProfileComponent , children: [
{path: 'edit-profile', component: EditProfileComponent},
{path: 'change-password', component: ChangePasswordComponent},
]},
{path: 'manage-users', component: ManageUsersComponent, canActivate: [isAdminGuard]},
{path: 'show-data', component: ShowDataComponent},
], canActivate: [loggedInGuard], data: { requiresAuth: true } },
{path: 'login', component: LoginComponent, canActivate: [loggedInGuard], data: { requiresAuth: false }},
Expand Down
21 changes: 21 additions & 0 deletions project/src/app/components/bg-gif/bg-gif.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div class="background">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
205 changes: 205 additions & 0 deletions project/src/app/components/bg-gif/bg-gif.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@


@keyframes move {
100% {
transform: translate3d(0, 0, 1px) rotate(360deg);
}
}

.background {
position: fixed;
width: 100vw;
height: 100vh;
top: 0;
left: 0;
background: #fdfdfd;
overflow: hidden;
z-index: -1;
}

.background span {
width: 1vmin;
height: 1vmin;
border-radius: 1vmin;
backface-visibility: hidden;
position: absolute;
animation: move;
animation-duration: 38;
animation-timing-function: linear;
animation-iteration-count: infinite;
}


.background span:nth-child(0) {
color: #e9b91b;
top: 44%;
left: 37%;
animation-duration: 62s;
animation-delay: -45s;
transform-origin: -4vw -4vh;
box-shadow: 2vmin 0 1.179326042713791vmin currentColor;
}
.background span:nth-child(1) {
color: #4f86c9;
top: 23%;
left: 97%;
animation-duration: 82s;
animation-delay: -25s;
transform-origin: 5vw 25vh;
box-shadow: -2vmin 0 0.7106015815700037vmin currentColor;
}
.background span:nth-child(2) {
color: #e9b91b;
top: 3%;
left: 64%;
animation-duration: 121s;
animation-delay: -58s;
transform-origin: 18vw -7vh;
box-shadow: -2vmin 0 0.2600782522780347vmin currentColor;
}
.background span:nth-child(3) {
color: #e9b91b;
top: 1%;
left: 65%;
animation-duration: 14s;
animation-delay: -34s;
transform-origin: -23vw 10vh;
box-shadow: -2vmin 0 0.8925616875372739vmin currentColor;
}
.background span:nth-child(4) {
color: #e9b91b;
top: 64%;
left: 96%;
animation-duration: 111s;
animation-delay: -36s;
transform-origin: -5vw 15vh;
box-shadow: -2vmin 0 0.3975511244379719vmin currentColor;
}
.background span:nth-child(5) {
color: #4f86c9;
top: 35%;
left: 88%;
animation-duration: 83s;
animation-delay: -19s;
transform-origin: 4vw 6vh;
box-shadow: -2vmin 0 0.4574674663634355vmin currentColor;
}
.background span:nth-child(6) {
color: #002b5b;
top: 17%;
left: 70%;
animation-duration: 116s;
animation-delay: -13s;
transform-origin: 10vw -22vh;
box-shadow: 2vmin 0 0.5994571422697834vmin currentColor;
}
.background span:nth-child(7) {
color: #e9b91b;
top: 8%;
left: 30%;
animation-duration: 12s;
animation-delay: -63s;
transform-origin: 20vw -20vh;
box-shadow: -2vmin 0 0.944790036995725vmin currentColor;
}
.background span:nth-child(8) {
color: #002b5b;
top: 58%;
left: 45%;
animation-duration: 23s;
animation-delay: -101s;
transform-origin: -20vw -2vh;
box-shadow: -2vmin 0 1.113637056359262vmin currentColor;
}
.background span:nth-child(9) {
color: #4f86c9;
top: 98%;
left: 80%;
animation-duration: 103s;
animation-delay: -9s;
transform-origin: -4vw 24vh;
box-shadow: -2vmin 0 0.8466328436131629vmin currentColor;
}
.background span:nth-child(10) {
color: #e9b91b;
top: 91%;
left: 35%;
animation-duration: 13s;
animation-delay: -85s;
transform-origin: -1vw -18vh;
box-shadow: -2vmin 0 0.6988589961678999vmin currentColor;
}
.background span:nth-child(11) {
color: #4f86c9;
top: 12%;
left: 38%;
animation-duration: 124s;
animation-delay: -80s;
transform-origin: -10vw -12vh;
box-shadow: -2vmin 0 1.0281140568796288vmin currentColor;
}
.background span:nth-child(12) {
color: #4f86c9;
top: 65%;
left: 47%;
animation-duration: 14s;
animation-delay: -20s;
transform-origin: 13vw 19vh;
box-shadow: 2vmin 0 0.4922053968944644vmin currentColor;
}
.background span:nth-child(13) {
color: #002b5b;
top: 1%;
left: 85%;
animation-duration: 119s;
animation-delay: -120s;
transform-origin: -5vw 1vh;
box-shadow: 2vmin 0 0.89657619610927vmin currentColor;
}
.background span:nth-child(14) {
color: #4f86c9;
top: 98%;
left: 67%;
animation-duration: 63s;
animation-delay: -98s;
transform-origin: 17vw -24vh;
box-shadow: -2vmin 0 0.2674072793462621vmin currentColor;
}
.background span:nth-child(15) {
color: #4f86c9;
top: 47%;
left: 22%;
animation-duration: 114s;
animation-delay: -21s;
transform-origin: 20vw 6vh;
box-shadow: 2vmin 0 1.1494681355574716vmin currentColor;
}
.background span:nth-child(16) {
color: #4f86c9;
top: 17%;
left: 3%;
animation-duration: 29s;
animation-delay: -82s;
transform-origin: 15vw 22vh;
box-shadow: -2vmin 0 0.7033084944562273vmin currentColor;
}
.background span:nth-child(17) {
color: #e9b91b;
top: 18%;
left: 31%;
animation-duration: 26s;
animation-delay: -97s;
transform-origin: 20vw -15vh;
box-shadow: 2vmin 0 0.3154577920055257vmin currentColor;
}
.background span:nth-child(18) {
color: #e9b91b;
top: 72%;
left: 46%;
animation-duration: 85s;
animation-delay: -42s;
transform-origin: 14vw 6vh;
box-shadow: 2vmin 0 0.5774089805359588vmin currentColor;
}


23 changes: 23 additions & 0 deletions project/src/app/components/bg-gif/bg-gif.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { BgGifComponent } from './bg-gif.component';

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

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

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

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

@Component({
selector: 'app-bg-gif',
standalone: true,
imports: [],
templateUrl: './bg-gif.component.html',
styleUrl: './bg-gif.component.scss'
})
export class BgGifComponent {

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class ChangePasswordComponent {
newPassword: this.formGroup.value.newPassword
}
this.modifyService.changePassword(data);
this.router.navigate(['dashboard/profile'])
this.router.navigate(['dashboard/home'])
} else {
alert("مشکلی در ورودی های شما وجود دارد.")
}
Expand Down
12 changes: 8 additions & 4 deletions project/src/app/components/dashboard/dashboard.component.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
<div class="fullscreen">
<div #navbarIcon>
<div class="fullscreen flex w-screen h-screen ">
<!-- <div #navbarIcon>
<ng-icon (click)="handleShowNavbar()" name="heroBars3" class="dashboard-navbar-icon"></ng-icon>
</div>
<nav #navbar class="dashboard-navbar hidden">
<ng-icon (click)="handleCloseNavbar()" name="heroArrowUturnRight" class="dashboard-navbar-back-icon"></ng-icon>
<app-navbar></app-navbar>
</nav>
<section #content class="dashboard-content">
-->
<app-navbar class="w-[17vw] flex h-full"></app-navbar>

<section #content class="dashboard-content w-[83vw]">
<router-outlet></router-outlet>
</section>
</div>
</div>

37 changes: 18 additions & 19 deletions project/src/app/components/dashboard/dashboard.component.scss
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
@import "../../../variables";

@layer components {
.dashboard-navbar-icon {
@apply h-[3rem] w-[3rem] hover:cursor-pointer absolute top-1 right-0 rounded-2xl;
background-color: $primary-color;
color: $bg-color;
}
.dashboard-navbar-back-icon {
@apply h-[3rem] w-[3rem] hover:cursor-pointer;
}
.dashboard-navbar {
@apply self-stretch w-[100vw] lg:w-[20vw] p-4;
background-color: $primary-color;
color: $bg-color;
}
.dashboard-content {
@apply self-stretch flex w-[99vw] flex-row justify-center items-center;
// .dashboard-navbar-icon {
// @apply h-[3rem] w-[3rem] hover:cursor-pointer absolute top-1 right-0 rounded-2xl;
// background-color: $primary-color;
// color: $bg-color;
// }
// .dashboard-navbar-back-icon {
// @apply h-[3rem] w-[3rem] hover:cursor-pointer;
// }
// .dashboard-navbar {
// @apply self-stretch w-[100vw] lg:w-[20vw] p-4;
// background-color: $primary-color;
// color: $bg-color;
// }
// .dashboard-content {
// @apply self-stretch flex w-[80vw] flex-row justify-center items-center;
// background-color: $bg-color;
// }
.fullscreen{
background-color: $bg-color;
}
}

.dashboard-content {
align-self: start;
}
Loading

0 comments on commit d15882f

Please sign in to comment.