Skip to content

Commit 8e9bb99

Browse files
committed
feat: change layout styles to version 3
1 parent 353fc68 commit 8e9bb99

26 files changed

+110
-255
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"clear_jest": "jest --clearCache"
5656
},
5757
"dependencies": {
58-
"@coreui/coreui": "coreui/coreui#component-prefixes",
58+
"@coreui/coreui": "next",
5959
"core-js": "^2.5.7",
6060
"element-resize-detector": "^1.2.0",
6161
"popper.js": "^1.14.7",

src/components/Aside/CAside.vue

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/components/Aside/CAsideToggler.vue

Lines changed: 0 additions & 57 deletions
This file was deleted.

src/components/Aside/index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import Aside from './Aside'
22
import AsideToggler from './AsideToggler'
3-
import CAside from './CAside'
4-
import CAsideToggler from './CAsideToggler'
53

64
export {
75
Aside,
8-
AsideToggler,
9-
CAside,
10-
CAsideToggler
6+
AsideToggler
117
}

src/components/Breadcrumb/CBreadcrumb.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ export default {
3030
const itemProps = isLast ? lastItemProps : linkItemProps
3131
return h('li',
3232
{
33-
staticClass: 'breadcrumb-item',
33+
staticClass: 'c-breadcrumb-item',
3434
class: { active: isLast },
3535
attrs: { role: 'presentation' }
3636
},
3737
[h(tag, itemProps)])
3838
})
39-
return h('ol', mergeData(data, { staticClass: 'breadcrumb' }), childNodes)
39+
return h('ol', mergeData(data, { staticClass: 'c-breadcrumb' }), childNodes)
4040
}
4141
}
4242
</script>

src/components/Footer/CFooter.vue

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,19 @@
88
export default {
99
name: 'CFooter',
1010
props: {
11-
fixed: {
12-
type: Boolean,
13-
default: false
14-
}
15-
},
16-
mounted: function () {
17-
this.isFixed()
11+
fixed: Boolean
1812
},
1913
computed: {
2014
classList () {
2115
return [
22-
'app-footer'
16+
'c-app-footer c-footer',
17+
{ 'c-footer-fixed': this.fixed }
2318
]
2419
}
25-
},
26-
methods: {
27-
isFixed () {
28-
this.fixed ? document.body.classList.add('footer-fixed') : document.body.classList.remove('footer-fixed')
29-
}
3020
}
3121
}
3222
</script>
23+
24+
<style scoped lang="scss">
25+
@import "~@coreui/coreui/scss/partials/footer.scss";
26+
</style>

src/components/Header/CHeader.vue

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
2-
<header
3-
:class="classList">
2+
<header :class="classList">
43
<slot>Header</slot>
54
</header>
65
</template>
@@ -9,27 +8,19 @@
98
export default {
109
name: 'CHeader',
1110
props: {
12-
fixed: {
13-
type: Boolean,
14-
default: false
15-
}
11+
fixed: Boolean
1612
},
1713
computed: {
1814
classList () {
1915
return [
20-
'app-header',
21-
'navbar'
16+
'c-header c-app-header c-header-light',
17+
{ 'c-header-fixed': this.fixed}
2218
]
2319
}
24-
},
25-
mounted: function () {
26-
this.isFixed(this.fixed)
27-
},
28-
methods: {
29-
isFixed (fixed) {
30-
fixed ? document.body.classList.add('header-fixed') : document.body.classList.remove('header-fixed')
31-
return fixed
32-
}
3320
}
3421
}
3522
</script>
23+
24+
<style scoped lang="scss">
25+
@import "~@coreui/coreui/scss/partials/header.scss";
26+
</style>

src/components/Nav/CNav.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ export default {
1818
computed: {
1919
navClasses () {
2020
return {
21-
'nav' : true,
22-
'nav-tabs': this.tabs && !this.pills,
23-
'nav-pills': this.pills,
24-
'flex-column': this.vertical,
25-
'nav-fill': this.fill,
26-
'nav-justified': this.justified
21+
'c-nav' : true,
22+
'c-nav-tabs': this.tabs && !this.pills,
23+
'c-nav-pills': this.pills,
24+
'c-flex-column': this.vertical,
25+
'c-nav-fill': this.fill,
26+
'c-nav-justified': this.justified
2727
}
2828
}
2929
},

src/components/Nav/CNavItem.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
2-
<li class="nav-item">
2+
<li class="c-nav-item">
33
<CLink
4-
class="nav-link"
4+
class="c-nav-link"
55
v-bind="$props"
66
:active="isActive"
77
>

src/components/Navbar/CNavbarNav.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ export default {
1515
return h(
1616
props.tag,
1717
mergeData(data, {
18-
staticClass: 'navbar-nav',
18+
staticClass: 'c-navbar-nav',
1919
class: {
20-
'nav-fill': props.fill,
21-
'nav-justified': props.justified
20+
'c-nav-fill': props.fill,
21+
'c-nav-justified': props.justified
2222
}
2323
}),
2424
children

0 commit comments

Comments
 (0)