Skip to content

Commit d11fd42

Browse files
committed
feat(riot-mui): upgrade home page with navbar and footer
1 parent 017f662 commit d11fd42

File tree

4 files changed

+44
-32
lines changed

4 files changed

+44
-32
lines changed

src/components/dialogs/dialogs-menu.riot

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,22 @@
3636
on-server-change="{ props.onServerChange }"
3737
></remove-registry-url>
3838
<div class="container">
39-
<material-button onClick="{ onClick }" waves-center="true" rounded="true" waves-opacity="0.6" waves-duration="600">
39+
<material-button
40+
onClick="{ onClick }"
41+
waves-center="true"
42+
waves-opacity="0.6"
43+
waves-duration="600"
44+
color="rgba(0,0,0,0)"
45+
text-color="#fff"
46+
icon
47+
>
4048
<i class="material-icons">more_vert</i>
4149
</material-button>
4250
<material-dropdown-list
4351
items="{ dropdownItems.filter(item => item.ro || !props.readOnlyRegistries) }"
4452
onSelect="{ onDropdownSelect }"
4553
opened="{ state.isDropdownOpened }"
46-
/>
54+
></material-dropdown-list>
4755
</div>
4856
<div class="overlay" onclick="{ onClick }" if="{ state.isDropdownOpened }"></div>
4957
<script>
@@ -114,14 +122,12 @@
114122
z-index: 10;
115123
}
116124
117-
:host material-button {
118-
background: rgba(255, 255, 255, 0);
125+
:host material-button button {
119126
float: right;
120127
z-index: 2;
121128
}
122129
123130
:host material-button .content i.material-icons {
124-
color: #fff;
125131
font-size: 24px;
126132
}
127133

src/components/docker-registry-ui.riot

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
<docker-registry-ui>
1818
<header>
1919
<material-navbar>
20-
<div class="logo">Docker Registry UI</div>
21-
<search-bar on-search="{ onSearch }"></search-bar>
22-
<dialogs-menu
23-
if="{props.singleRegistry !== 'true'}"
24-
on-notify="{ notifySnackbar }"
25-
on-server-change="{ onServerChange }"
26-
default-registries="{ props.defaultRegistries }"
27-
read-only-registries="{ truthy(props.readOnlyRegistries) }"
28-
></dialogs-menu>
20+
<span class="logo">Docker Registry UI</span>
21+
<div class="menu">
22+
<search-bar on-search="{ onSearch }"></search-bar>
23+
<dialogs-menu
24+
if="{props.singleRegistry !== 'true'}"
25+
on-notify="{ notifySnackbar }"
26+
on-server-change="{ onServerChange }"
27+
default-registries="{ props.defaultRegistries }"
28+
read-only-registries="{ truthy(props.readOnlyRegistries) }"
29+
></dialogs-menu>
30+
</div>
2931
</material-navbar>
3032
</header>
3133
<main>
@@ -81,9 +83,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
8183
<material-snackbar message="{ state.snackbarMessage }" is-error="{ state.snackbarIsError }"></material-snackbar>
8284
</main>
8385
<footer>
84-
<material-footer>
85-
<a slot="logo" href="https://joxit.github.io/docker-registry-ui/">Docker Registry UI { version }</a>
86-
<ul slot="link-list">
86+
<material-footer mini="true">
87+
<a class="material-footer-logo" href="https://joxit.github.io/docker-registry-ui/">Docker Registry UI { version }</a>
88+
<ul>
8789
<li>
8890
<a href="https://github.com/Joxit/docker-registry-ui">Contribute on GitHub</a>
8991
</li>
@@ -197,4 +199,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
197199
stringToArray,
198200
};
199201
</script>
202+
<style>
203+
material-navbar {
204+
height: 64px;
205+
}
206+
207+
material-navbar .nav-wrapper {
208+
align-items: center;
209+
}
210+
211+
</style>
200212
</docker-registry-ui>

src/components/search-bar.riot

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<search-bar>
2-
<material-input placeholder="Search in page"></material-input>
2+
<material-input label="Search in page" text-color="#fff" label-color="#aaa"></material-input>
33
<script>
44
import { router } from '@riotjs/route';
55
@@ -39,10 +39,9 @@
3939
</script>
4040
<style>
4141
:host material-input {
42-
position: absolute;
43-
top: 0em;
44-
right: 64px;
42+
line-height: initial;
4543
max-width: 20%;
44+
min-width: 13em;
4645
}
4746
4847
@media screen and (max-width: 400px) {

src/style.scss

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
html > body {
3434
font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif !important;
35+
font-size: 16px;
3536
}
3637

3738
html, body {
@@ -117,14 +118,6 @@ material-spinner {
117118
flex-direction: column;
118119
}
119120

120-
material-navbar {
121-
height: 64px;
122-
}
123-
124-
material-navbar nav-wrapper {
125-
display: flex;
126-
}
127-
128121
.logo {
129122
padding: 0 16px 0 72px;
130123
text-decoration: none;
@@ -260,13 +253,15 @@ material-card table th {
260253
text-align: left;
261254
}
262255

263-
material-card material-button:hover,
256+
material-card .material-card-title-action material-button:hover a,
257+
material-card .material-card-title-action material-button:hover button,
264258
material-card table tbody tr:hover,
265259
pagination material-button:hover {
266-
background-color: #eee;
260+
background-color: #eee !important;
267261
}
268262

269-
material-card material-button,
263+
material-card material-button a,
264+
material-card material-button button,
270265
material-card table tbody tr,
271266
pagination material-button {
272267
transition-duration: .28s;

0 commit comments

Comments
 (0)