From f3c040fb1a1ff40c595cc342f5f3bb610bff58ac Mon Sep 17 00:00:00 2001 From: "francesco.guerrieri" Date: Mon, 27 Apr 2020 14:29:58 +0200 Subject: [PATCH 1/7] first commit paddle. create component --- Thermo.Active/wwwroot/assets/styles/base/paddle.less | 0 .../wwwroot/src/app_modules_thermo/components/paddle/burger.ts | 0 .../wwwroot/src/app_modules_thermo/components/paddle/burger.vue | 0 .../wwwroot/src/app_modules_thermo/components/paddle/sidebar.ts | 0 .../wwwroot/src/app_modules_thermo/components/paddle/sidebar.vue | 0 5 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 Thermo.Active/wwwroot/assets/styles/base/paddle.less create mode 100644 Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/burger.ts create mode 100644 Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/burger.vue create mode 100644 Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.ts create mode 100644 Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.vue diff --git a/Thermo.Active/wwwroot/assets/styles/base/paddle.less b/Thermo.Active/wwwroot/assets/styles/base/paddle.less new file mode 100644 index 00000000..e69de29b diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/burger.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/burger.ts new file mode 100644 index 00000000..e69de29b diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/burger.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/burger.vue new file mode 100644 index 00000000..e69de29b diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.ts new file mode 100644 index 00000000..e69de29b diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.vue new file mode 100644 index 00000000..e69de29b From 6dfee4a431c410cc89b0c727c3e4dc6c8e81b2cf Mon Sep 17 00:00:00 2001 From: "francesco.guerrieri" Date: Mon, 27 Apr 2020 14:30:15 +0200 Subject: [PATCH 2/7] first commit paddle. create component --- .../wwwroot/assets/styles/base/paddle.less | 123 ++++++++++++++++++ Thermo.Active/wwwroot/src/App.ts | 4 + Thermo.Active/wwwroot/src/App.vue | 12 ++ .../components/paddle/burger.ts | 13 ++ .../components/paddle/burger.vue | 12 ++ .../components/paddle/sidebar.ts | 12 ++ .../components/paddle/sidebar.vue | 12 ++ 7 files changed, 188 insertions(+) diff --git a/Thermo.Active/wwwroot/assets/styles/base/paddle.less b/Thermo.Active/wwwroot/assets/styles/base/paddle.less index e69de29b..6af64d47 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/paddle.less +++ b/Thermo.Active/wwwroot/assets/styles/base/paddle.less @@ -0,0 +1,123 @@ +// out: false, sourceMap: false, main: ../style.less +@import "grid-system.less"; +@import "colors.less"; +@import "fonts.less"; + + + .hidden { + visibility: hidden; + } + + button { + cursor: pointer; + } + + /* remove blue outline */ + button:focus { + outline: 0; + } + + .burger-button { + position: relative; + height: 30px; + width: 32px; + display: block; + z-index: 999; + border: 0; + border-radius: 0; + background-color: transparent; + pointer-events: all; + transition: transform .6s cubic-bezier(.165,.84,.44,1); + } + + .burger-bar { + background-color: #130f40; + position: absolute; + top: 50%; + right: 6px; + left: 6px; + height: 2px; + width: auto; + margin-top: -1px; + transition: transform .6s cubic-bezier(.165,.84,.44,1),opacity .3s cubic-bezier(.165,.84,.44,1),background-color .6s cubic-bezier(.165,.84,.44,1); + } + + .burger-bar--1 { + -webkit-transform: translateY(-6px); + transform: translateY(-6px); + } + + .burger-bar--2 { + transform-origin: 100% 50%; + transform: scaleX(.8); + } + + .burger-button:hover .burger-bar--2 { + transform: scaleX(1); + } + + .no-touchevents .burger-bar--2:hover { + transform: scaleX(1); + } + + .burger-bar--3 { + transform: translateY(6px); + } + + #burger.active .burger-button { + transform: rotate(-180deg); + } + + #burger.active .burger-bar { + background-color: #fff; + } + + #burger.active .burger-bar--1 { + transform: rotate(45deg) + } + + #burger.active .burger-bar--2 { + opacity: 0; + } + + #burger.active .burger-bar--3 { + transform: rotate(-45deg) + } + + + + + + .slide-enter-active, + .slide-leave-active + { + transition: transform 0.2s ease; + } + + .slide-enter, + .slide-leave-to { + transform: translateX(-100%); + transition: all 150ms ease-in 0s + } + + .sidebar-backdrop { + background-color: rgba(0,0,0,.5); + width: 100vw; + height: 100vh; + position: fixed; + top: 0; + left: 0; + cursor: pointer; + } + + .sidebar-panel { + overflow-y: auto; + background-color: #130f40; + position: fixed; + left: 0; + top: 0; + height: 100vh; + z-index: 999; + padding: 3rem 20px 2rem 20px; + width: 300px; + } diff --git a/Thermo.Active/wwwroot/src/App.ts b/Thermo.Active/wwwroot/src/App.ts index a07e2fcd..5c6f93b3 100644 --- a/Thermo.Active/wwwroot/src/App.ts +++ b/Thermo.Active/wwwroot/src/App.ts @@ -10,6 +10,8 @@ import { ModalContainer, ModalNcContainer } from "./modules/base-components"; import { ModalHelper } from "@/components/modals" import { store, appModelActions, machineStatusActions } from "@/store"; import { underTheHood } from "@/app_modules/under-the-hood"; +import Burger from "@/app_modules_thermo/components/paddle/burger.vue"; +import Sidebar from "@/app_modules_thermo/components/paddle/sidebar.vue"; import * as iziToast from "izitoast"; @@ -30,6 +32,8 @@ declare var cmsClient; appFooter: Footer, modalContainer: ModalContainer, modalNcContainer: ModalNcContainer, + burger: Burger, + sidebar: Sidebar, alarmList, underTheHood, } diff --git a/Thermo.Active/wwwroot/src/App.vue b/Thermo.Active/wwwroot/src/App.vue index c8bf1de2..e12a01dd 100644 --- a/Thermo.Active/wwwroot/src/App.vue +++ b/Thermo.Active/wwwroot/src/App.vue @@ -12,6 +12,18 @@
+ + + + + +
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/burger.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/burger.ts index e69de29b..f3d832c6 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/burger.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/burger.ts @@ -0,0 +1,13 @@ +import Vue from "vue"; +import Component from "vue-class-component"; + +@Component({name: 'burger'}) +export default class Burger extends Vue{ + + isBurgerActive: boolean = false; + + toggle() { + debugger + this.isBurgerActive = !this.isBurgerActive; + } +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/burger.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/burger.vue index e69de29b..f1630633 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/burger.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/burger.vue @@ -0,0 +1,12 @@ + +