Skip to content

Commit

Permalink
Merge pull request #22 from AllanOXDi/removing-hardcoded-colors
Browse files Browse the repository at this point in the history
replaced hexa and rgb colors with theme palettes and tokens
  • Loading branch information
MisRob authored Feb 27, 2024
2 parents b431c3b + dc46085 commit 9a662e4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<h2>
<label>{{ $tr('allowDownloadOnMeteredConnection') }}</label>
</h2>
<p class="info-description">
<p :class="InfoDescriptionColor">
{{ $tr('DownloadOnMeteredConnectionDescription') }}
</p>
<KRadioButton
Expand All @@ -134,7 +134,7 @@
<h2>
{{ $tr('primaryStorage') }}
</h2>
<p class="info-description">
<p :class="InfoDescriptionColor">
{{ $tr('primaryStorageDescription') }}
</p>
<p>
Expand Down Expand Up @@ -163,7 +163,7 @@
<h2>
{{ $tr('secondaryStorage') }}
</h2>
<p v-show="multipleReadOnlyPaths" class="info-description">
<p v-show="multipleReadOnlyPaths" :class="InfoDescriptionColor">
{{ $tr('secondaryStorageDescription') }}
</p>
<p v-for="path in secondaryStorageLocations" :key="path.index">
Expand Down Expand Up @@ -255,7 +255,7 @@
<h2>
{{ $tr('enabledPages') }}
</h2>
<p class="info-description">
<p :class="InfoDescriptionColor">
{{ deviceString('newEnabledPluginsState') }}
</p>

Expand Down Expand Up @@ -479,6 +479,11 @@
computed: {
...mapGetters(['isAppContext', 'isPageLoading', 'snackbarIsVisible']),
...mapGetters('deviceInfo', ['isRemoteContent']),
InfoDescriptionColor() {
return {
color: this.$themePalette.grey.v_700,
};
},
pageTitle() {
return this.deviceString('deviceManagementTitle');
},
Expand Down Expand Up @@ -1197,10 +1202,6 @@
align-items: center;
}
.info-description {
color: #616161;
}
input[type='range'] {
width: 12vw;
height: 2px;
Expand Down
15 changes: 7 additions & 8 deletions kolibri/plugins/epub_viewer/assets/src/views/SearchSideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
@click="$emit('navigateToSearchResult', item)"
>
<span>{{ item.before }}</span>
<span class="mark">{{ item.match }}</span>
<span :style="markColor">{{ item.match }}</span>
<span>{{ item.after }}</span>
</KButton>
</li>
Expand Down Expand Up @@ -169,6 +169,12 @@
color: this.$themeTokens.annotation,
};
},
markColor() {
return {
color: this.$themePalette.black,
backgroundColor: this.$themePalette.yellow.v_200,
};
},
},
methods: {
/**
Expand Down Expand Up @@ -390,13 +396,6 @@
padding-bottom: 8px;
}
.mark {
color: #000000;
/* Styles same as markjs default styles */
background: #ffff00;
}
.search-results-list-item-button {
@include epub-basic-link;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<span
v-if="isReference || displayPreciseDuration || displayEstimatedDuration || exerciseDescription"
:class="[ appearance === 'chip' ? 'chip' : '']"
:style="[ appearance === 'chip' ? { color: $themeTokens.textInverted } : {}]"
:style="[ appearance === 'chip' ? { color: $themeTokens.textInverted,
backgroundColor: $themePalette.black } : {}]"
>
<template v-if="isReference">
{{ ReferenceLabel }}
Expand Down Expand Up @@ -93,8 +94,8 @@
.chip {
padding: 8px;
font-size: 13px;
background-color: rgba(0, 0, 0, 0.7);
border-radius: 4px;
opacity: 0.7;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@
:text="deviceName"
:maxLines="2"
class="name"
:style="{ color: $themePalette.black }"
/>
<p class="channels">
<p
class="channels"
:style="{ color: channelColor }"
>
{{ $tr('channels', { count: channelCount }) }}
</p>
</div>
Expand Down Expand Up @@ -106,6 +110,9 @@
return 'laptop';
}
},
channelColor() {
return this.$themePalette.grey.v_700;
},
},
$trs: {
channels: {
Expand Down Expand Up @@ -172,15 +179,13 @@
font-size: 19px;
font-weight: 700;
line-height: 140%;
color: black;
}
.channels {
padding: 0;
margin: 5px 0 0;
font-size: 17px;
font-weight: 500;
color: #616161;
}
.view-all {
Expand Down

0 comments on commit 9a662e4

Please sign in to comment.