From 08552a955e8d5194ee06b12351037a7abfc63da7 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Mon, 8 Aug 2016 14:36:36 -0700 Subject: [PATCH] feat(Organization): renaming and organization of theme files per discussion closes https://github.com/NativeScript/theme/issues/11 --- app/_demo.scss | 14 +++++++ app/app.scss | 20 ++++++--- app/dark.android.scss | 12 ++++++ app/dark.ios.scss | 12 ++++++ app/light.android.scss | 12 ++++++ app/light.ios.scss | 12 ++++++ app/pages/basics.xml | 4 +- app/pages/themes-vm.ts | 41 ++++++++++++------- app/pages/themes.xml | 8 ++-- app/scss/{_button.scss => _buttons.scss} | 0 app/scss/_core.scss | 20 --------- app/scss/_index.scss | 12 ++++++ app/scss/{_label.scss => _labels.scss} | 0 app/scss/themes/_button.scss | 4 -- app/scss/themes/_nina.scss | 20 --------- app/scss/themes/core/_buttons.scss | 7 ++++ app/scss/themes/core/_dark.scss | 9 ++++ app/scss/themes/core/_light.scss | 9 ++++ .../_variables_dark.scss} | 4 ++ app/scss/themes/core/_variables_light.scss | 28 +++++++++++++ app/theme-nina.scss | 8 ---- hooks/before-prepare/nativescript-dev-sass.js | 9 ++-- 22 files changed, 185 insertions(+), 80 deletions(-) create mode 100644 app/_demo.scss create mode 100644 app/dark.android.scss create mode 100644 app/dark.ios.scss create mode 100644 app/light.android.scss create mode 100644 app/light.ios.scss rename app/scss/{_button.scss => _buttons.scss} (100%) delete mode 100644 app/scss/_core.scss create mode 100644 app/scss/_index.scss rename app/scss/{_label.scss => _labels.scss} (100%) delete mode 100644 app/scss/themes/_button.scss delete mode 100644 app/scss/themes/_nina.scss create mode 100644 app/scss/themes/core/_buttons.scss create mode 100644 app/scss/themes/core/_dark.scss create mode 100644 app/scss/themes/core/_light.scss rename app/scss/themes/{_variables.scss => core/_variables_dark.scss} (89%) create mode 100644 app/scss/themes/core/_variables_light.scss delete mode 100644 app/theme-nina.scss diff --git a/app/_demo.scss b/app/_demo.scss new file mode 100644 index 0000000..5e35f04 --- /dev/null +++ b/app/_demo.scss @@ -0,0 +1,14 @@ +.main-page { + Button { + font-size: 30; + margin:10; + } +} +.themes { + Label { + margin: 5; + } + Button { + margin:5; + } +} \ No newline at end of file diff --git a/app/app.scss b/app/app.scss index 7a83568..554d981 100644 --- a/app/app.scss +++ b/app/app.scss @@ -1,8 +1,16 @@ -@import 'scss/core'; +/*! + * NativeScript Theme v0.1.0 (https://nativescript.org) + * Copyright 2016-2016 The Theme Authors + * Copyright 2016-2016 Telerik + * Licensed under MIT (https://github.com/NativeScript/theme/blob/master/LICENSE) + */ + +/** + * Base style (un-themed) + */ +@import 'scss/variables'; +@import 'scss/index'; -.main-page { +// demo app +@import 'demo'; - Button { - @include button-size(15, 15, 40, $btn-radius); - } -} \ No newline at end of file diff --git a/app/dark.android.scss b/app/dark.android.scss new file mode 100644 index 0000000..a32df08 --- /dev/null +++ b/app/dark.android.scss @@ -0,0 +1,12 @@ +/*! + * NativeScript Theme v0.1.0 (https://nativescript.org) + * Copyright 2016-2016 The Theme Authors + * Copyright 2016-2016 Telerik + * Licensed under MIT (https://github.com/NativeScript/theme/blob/master/LICENSE) + */ + +@import 'scss/themes/core/dark'; +@import 'scss/themes/core/platforms/index.android'; + +// demo app +@import 'demo'; \ No newline at end of file diff --git a/app/dark.ios.scss b/app/dark.ios.scss new file mode 100644 index 0000000..3e6e75c --- /dev/null +++ b/app/dark.ios.scss @@ -0,0 +1,12 @@ +/*! + * NativeScript Theme v0.1.0 (https://nativescript.org) + * Copyright 2016-2016 The Theme Authors + * Copyright 2016-2016 Telerik + * Licensed under MIT (https://github.com/NativeScript/theme/blob/master/LICENSE) + */ + +@import 'scss/themes/core/dark'; +@import 'scss/themes/core/platforms/index.ios'; + +// demo app +@import 'demo'; \ No newline at end of file diff --git a/app/light.android.scss b/app/light.android.scss new file mode 100644 index 0000000..5c57d1b --- /dev/null +++ b/app/light.android.scss @@ -0,0 +1,12 @@ +/*! + * NativeScript Theme v0.1.0 (https://nativescript.org) + * Copyright 2016-2016 The Theme Authors + * Copyright 2016-2016 Telerik + * Licensed under MIT (https://github.com/NativeScript/theme/blob/master/LICENSE) + */ + +@import 'scss/themes/core/light'; +@import 'scss/themes/core/platforms/index.android'; + +// demo app +@import 'demo'; \ No newline at end of file diff --git a/app/light.ios.scss b/app/light.ios.scss new file mode 100644 index 0000000..40f03a2 --- /dev/null +++ b/app/light.ios.scss @@ -0,0 +1,12 @@ +/*! + * NativeScript Theme v0.1.0 (https://nativescript.org) + * Copyright 2016-2016 The Theme Authors + * Copyright 2016-2016 Telerik + * Licensed under MIT (https://github.com/NativeScript/theme/blob/master/LICENSE) + */ + +@import 'scss/themes/core/light'; +@import 'scss/themes/core/platforms/index.ios'; + +// demo app +@import 'demo'; \ No newline at end of file diff --git a/app/pages/basics.xml b/app/pages/basics.xml index fc42d72..971f6fb 100644 --- a/app/pages/basics.xml +++ b/app/pages/basics.xml @@ -8,8 +8,8 @@ -