added sidebar mobile

This commit is contained in:
Chneemann 2024-03-23 23:23:37 +01:00
parent 84d148379d
commit 69368a1fee
8 changed files with 59 additions and 4 deletions

View file

@ -7,3 +7,4 @@
</div> </div>
</main> </main>
</div> </div>
<app-sidebar-mobile></app-sidebar-mobile>

View file

@ -7,7 +7,15 @@ app-sidebar {
width: 232px; width: 232px;
height: 100%; height: 100%;
background-color: var(--bgSidebar); background-color: var(--bgSidebar);
overflow-y: none; }
app-sidebar-mobile {
display: none;
position: fixed;
bottom: 0;
width: 100%;
height: 80px;
background-color: var(--bgSidebar);
} }
main { main {
@ -35,10 +43,14 @@ app-header {
.content { .content {
display: flex; display: flex;
justify-content: center; justify-content: center;
min-width: calc(100vw); width: 100vw;
height: calc(100vh - 210px);
padding: 32px 0 0 0; padding: 32px 0 0 0;
} }
app-sidebar { app-sidebar {
display: none; display: none;
} }
app-sidebar-mobile {
display: unset;
}
} }

View file

@ -3,11 +3,17 @@ import { Router, RouterOutlet } from '@angular/router';
import { HeaderComponent } from './shared/components/header/header.component'; import { HeaderComponent } from './shared/components/header/header.component';
import { SidebarComponent } from './shared/components/sidebar/sidebar.component'; import { SidebarComponent } from './shared/components/sidebar/sidebar.component';
import { LanguageService } from './services/language.service'; import { LanguageService } from './services/language.service';
import { SidebarMobileComponent } from './shared/components/sidebar/sidebar-mobile/sidebar-mobile.component';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
standalone: true, standalone: true,
imports: [RouterOutlet, HeaderComponent, SidebarComponent], imports: [
RouterOutlet,
HeaderComponent,
SidebarComponent,
SidebarMobileComponent,
],
templateUrl: './app.component.html', templateUrl: './app.component.html',
styleUrl: './app.component.scss', styleUrl: './app.component.scss',
}) })

View file

@ -67,7 +67,7 @@
background-color: var(--white); background-color: var(--white);
cursor: pointer; cursor: pointer;
&:hover { &:hover {
transform: scale(1.05); transform: scale(1.02);
transition: 500ms ease-out; transition: 500ms ease-out;
background-color: var(--dark-blue); background-color: var(--dark-blue);
.circle { .circle {

View file

@ -0,0 +1 @@
<p>sidebar-mobile works!</p>

View file

@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { SidebarMobileComponent } from './sidebar-mobile.component';
describe('SidebarMobileComponent', () => {
let component: SidebarMobileComponent;
let fixture: ComponentFixture<SidebarMobileComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [SidebarMobileComponent]
})
.compileComponents();
fixture = TestBed.createComponent(SidebarMobileComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,12 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-sidebar-mobile',
standalone: true,
imports: [],
templateUrl: './sidebar-mobile.component.html',
styleUrl: './sidebar-mobile.component.scss'
})
export class SidebarMobileComponent {
}