mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
poprawki scrollBehavior
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@
|
|||||||
// CONTAINER
|
// CONTAINER
|
||||||
.app_container {
|
.app_container {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: auto 1fr auto;
|
grid-template-rows: auto minmax(100vh, 1fr) auto;
|
||||||
grid-template-columns: 100%;
|
grid-template-columns: 100%;
|
||||||
|
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
|||||||
+1
-3
@@ -61,12 +61,10 @@ const routes: Array<RouteRecordRaw> = [
|
|||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
scrollBehavior(to, from, savedPosition) {
|
scrollBehavior(to, from, savedPosition) {
|
||||||
if (to.name == 'SceneryView' && from.name && from.query['view'] === undefined)
|
if (to.name == 'SceneryView' && from.name !== to.name && from.query['view'] === undefined)
|
||||||
return { el: `.app_main` };
|
return { el: `.app_main` };
|
||||||
|
|
||||||
if (savedPosition) return savedPosition;
|
if (savedPosition) return savedPosition;
|
||||||
|
|
||||||
// if (from.name == 'SceneryView' && to.name == 'StationsView') return { el: `.last-selected`, top: 20 };
|
|
||||||
},
|
},
|
||||||
history: createWebHistory(),
|
history: createWebHistory(),
|
||||||
routes
|
routes
|
||||||
|
|||||||
@@ -201,8 +201,6 @@ button.back-btn {
|
|||||||
&-view {
|
&-view {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
min-height: 100vh;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&-offline {
|
&-offline {
|
||||||
@@ -231,6 +229,7 @@ button.back-btn {
|
|||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 1700px;
|
max-width: 1700px;
|
||||||
|
min-height: 100vh;
|
||||||
|
|
||||||
margin: 1rem 0;
|
margin: 1rem 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user