Skip to content

Commit

Permalink
opening: hide sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelCoding committed Nov 4, 2024
1 parent 30d4d9e commit 6283cb2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<aside (click)="closeAside()" [class.open]="asideSown | async">
<aside (click)="closeAside()" [class.open]="asideSown | async" [class.hidden]="disableNav | async">
<div class="aside-container">
<a class="not icon" routerLink="/">
<app-icon-logo></app-icon-logo>
Expand Down
8 changes: 7 additions & 1 deletion src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
display: grid;
grid-template-columns: auto 1fr;


@media screen and (max-width: $bp-mobile) {
grid-template-columns: 1fr;
}
Expand All @@ -21,6 +20,13 @@
gap: 1rem;
}

// edge case: opening page without sidebar
&.hidden {
width: 0;
padding: 0;
overflow: hidden;
}

.icon {
display: block;
width: 8rem;
Expand Down
2 changes: 2 additions & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { NotificationListComponent } from "@feel/notification";
})
export class AppComponent {

protected disableNav = new BehaviorSubject(false);
protected asideSown = new BehaviorSubject(false);
protected enableAnimation = new BehaviorSubject(false);

Expand Down Expand Up @@ -60,6 +61,7 @@ export class AppComponent {
this.meta.updateTag({ name: 'twitter:title', content: $localize`Dresden Internet Exchange` });
}

this.disableNav.next(event.url === '/event/opening');
}),
map(() => this.location.path() || '/'),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h2>Location</h2>
<p>
SachsenEnergie Center<br>
Friedrich-List-Platz 2<br>
01069 Dresden, Deutschland<br>
01069 Dresden, Deutschland
</p>
<h2>Traveling</h2>
<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,4 @@
.hero-card ::ng-deep .container {
background-color: rgba(0, 0, 0, 0.75) !important;
}

2 changes: 1 addition & 1 deletion src/app/pages/event/event.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Routes } from '@angular/router';
export const routes: Routes = [
{
path: 'opening',
loadComponent: () => import("./event-opening/event-opening.component").then(c => c.EventOpeningComponent)
loadComponent: () => import("./event-opening/event-opening.component").then(c => c.EventOpeningComponent),
},
{
path: ':slug',
Expand Down

0 comments on commit 6283cb2

Please sign in to comment.