From d66f4f056a0cd9a5e355aa81b0340895a3d248f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zsef=20Farkas?= Date: Mon, 16 May 2016 16:10:20 +0200 Subject: [PATCH] Move style from main-app.component to different file. --- src/main-app.component.scss | 58 ++++++++++++++++++++++++++++++++++ src/main-app.component.ts | 63 ++----------------------------------- 2 files changed, 60 insertions(+), 61 deletions(-) create mode 100644 src/main-app.component.scss diff --git a/src/main-app.component.scss b/src/main-app.component.scss new file mode 100644 index 00000000..63c93722 --- /dev/null +++ b/src/main-app.component.scss @@ -0,0 +1,58 @@ +:host { + display: flex; + flex-direction: column; + overflow: hidden; +} + +:host > div:first-child { + display: flex; + flex: 1; + align-items: center; + justify-content: center; +} + +button { + margin: 2px; +} + +:host > div:last-child { + display: flex; + flex: 5; + position: relative; +} + +:host > div:last-child > svg-keyboard { + width: 80%; + position: absolute; + left: 50%; + transform: translateX(-50%); + animation-duration: 0.75s; + animation-timing-function: ease-in-out; +} + +@keyframes animate-center-left { + 0% { + transform: translateX(-50%); + left: 50%; + } + 100% { + transform: translateX(-100%); + left: 0%; + } +} + +@keyframes animate-center-right { + 0% { + transform: translateX(-50%); + left: 50%; + } + 100% { + transform: translateX(0%); + left: 100%; + } +} + +[hidden] { + display: none +} + diff --git a/src/main-app.component.ts b/src/main-app.component.ts index 5f7924d0..7fb51424 100644 --- a/src/main-app.component.ts +++ b/src/main-app.component.ts @@ -9,6 +9,7 @@ import {DataProviderService} from './services/data-provider.service'; import {UhkConfigurationService} from './services/uhk-configuration.service'; @Component({ + moduleId: module.id, selector: 'main-app', template: `
@@ -35,67 +36,7 @@ import {UhkConfigurationService} from './services/uhk-configuration.service';
`, - styles: - [` - :host { - display: flex; - flex-direction: column; - overflow: hidden; - } - - :host > div:first-child { - display: flex; - flex: 1; - align-items: center; - justify-content: center; - } - - button { - margin: 2px; - } - - :host > div:last-child { - display: flex; - flex: 5; - position: relative; - } - - :host > div:last-child > svg-keyboard { - width: 80%; - position: absolute; - left: 50%; - transform: translateX(-50%); - animation-duration: 0.75s; - animation-timing-function: ease-in-out; - } - - @keyframes animate-center-left { - 0% { - transform: translateX(-50%); - left: 50%; - } - 100% { - transform: translateX(-100%); - left: 0%; - } - } - - @keyframes animate-center-right { - 0% { - transform: translateX(-50%); - left: 50%; - } - 100% { - transform: translateX(0%); - left: 100%; - } - } - - [hidden] { - display: none - } - - `], + styles: [require('./main-app.component.scss')], directives: [SvgKeyboardComponent], providers: [UhkConfigurationService] })