use flex to space folder page

This commit is contained in:
geoffrey45
2022-08-02 03:27:39 +03:00
parent 5c3a77ce48
commit bc449631a6
2 changed files with 14 additions and 12 deletions
-1
View File
@@ -25,7 +25,6 @@ defineProps<{
grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
gap: $medium; gap: $medium;
padding: $small; padding: $small;
margin-bottom: 1rem;
background-color: $gray5; background-color: $gray5;
} }
</style> </style>
+14 -11
View File
@@ -3,11 +3,15 @@
<div id="scrollable" ref="scrollable"> <div id="scrollable" ref="scrollable">
<div class="banner shadow-lg"> <div class="banner shadow-lg">
<div class="text abs rounded pad-medium"> <div class="text abs rounded pad-medium">
<h1><FolderSvg /> {{ getFolderName($route) }}</h1> <h3><FolderSvg /> {{ getFolderName($route) }}</h3>
</div> </div>
<img src="../assets/images/one.jpg" alt="" class="rounded" /> <img
src="../assets/images/one.jpg"
alt="folder page banner"
class="rounded"
/>
</div> </div>
<FolderList :folders="FStore.dirs" /> <FolderList :folders="FStore.dirs" v-if="FStore.dirs.length" />
<SongList :tracks="FStore.tracks" :path="FStore.path" /> <SongList :tracks="FStore.tracks" :path="FStore.path" />
</div> </div>
</div> </div>
@@ -62,23 +66,22 @@ onBeforeRouteUpdate((to, from) => {
} }
#scrollable { #scrollable {
overflow-y: auto;
scrollbar-color: grey transparent; scrollbar-color: grey transparent;
display: flex;
flex-direction: column;
gap: 1rem;
.banner { .banner {
margin-bottom: $small;
position: relative; position: relative;
height: max-content;
svg { height: $banner-height;
transform: scale(1.5);
}
.text { .text {
bottom: 1rem; bottom: 1rem;
left: 1rem; left: 1rem;
background-color: $black; background-color: $black;
h1 { h3 {
margin: $small; margin: $small;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -88,7 +91,7 @@ onBeforeRouteUpdate((to, from) => {
} }
img { img {
height: $banner-height; height: 100%;
width: 100%; width: 100%;
object-fit: cover; object-fit: cover;
} }