diff --git a/src/components/header/CHeaderBrand.vue b/src/components/header/CHeaderBrand.vue new file mode 100644 index 00000000..a5c5c628 --- /dev/null +++ b/src/components/header/CHeaderBrand.vue @@ -0,0 +1,37 @@ + + + + + + + + diff --git a/src/components/header/CHeaderNavItem.vue b/src/components/header/CHeaderNavItem.vue index 0a3a8ae0..866c1235 100644 --- a/src/components/header/CHeaderNavItem.vue +++ b/src/components/header/CHeaderNavItem.vue @@ -1,5 +1,5 @@ - + + + + diff --git a/src/components/header/CSubheader.vue b/src/components/header/CSubheader.vue new file mode 100644 index 00000000..d537e3cb --- /dev/null +++ b/src/components/header/CSubheader.vue @@ -0,0 +1,17 @@ + + + + + + + \ No newline at end of file diff --git a/src/components/header/index.js b/src/components/header/index.js index 832fba0f..688bf546 100644 --- a/src/components/header/index.js +++ b/src/components/header/index.js @@ -1,9 +1,15 @@ import CHeader from './CHeader' +import CHeaderBrand from './CHeaderBrand' import CHeaderNav from './CHeaderNav' import CHeaderNavItem from './CHeaderNavItem' +// import CHeaderNavLink from './CHeaderNavLink' +import CSubheader from './CSubheader' export { CHeader, + CHeaderBrand, CHeaderNav, - CHeaderNavItem + CHeaderNavItem, + // CHeaderNavLink, + CSubheader } diff --git a/src/components/index.d.ts b/src/components/index.d.ts index aea2d785..1f77959f 100644 --- a/src/components/index.d.ts +++ b/src/components/index.d.ts @@ -297,9 +297,21 @@ export declare class CHeader extends Vue { withSubheader: boolean } +export declare class CHeaderBrand extends Vue { + wrappedInLink: [object, string] +} + export declare class CHeaderNav extends Vue {} -export declare class CHeaderNavItem extends CLink {} +export declare class CHeaderNavItem extends CLink { + onlyLink: boolean +} + +export declare class CHeaderNavLink extends CLink { } + +export declare class CSubheader extends CLink { + tag: string +} export declare class CImg extends Vue { src: string @@ -467,6 +479,14 @@ export declare class CSidebar extends Vue { overlaid: boolean } +export declare class CSidebarBrand extends Vue { + img: [object, string] + imgMinimized: [object, string] + imgFull: [object, string] + wrappedInLink: [object, string] +} + + export declare class CSidebarClose extends Vue { } export declare class CSidebarFooter extends Vue {} diff --git a/src/components/sidebar/CSidebarBrand.vue b/src/components/sidebar/CSidebarBrand.vue index d3797df9..5e44d422 100644 --- a/src/components/sidebar/CSidebarBrand.vue +++ b/src/components/sidebar/CSidebarBrand.vue @@ -1,36 +1,24 @@ - + @@ -45,10 +33,26 @@ export default { CLink }, props: { - src: String, - fullSrc: String, - minimizedSrc: String, - wrappedInLink: Object + img: [String, Object], + imgFull: [String, Object], + imgMinimized: [String, Object], + wrappedInLink: [String, Object] + }, + computed: { + linkProps () { + return this.getObject(this.wrappedInLink, 'href') + }, + minimizedAttributes () { + return this.getObject(this.imgMinimized || this.img, 'src') + }, + fullAttributes () { + return this.getObject(this.imgFull || this.img, 'src') + } + }, + methods: { + getObject (prop, key) { + return typeof prop === 'object' ? prop : { [`${key}`]: prop } + } } }