mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-27 23:50:01 +03:00
feat(theme): add support for header and footer
This commit is contained in:
parent
441def4855
commit
2feff56619
6 changed files with 32 additions and 15 deletions
|
@ -18,7 +18,7 @@
|
||||||
<material-popup opened="{ props.opened }" onClick="{ props.onClose }">
|
<material-popup opened="{ props.opened }" onClick="{ props.onClose }">
|
||||||
<div class="material-popup-title">Add your Server ?</div>
|
<div class="material-popup-title">Add your Server ?</div>
|
||||||
<div class="material-popup-content">
|
<div class="material-popup-content">
|
||||||
<material-input onkeyup="{ onKeyUp }" label="Server URL" text-color="var(--primary-text)" label-color="var(--neutral-text)" valid="{ registryUrlValidator }"></material-input>
|
<material-input onkeyup="{ onKeyUp }" label="Server URL" text-color="var(--primary-text)" label-color="var(--neutral-text)" color="var(--accent-text)" valid="{ registryUrlValidator }"></material-input>
|
||||||
<span>Write your URL without /v2</span>
|
<span>Write your URL without /v2</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="material-popup-action">
|
<div class="material-popup-action">
|
||||||
|
|
|
@ -41,8 +41,8 @@
|
||||||
waves-center="true"
|
waves-center="true"
|
||||||
waves-opacity="0.6"
|
waves-opacity="0.6"
|
||||||
waves-duration="600"
|
waves-duration="600"
|
||||||
color="rgba(0,0,0,0)"
|
color="var(--header-background)"
|
||||||
text-color="#fff"
|
text-color="var(--header-text)"
|
||||||
icon
|
icon
|
||||||
>
|
>
|
||||||
<i class="material-icons">more_vert</i>
|
<i class="material-icons">more_vert</i>
|
||||||
|
|
|
@ -141,7 +141,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
this.state.catalogElementsLimit = props.catalogElementsLimit || 100000;
|
this.state.catalogElementsLimit = props.catalogElementsLimit || 100000;
|
||||||
this.state.pullUrl = this.pullUrl(this.state.registryUrl, props.pullUrl);
|
this.state.pullUrl = this.pullUrl(this.state.registryUrl, props.pullUrl);
|
||||||
this.state.useControlCacheHeader = props.useControlCacheHeader;
|
this.state.useControlCacheHeader = props.useControlCacheHeader;
|
||||||
loadTheme(props, this.root.style);
|
loadTheme(props, this.root.parentNode.style);
|
||||||
},
|
},
|
||||||
onServerChange(registryUrl) {
|
onServerChange(registryUrl) {
|
||||||
this.update({
|
this.update({
|
||||||
|
@ -204,17 +204,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
:host {
|
|
||||||
display: block;
|
|
||||||
background-color: var(--background);
|
|
||||||
color: var(--primary-text);
|
|
||||||
}
|
|
||||||
material-navbar {
|
material-navbar {
|
||||||
height: 64px;
|
height: 64px;
|
||||||
|
color: var(--header-text);
|
||||||
|
background-color: var(--header-background);
|
||||||
}
|
}
|
||||||
|
|
||||||
material-navbar .menu {
|
material-navbar .menu {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
material-footer {
|
||||||
|
color: var(--footer-neutral-text);
|
||||||
|
background-color: var(--footer-background);
|
||||||
|
}
|
||||||
|
material-footer .material-footer-logo {
|
||||||
|
color: var(--footer-text);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</docker-registry-ui>
|
</docker-registry-ui>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<search-bar>
|
<search-bar>
|
||||||
<material-input label="Search in page" text-color="#fff" label-color="#aaa"></material-input>
|
<material-input label="Search in page" text-color="var(--header-text)" label-color="var(--neutral-text)" color="var(--accent-text)"></material-input>
|
||||||
<script>
|
<script>
|
||||||
import { router } from '@riotjs/route';
|
import { router } from '@riotjs/route';
|
||||||
|
|
||||||
|
|
|
@ -3,14 +3,24 @@ const LIGHT_THEME = {
|
||||||
'neutral-text': '#777',
|
'neutral-text': '#777',
|
||||||
'background': '#fff',
|
'background': '#fff',
|
||||||
'hover-background': '#eee',
|
'hover-background': '#eee',
|
||||||
'accent-text': 'rgba(0,0,0,0.26)',
|
'accent-text': '#6680a1',
|
||||||
|
'header-text': '#fff',
|
||||||
|
'header-background': '#25313b',
|
||||||
|
'footer-text': '#fff',
|
||||||
|
'footer-neutral-text': '#999',
|
||||||
|
'footer-background': '#555',
|
||||||
};
|
};
|
||||||
const DARK_THEME = {
|
const DARK_THEME = {
|
||||||
'primary-text': '#8A9EBA',
|
'primary-text': '#8A9EBA',
|
||||||
'neutral-text': '#36527A',
|
'neutral-text': '#36527A',
|
||||||
'background': '#22272e',
|
'background': '#22272e',
|
||||||
'hover-background': '#30404D',
|
'hover-background': '#30404D',
|
||||||
'accent-text': '#5684C4',
|
'accent-text': '#5684FF',
|
||||||
|
'header-text': '#fff',
|
||||||
|
'header-background': '#333A45',
|
||||||
|
'footer-text': '#fff',
|
||||||
|
'footer-neutral-text': '#999',
|
||||||
|
'footer-background': '#555',
|
||||||
};
|
};
|
||||||
|
|
||||||
let THEME;
|
let THEME;
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
html > body {
|
html > body {
|
||||||
font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif !important;
|
font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif !important;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
background-color: var(--background);
|
||||||
|
color: var(--primary-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
html,
|
html,
|
||||||
|
@ -160,7 +162,7 @@ docker-registry-ui material-button > :first-child .content i.material-icons.mate
|
||||||
height: 24px;
|
height: 24px;
|
||||||
width: 24px;
|
width: 24px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
color: var(--neutral-text);
|
color: var(--accent-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.list > span .right i.material-icons.animated {
|
.list > span .right i.material-icons.animated {
|
||||||
|
@ -233,7 +235,7 @@ material-card table th {
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
color: var(--neutral-text);
|
color: var(--accent-text);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0 18px 12px 18px;
|
padding: 0 18px 12px 18px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
@ -280,7 +282,7 @@ material-card table th.material-card-th-sorted-descending:hover {
|
||||||
|
|
||||||
material-card table th.material-card-th-sorted-ascending:hover:before,
|
material-card table th.material-card-th-sorted-ascending:hover:before,
|
||||||
material-card table th.material-card-th-sorted-descending:hover:before {
|
material-card table th.material-card-th-sorted-descending:hover:before {
|
||||||
color: var(--accent-text);
|
color: var(--primary-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
material-card table th.material-card-th-sorted-ascending:before,
|
material-card table th.material-card-th-sorted-ascending:before,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue