fix(dribbblish): bottom bar and box shadow (#840)

This commit is contained in:
Victor 2022-09-21 06:07:12 -05:00 committed by GitHub
parent 6612793f49
commit eb6b818368
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 11 deletions

View File

@ -93,10 +93,10 @@ waitForElement([
.observe(listElem, {childList: true});
});
waitForElement([".Root__main-view"], ([mainView]) => {
waitForElement([".Root__top-container"], ([topContainer]) => {
const shadow = document.createElement("div");
shadow.id = "dribbblish-back-shadow";
mainView.prepend(shadow);
topContainer.prepend(shadow);
});
waitForElement([".main-rootlist-rootlistPlaylistsScrollNode"], (queries) => {
@ -130,8 +130,6 @@ waitForElement([".Root__main-view .os-resize-observer-host"], ([resizeHost]) =>
function updateVariable([ event ]) {
document.documentElement.style.setProperty(
"--main-view-width", event.contentRect.width + "px");
document.documentElement.style.setProperty(
"--main-view-height", event.contentRect.height + "px");
if (event.contentRect.width < 700) {
document.documentElement.classList.add("minimal-player");
} else {

View File

@ -593,12 +593,10 @@ li.GlueDropTarget {
padding-bottom: 56px;
}
#dribbblish-back-shadow {
position: fixed;
width: var(--main-view-width);
height: calc(var(--main-view-height) + var(--bar-height));
z-index: 2;
grid-area: main-view / main-view / now-playing-bar / main-view;
box-shadow: 0 0 10px 3px #0000003b;
border-radius: var(--main-corner-radius);
z-index: 2;
pointer-events: none;
}
@ -712,14 +710,23 @@ li.GlueDropTarget {
}
/** Grid */
.Root__top-container {
grid-template-areas:
"nav-bar main-view buddy-feed"
"nav-bar now-playing-bar buddy-feed";
padding: var(--main-gap) 0;
}
.spotify__container--is-desktop.buddyfeed-visible .Root__top-container {
grid-template-areas:
"top-bar top-bar top-bar"
"nav-bar main-view buddy-feed"
"nav-bar now-playing-bar buddy-feed";
}
html:not(.buddyfeed-visible) .Root__top-container {
grid-template-areas:
"top-bar top-bar"
"nav-bar main-view"
"nav-bar now-playing-bar";
padding-right: var(--main-gap);
}