Skip to content

Commit

Permalink
fix(): Refactoring, banner Y position
Browse files Browse the repository at this point in the history
  • Loading branch information
sawhney17 authored Jul 14, 2022
2 parents beb93fd + e1e0552 commit 38bc189
Show file tree
Hide file tree
Showing 3 changed files with 214 additions and 248 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "logseq-banners-plugin",
"version": "1.8.0",
"version": "1.9.0",
"main": "dist/index.html",
"scripts": {
"dev": "vite",
Expand Down
61 changes: 61 additions & 0 deletions src/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
body:is([data-page="page"], [data-page="home"]).is-banner-active #main-content-container {
flex-wrap: wrap;
align-content: flex-start;
}

body:is([data-page="page"], [data-page="home"]) .content {
position: relative;
}

body:is([data-page="page"], [data-page="home"]).is-banner-active #main-content-container::before {
display: block;
content: "";
width: 100%;
height: var(--bannerHeight);
margin: 0 auto;
background-image: var(--pageBanner);
background-repeat: no-repeat;
background-size: cover;
background-position-x: 50%;
background-position-y: var(--bannerAlign);
}

body:is([data-page="page"], [data-page="home"]).is-banner-active.is-icon-active .journal-item:first-of-type>.page>.flex-col>.content>.flex-1::before,
body:is([data-page="page"], [data-page="home"]).is-banner-active.is-icon-active .page>.relative>.flex-row>.flex-1::before {
content: var(--pageIcon);
font-size: var(--iconWidth);
font-weight: normal;
position: absolute;
left: -7px;
z-index: 2;
transform: translateY(-55%);
line-height: initial;
}

body:is([data-page="page"], [data-page="home"]).is-banner-active.is-icon-active :is(.ls-page-title, .page-title, .journal-title) {
margin-top: 35px;
}

body:is([data-page="page"], [data-page="home"]).is-banner-active.is-icon-active #journals .journal-item:first-child {
margin-top: 0;
}

/* small icons for other home journal items */
body:is([data-page="page"], [data-page="home"]).is-banner-active.is-icon-active #journals .journal-item h1.title::before {
content: var(--pageIcon);
margin-right: 8px;
font-size: 0.9em;
font-weight: normal;
}

body:is([data-page="page"], [data-page="home"]).is-banner-active.is-icon-active #journals .journal-item:first-of-type h1.title::before {
display: none;
}

.cp__right-sidebar-inner .resizer {
z-index: 9;
}

.page-title .page-icon {
display: none;
}
Loading

0 comments on commit 38bc189

Please sign in to comment.