From d9cd3c28aaaffd97f082fbf747e4938a75b62821 Mon Sep 17 00:00:00 2001 From: tibing Date: Tue, 18 Apr 2017 20:29:57 +0300 Subject: [PATCH] feat(@theme): add base footer --- .../_base-footer.component.theme.scss | 9 +++++++++ .../base-footer/base-footer.component.scss | 14 ++++++++++++++ .../base-footer/base-footer.component.ts | 17 +++++++++++++++++ .../base-header/base-header.component.scss | 1 - .../layouts/one-coll-layout/one-coll.layout.ts | 1 + src/app/@theme/styles/_components.scss | 9 +++++++++ .../@theme/styles/pure/_pure.components.scss | 7 ------- src/app/@theme/styles/pure/_pure.redefines.scss | 5 +++++ src/app/@theme/styles/pure/pure.theme.scss | 2 +- src/app/@theme/theme.module.ts | 7 +++++-- src/app/pages/pages.component.ts | 8 +------- src/app/pages/pages.module.ts | 6 +++++- 12 files changed, 67 insertions(+), 19 deletions(-) create mode 100644 src/app/@theme/layouts/base-footer/_base-footer.component.theme.scss create mode 100644 src/app/@theme/layouts/base-footer/base-footer.component.scss create mode 100644 src/app/@theme/layouts/base-footer/base-footer.component.ts create mode 100644 src/app/@theme/styles/_components.scss delete mode 100644 src/app/@theme/styles/pure/_pure.components.scss diff --git a/src/app/@theme/layouts/base-footer/_base-footer.component.theme.scss b/src/app/@theme/layouts/base-footer/_base-footer.component.theme.scss new file mode 100644 index 00000000..70c3f679 --- /dev/null +++ b/src/app/@theme/layouts/base-footer/_base-footer.component.theme.scss @@ -0,0 +1,9 @@ +@mixin base-footer-theme() { + /deep/ base-footer { + color: $nga-color-default; + + .socials a:hover { + color: $nga-color-secondary !important; + } + } +} \ No newline at end of file diff --git a/src/app/@theme/layouts/base-footer/base-footer.component.scss b/src/app/@theme/layouts/base-footer/base-footer.component.scss new file mode 100644 index 00000000..d5180b32 --- /dev/null +++ b/src/app/@theme/layouts/base-footer/base-footer.component.scss @@ -0,0 +1,14 @@ +:host { + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + + .socials { + font-size: 2rem; + + a { + padding: .4rem; + } + } +} \ No newline at end of file diff --git a/src/app/@theme/layouts/base-footer/base-footer.component.ts b/src/app/@theme/layouts/base-footer/base-footer.component.ts new file mode 100644 index 00000000..f9f51112 --- /dev/null +++ b/src/app/@theme/layouts/base-footer/base-footer.component.ts @@ -0,0 +1,17 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'base-footer', + styleUrls: ['./base-footer.component.scss'], + template: ` + Created with ♥ by Akveo 2017 +
+ + + + +
+ ` +}) +export class BaseFooterComponent { +} diff --git a/src/app/@theme/layouts/base-header/base-header.component.scss b/src/app/@theme/layouts/base-header/base-header.component.scss index 36fe4bb6..decef5a2 100644 --- a/src/app/@theme/layouts/base-header/base-header.component.scss +++ b/src/app/@theme/layouts/base-header/base-header.component.scss @@ -58,7 +58,6 @@ padding-right: 0; } } - } } diff --git a/src/app/@theme/layouts/one-coll-layout/one-coll.layout.ts b/src/app/@theme/layouts/one-coll-layout/one-coll.layout.ts index e25109e6..15a3b059 100644 --- a/src/app/@theme/layouts/one-coll-layout/one-coll.layout.ts +++ b/src/app/@theme/layouts/one-coll-layout/one-coll.layout.ts @@ -19,6 +19,7 @@ import { Component } from '@angular/core'; + `, diff --git a/src/app/@theme/styles/_components.scss b/src/app/@theme/styles/_components.scss new file mode 100644 index 00000000..a765e176 --- /dev/null +++ b/src/app/@theme/styles/_components.scss @@ -0,0 +1,9 @@ +@import '../layouts/base-header/base-header.component.theme'; +@import '../search-input/search-input.component.theme'; +@import '../layouts/base-footer/base-footer.component.theme'; + +@mixin custom-components-theme() { + @include base-header-theme(); + @include base-footer-theme(); + @include search-input-theme(); +} \ No newline at end of file diff --git a/src/app/@theme/styles/pure/_pure.components.scss b/src/app/@theme/styles/pure/_pure.components.scss deleted file mode 100644 index 97c35cab..00000000 --- a/src/app/@theme/styles/pure/_pure.components.scss +++ /dev/null @@ -1,7 +0,0 @@ -@import '../../layouts/base-header/base-header.component.theme'; -@import '../../search-input/search-input.component.theme'; - -@mixin custom-components-theme() { - @include base-header-theme(); - @include search-input-theme(); -} \ No newline at end of file diff --git a/src/app/@theme/styles/pure/_pure.redefines.scss b/src/app/@theme/styles/pure/_pure.redefines.scss index 99319cfa..bb834af6 100644 --- a/src/app/@theme/styles/pure/_pure.redefines.scss +++ b/src/app/@theme/styles/pure/_pure.redefines.scss @@ -30,6 +30,10 @@ $nga-sidebar-width-compact: 3.45rem; color: $nga-color-default; } + a:hover { + color: $nga-color-secondary; + } + nga-layout { nga-layout-header > nav { box-shadow: 0 4px 12px 0 rgba(33, 57, 161, 0.08); @@ -66,6 +70,7 @@ $nga-sidebar-width-compact: 3.45rem; nga-layout-footer > nav { box-shadow: 0 4px 12px 0 rgba(33, 57, 161, 0.08); border: none !important; + padding: 1.25rem; } } } diff --git a/src/app/@theme/styles/pure/pure.theme.scss b/src/app/@theme/styles/pure/pure.theme.scss index 2d4f0c70..27d33a7a 100644 --- a/src/app/@theme/styles/pure/pure.theme.scss +++ b/src/app/@theme/styles/pure/pure.theme.scss @@ -1,5 +1,5 @@ @import '~@nga/theme/styles/themes/nga.theme.default'; -@import 'pure.components'; +@import '../components'; @import 'pure.redefines'; @include nga-theme(); diff --git a/src/app/@theme/theme.module.ts b/src/app/@theme/theme.module.ts index a2adf3a2..83a5b7d0 100644 --- a/src/app/@theme/theme.module.ts +++ b/src/app/@theme/theme.module.ts @@ -14,6 +14,7 @@ import { import { SearchInputComponent } from './search-input/search-input.component'; import { OneCollLayoutComponent, BaseHeaderComponent } from './layouts'; +import { BaseFooterComponent } from './layouts/base-footer/base-footer.component'; const BASE_MODULES = [ CommonModule, @@ -32,7 +33,8 @@ const NGA_MODULES = [ const LAYOUTS = [ OneCollLayoutComponent, - BaseHeaderComponent + BaseHeaderComponent, + BaseFooterComponent ]; @NgModule({ @@ -49,7 +51,8 @@ const LAYOUTS = [ ], declarations: [ ...LAYOUTS, - SearchInputComponent + SearchInputComponent, + BaseFooterComponent ] }) export class ThemeModule { diff --git a/src/app/pages/pages.component.ts b/src/app/pages/pages.component.ts index 5c329805..f136d65d 100644 --- a/src/app/pages/pages.component.ts +++ b/src/app/pages/pages.component.ts @@ -1,19 +1,13 @@ import { Component } from '@angular/core'; -import { List } from 'immutable'; - -import { menuItems } from './pages-menu'; -import { NgaMenuItem } from '@nga/theme/components/menu/menu.options'; - @Component({ selector: 'pages', template: ` - + ` }) export class PagesComponent { - menuItems: List = menuItems; } diff --git a/src/app/pages/pages.module.ts b/src/app/pages/pages.module.ts index b733f806..4fd1908e 100644 --- a/src/app/pages/pages.module.ts +++ b/src/app/pages/pages.module.ts @@ -5,6 +5,8 @@ import { NgaMenuModule } from '@nga/theme'; +import { menuItems } from './pages-menu'; + import { PagesComponent } from './pages.component'; import { DashboardComponent } from './dashboard/dashboard.component'; import { PagesRoutingModule } from './pages-routing.module'; @@ -16,7 +18,9 @@ import { ComponentsComponent } from './components/components.component'; @NgModule({ imports: [ NgaSidebarModule.forRoot(), - NgaMenuModule.forRoot(), + NgaMenuModule.forRoot({ + items: menuItems + }), PagesRoutingModule, ThemeModule ],