mirror of
https://github.com/logos-storage/ethcc-demo.git
synced 2026-02-01 20:03:08 +00:00
make header and footer sticky and main content scrollable
This commit is contained in:
parent
d11edbc8f1
commit
d869176a9c
74
src/App.vue
74
src/App.vue
@ -171,16 +171,18 @@ onUnmounted(() => {
|
||||
>
|
||||
info alert - Slot
|
||||
</button>
|
||||
<div class="flex flex-col h-full min-w-96 bg-white dark:bg-gray-900">
|
||||
<header class="w-full text-center border-b p-4 flex-none">
|
||||
<div
|
||||
class="absolute top-0 bottom-0 left-0 right-0 flex flex-col h-full min-w-96 bg-white dark:bg-gray-900"
|
||||
>
|
||||
<header class="sticky top-0 z-10 w-full text-center border-b p-4 flex-none">
|
||||
<AppNav />
|
||||
</header>
|
||||
<main class="flex-1 mx-auto max-w-screen-xl w-full p-4">
|
||||
<main class="grow flex flex-col mx-auto max-w-screen-xl w-full p-4">
|
||||
<ContractEventAlerts v-model="alerts"></ContractEventAlerts>
|
||||
<NavBreadcrumb class="mb-4"></NavBreadcrumb>
|
||||
<RouterView />
|
||||
</main>
|
||||
<footer class="w-full text-center border-t p-4 mt-4 flex-none">
|
||||
<footer class="w-full sticky bottom-0 text-center border-t p-4 mt-4 flex-none">
|
||||
<Balance />
|
||||
<BlockNumber />
|
||||
</footer>
|
||||
@ -203,67 +205,3 @@ footer {
|
||||
@apply border-gray-200 dark:border-gray-600 dark:text-white;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- <style scoped>
|
||||
header {
|
||||
line-height: 1.5;
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
||||
.logo {
|
||||
display: block;
|
||||
margin: 0 auto 2rem;
|
||||
}
|
||||
|
||||
nav {
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
nav a.router-link-exact-active {
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
nav a.router-link-exact-active:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
nav a {
|
||||
display: inline-block;
|
||||
padding: 0 1rem;
|
||||
border-left: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
nav a:first-of-type {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
header {
|
||||
display: flex;
|
||||
place-items: center;
|
||||
padding-right: calc(var(--section-gap) / 2);
|
||||
}
|
||||
|
||||
.logo {
|
||||
margin: 0 2rem 0 0;
|
||||
}
|
||||
|
||||
header .wrapper {
|
||||
display: flex;
|
||||
place-items: flex-start;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
nav {
|
||||
text-align: left;
|
||||
margin-left: -1rem;
|
||||
font-size: 1rem;
|
||||
|
||||
padding: 1rem 0;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
}
|
||||
</style> -->
|
||||
|
||||
@ -130,9 +130,7 @@ onMounted(() => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="max-h-128 flex-1 overflow-x-auto overflow-y-auto shadow-md sm:rounded-lg border-t border-gray-50"
|
||||
>
|
||||
<div class="shadow-md sm:rounded-lg border-t border-gray-50">
|
||||
<table
|
||||
class="w-full relative text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400"
|
||||
>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user