File tree 7 files changed +46
-13
lines changed
7 files changed +46
-13
lines changed Original file line number Diff line number Diff line change 11
11
12
12
#: This may not be the exact version as it's subject to modification with
13
13
#: get_version() - use ``kolibri.__version__`` for the exact version string.
14
- VERSION = (0 , 17 , 4 )
14
+ VERSION = (0 , 17 , 5 )
15
15
16
16
__author__ = "Learning Equality"
17
17
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import Vue from 'vue';
2
2
3
3
const themeConfig = Vue . observable ( {
4
4
appBar : {
5
+ background : null ,
6
+ textColor : null ,
5
7
topLogo : {
6
8
src : null ,
7
9
alt : null ,
Original file line number Diff line number Diff line change 1
1
import logger from 'kolibri.lib.logging' ;
2
+ import { themeTokens } from 'kolibri-design-system/lib/styles/theme' ;
2
3
import isObject from 'lodash/isObject' ;
3
4
4
5
const logging = logger . getLogger ( __filename ) ;
@@ -42,6 +43,25 @@ const _imageSpec = {
42
43
} ;
43
44
44
45
export default {
46
+ appBar : {
47
+ type : Object ,
48
+ default : null ,
49
+ spec : {
50
+ background : {
51
+ type : String ,
52
+ default : themeTokens ( ) . appBar ,
53
+ } ,
54
+ textColor : {
55
+ type : String ,
56
+ default : themeTokens ( ) . text ,
57
+ } ,
58
+ topLogo : {
59
+ type : Object ,
60
+ default : null ,
61
+ spec : _imageSpec ,
62
+ } ,
63
+ } ,
64
+ } ,
45
65
brandColors : {
46
66
type : Object ,
47
67
default : null ,
Original file line number Diff line number Diff line change 2
2
3
3
<div
4
4
v-show =" !$isPrint"
5
- :style =" { backgroundColor: $themeTokens.appBar }"
5
+ :style =" {
6
+ backgroundColor: themeConfig.appBar.background,
7
+ color: themeConfig.appBar.textColor,
8
+ }"
6
9
>
7
10
<header >
8
11
<SkipNavigationLink />
9
12
10
13
<UiToolbar
11
14
:removeNavIcon =" showAppNavView"
12
15
type =" clear"
13
- textColor =" black "
16
+ : textColor =" themeConfig.appBar.textColor "
14
17
class =" app-bar"
15
- :style =" { height: topBarHeight + 'px' }"
18
+ :style =" {
19
+ height: topBarHeight + 'px',
20
+ color: themeConfig.appBar.textColor,
21
+ }"
16
22
:raised =" false"
17
23
:removeBrandDivider =" true"
18
24
>
26
32
>
27
33
<KIconButton
28
34
icon =" menu"
29
- :color =" $themeTokens.text "
35
+ :color =" themeConfig.appBar.textColor "
30
36
:ariaLabel =" $tr('openNav')"
31
37
@click =" $emit('toggleSideNav')"
32
38
/>
94
100
<KIcon
95
101
icon =" person"
96
102
:style =" {
97
- fill: $themeTokens.text ,
103
+ fill: themeConfig.appBar.textColor ,
98
104
height: '24px',
99
105
width: '24px',
100
106
margin: '4px',
Original file line number Diff line number Diff line change 29
29
30
30
import { validateLinkObject } from ' kolibri.utils.validators' ;
31
31
import useKResponsiveWindow from ' kolibri-design-system/lib/composables/useKResponsiveWindow' ;
32
+ import themeConfig from ' kolibri.themeConfig' ;
32
33
33
34
/**
34
35
Links for use inside the Navbar
38
39
setup () {
39
40
const { windowIsSmall } = useKResponsiveWindow ();
40
41
return {
42
+ themeConfig,
41
43
windowIsSmall,
42
44
};
43
45
},
61
63
computed: {
62
64
tabStyles () {
63
65
return {
64
- color: this .$themeTokens . text ,
66
+ color: this .themeConfig . appBar . textColor ,
65
67
' :hover' : {
66
68
' background-color' : this .$themeBrand .secondary .v_600 ,
67
69
},
81
83
activeClasses () {
82
84
// return both fixed and dynamic classes
83
85
return ` router-link-active ${ this .$computedClass ({
84
- color: this .$themeTokens . text ,
86
+ color: this .themeConfig . appBar . textColor ,
85
87
})} ` ;
86
88
},
87
89
},
Original file line number Diff line number Diff line change 16
16
>
17
17
<KIcon
18
18
:icon =" link.icon"
19
- :color =" $themeTokens.text "
19
+ :color =" themeConfig.appBar.textColor "
20
20
/>
21
21
</NavbarLink >
22
22
</ul >
27
27
:ariaLabel =" coreString('moreOptions')"
28
28
icon =" optionsHorizontal"
29
29
appearance =" flat-button"
30
- :color =" $themeTokens.text "
30
+ :color =" themeConfig.appBar.textColor "
31
31
:primary =" false"
32
32
class =" kiconbutton-style"
33
33
>
51
51
import isUndefined from ' lodash/isUndefined' ;
52
52
import commonCoreStrings from ' kolibri.coreVue.mixins.commonCoreStrings' ;
53
53
import useKResponsiveWindow from ' kolibri-design-system/lib/composables/useKResponsiveWindow' ;
54
+ import themeConfig from ' kolibri.themeConfig' ;
54
55
import NavbarLink from ' ./NavbarLink' ;
55
56
/**
56
57
* Used for navigation between sub-pages of a top-level Kolibri section
67
68
windowIsLarge,
68
69
windowIsMedium,
69
70
windowWidth,
71
+ themeConfig,
70
72
};
71
73
},
72
74
props: {
Original file line number Diff line number Diff line change 196
196
height: topBarHeight + 'px',
197
197
width: `${width}`,
198
198
paddingTop: windowIsSmall ? '4px' : '8px',
199
- backgroundColor: $themeTokens.appBar,
199
+ backgroundColor: themeConfig.appBar.background,
200
+ color: themeConfig.appBar.textColor,
200
201
}"
201
202
>
202
203
<KIconButton
203
204
ref =" closeButton"
204
205
tabindex =" 0"
205
206
icon =" close"
206
- :color =" $themeTokens.text "
207
+ :color =" themeConfig.appBar.textColor "
207
208
class =" side-nav-header-icon"
208
209
:ariaLabel =" $tr('closeNav')"
209
210
size =" large"
210
211
@click =" toggleNav"
211
212
/>
212
213
<span
213
214
class =" side-nav-header-name"
214
- :style =" { color: $themeTokens.text }"
215
+ :style =" { color: themeConfig.appBar.textColor }"
215
216
>{{ sideNavTitleText }}</span >
216
217
</div >
217
218
</FocusTrap >
You can’t perform that action at this time.
0 commit comments