Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaced hexa and rgb colors with theme palettes and tokens #22

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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_a200,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like typo, I think it should be yellow.v_200

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

};
},
},
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