diff --git a/projects/common/src/lib/components/side-panel/side-panel.component.scss b/projects/common/src/lib/components/side-panel/side-panel.component.scss index 697e599..c6fc76c 100644 --- a/projects/common/src/lib/components/side-panel/side-panel.component.scss +++ b/projects/common/src/lib/components/side-panel/side-panel.component.scss @@ -1,10 +1,11 @@ .side-panel { position: absolute; - top: 0px; + top: 50%; bottom: 0px; - width: 22rem; + width: 100%; left: 0px; - transition: left 0.3s; + height:100%; + transition: left 0.3s, top 0.3s; background-color: white; box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); } @@ -31,7 +32,7 @@ } .side-panel.hidden { - left: -24rem; + top:100%; } .content { @@ -40,3 +41,18 @@ overflow:hidden; overflow-y:auto; } + +@media screen and (min-width:44rem) { + .side-panel { + top:0px; + width: 22rem; + left:0px; + } + + .side-panel.hidden { + top:0px; + width: 22rem; + left:-24rem; + } + +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 7e6a518..86dee29 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -3,9 +3,11 @@ import { RouterModule } from '@angular/router'; import { AuthGuard } from '@farmmaps/common'; import { AppContentComponent} from './app-content.component'; +import { AppSidePanelTestComponent } from './app-side-panel-test.component'; const routes = [ - { path: '', canLoad: [AuthGuard], component: AppContentComponent} + { path: '', canLoad: [AuthGuard], component: AppContentComponent}, + { path: 'sidepanel', canLoad: [AuthGuard], component: AppSidePanelTestComponent} ]; @NgModule({ diff --git a/src/app/app-side-panel-test.component.ts b/src/app/app-side-panel-test.component.ts new file mode 100644 index 0000000..23fab8a --- /dev/null +++ b/src/app/app-side-panel-test.component.ts @@ -0,0 +1,29 @@ +import { Component ,ChangeDetectorRef } from '@angular/core'; + + + +@Component({ + selector: 'app-side-panel-test', + template: '
' +}) +export class AppSidePanelTestComponent { + + public show:boolean = false; + + constructor(public cr:ChangeDetectorRef ) { + + } + + handleClose(event:MouseEvent) { + event.preventDefault(); + this.show=false; + //this.cr.detectChanges(); + } + + handleOpen(event:MouseEvent) + { + event.preventDefault(); + this.show=true; + //this.cr.detectChanges(); + } +} \ No newline at end of file diff --git a/src/app/app.component.html b/src/app/app.component.html index 18154b0..b762168 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,9 +1,3 @@ -