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

dedicated background page, where all you can see is noise #181

Merged
merged 4 commits into from
Jul 20, 2021
Merged
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
10 changes: 8 additions & 2 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ const routes: Routes = [
path: '',
redirectTo: '/gong',
pathMatch: 'full'
}, {
path: 'background',
loadChildren: () => import('src/app/pages/background/background.module')
.then(module => module.BackgroundModule),
}, {
path: 'gong',
loadChildren: () => import('./pages/gong/gong.module').then(m => m.GongModule),
loadChildren: () => import('src/app/pages/gong/gong.module')
.then(module => module.GongModule),
}, {
path: '**',
loadChildren: () => import('src/app/pages/not-found/not-found.module').then(m => m.NotFoundModule),
loadChildren: () => import('src/app/pages/not-found/not-found.module')
.then(module => module.NotFoundModule),
},
];

Expand Down
9 changes: 4 additions & 5 deletions src/app/app.component.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
:host {
display: flex;
flex-flow: column nowrap;

.mat-sidenav-container {
color: var(--dark-text-color);
background-color: var(--lightest-theme-color);
Expand All @@ -13,11 +10,13 @@
}
}

:host, .mat-sidenav-container, .mat-sidenav-content {
:host,
.mat-sidenav-container,
.mat-sidenav-content,
section {
display: flex;
flex-flow: column nowrap;
height: 100%;
width: 100%;
overflow: hidden;
}

4 changes: 2 additions & 2 deletions src/app/navigation/background/models/circle.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ export class Circle extends CanvasElement {

if (mouseDistance < 100) {
if (this.radius < Circle.maxRadius + this.dRadius) {
this.radius++;
this.radius += 1.5;
}
} else if (this.radius > Circle.minRadius + this.dRadius) {
this.radius--;
this.radius -= 0.25;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<mat-card-header>
<mat-icon mat-card-avatar [svgIcon]="config.icon"></mat-icon>
<mat-card-title>
{{ config.title }}
<dyslexic-text [text]="config.title"></dyslexic-text>
</mat-card-title>
</mat-card-header>
</mat-card>
3 changes: 2 additions & 1 deletion src/app/navigation/sidebar/sidebar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ export class SidebarComponent {
private static get navigationItems(): ReadonlyArray<NavigationConfig> {
return [
NavigationConfig.from('About', SvgIcon.GOAT, 'about'),
NavigationConfig.from('Snek', SvgIcon.SNAKE, 'snek'),
NavigationConfig.from('Gong', SvgIcon.GONG, 'gong'),
NavigationConfig.from('404', SvgIcon.ONI, 'get-got'),
NavigationConfig.from('Noise', SvgIcon.ONI, 'background'),
];
}
}
17 changes: 17 additions & 0 deletions src/app/pages/background/background-noise.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';

@Component({
selector: 'background-noise',
template: `
<h1>
<dyslexic-text text="Pure Background Noise"></dyslexic-text>
</h1>`,
styles: [
`:host {
text-align: center;
text-decoration: underline;
}`
],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class BackgroundNoiseComponent { }
19 changes: 19 additions & 0 deletions src/app/pages/background/background-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { BackgroundNoiseComponent } from 'src/app/pages/background/background-noise.component';

const routes: Routes = [
{
path: '',
component: BackgroundNoiseComponent,
data: {
title: 'noise',
},
},
];

@NgModule({
imports: [ RouterModule.forChild(routes) ],
exports: [ RouterModule ]
})
export class BackgroundRoutingModule { }
17 changes: 17 additions & 0 deletions src/app/pages/background/background.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { BackgroundNoiseComponent } from 'src/app/pages/background/background-noise.component';
import { BackgroundRoutingModule } from 'src/app/pages/background/background-routing.module';
import { DyslexicTextModule } from 'src/app/shared/dyslexic-text/dyslexic-text.module';

@NgModule({
declarations: [
BackgroundNoiseComponent,
],
imports: [
DyslexicTextModule,
],
exports: [
BackgroundRoutingModule,
],
})
export class BackgroundModule { }
1 change: 1 addition & 0 deletions src/app/shared/svg/internal-svg-icon.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export enum InternalSvgIcon {
SINS_PRIDE = 'sins/pride',
SINS_SLOTH = 'sins/sloth',
SINS_WRATH = 'sins/wrath',
SNAKE = 'snake',
STACK = 'stack',
WHEEL = 'wheel',
}
5 changes: 5 additions & 0 deletions src/assets/svg/snake.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.