Skip to content

Commit da90496

Browse files
authored
Merge pull request #248 from jparkerweb/develop
v3.5.4
2 parents 4eafcc1 + 9800dea commit da90496

File tree

6 files changed

+21
-8
lines changed

6 files changed

+21
-8
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
All notable changes to the Pixel Banner plugin will be documented in this file.
44

55
## 🎉 What's New
6+
### v3.5.4 - 2025-05-27
7+
#### 🐛 Fixed
8+
- Resolve issue with not evaluating all defined custom field names for "banner" frontmatter
9+
- Revert aggresive css change impacting the background color of some theme variations and plugins
10+
611
### v3.5.3 - 2025-05-23
712
#### ✨ Added
813
- New `Icon Image Size Multiplier` control:

UPDATE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
</a>
44

55
## 🎉 What's New
6+
### v3.5.4 - 2025-05-27
7+
#### 🐛 Fixed
8+
- Resolve issue with not evaluating all defined custom field names for "banner" frontmatter
9+
- Revert aggresive css change impacting the background color of some theme variations and plugins
10+
611
### v3.5.3 - 2025-05-23
712
#### ✨ Added
813
- New `Icon Image Size Multiplier` control:

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "pexels-banner",
33
"name": "Pixel Banner",
4-
"version": "3.5.3",
4+
"version": "3.5.4",
55
"minAppVersion": "1.6.0",
66
"description": "Enhance your notes with customizable banner images, including AI-generated designs and a curated store of downloadable banners. Transform your workspace with visually stunning headers that add context, improve aesthetics, and take your note-taking beyond the ordinary.",
77
"author": "Justin Parker (eQui\\\\ Labs)",

src/core/bannerUtils.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,12 @@ function getActiveApiProvider() {
222222

223223
function hasBannerFrontmatter(file) {
224224
const metadata = this.app.metadataCache.getFileCache(file);
225-
return metadata?.frontmatter?.banner !== undefined;
225+
if (!metadata?.frontmatter) return false;
226+
227+
// Check all possible banner field names from settings
228+
return this.settings.customBannerField.some(fieldName =>
229+
metadata.frontmatter[fieldName] !== undefined
230+
);
226231
}
227232

228233

src/modal/modals/selectPixelBannerModal.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ export class SelectPixelBannerModal extends Modal {
127127
const activeFile = this.app.workspace.getActiveFile();
128128
const hasBanner = activeFile ? (
129129
this.plugin.hasBannerFrontmatter(activeFile) ||
130-
this.plugin.app.metadataCache.getFileCache(activeFile)?.frontmatter?.[this.plugin.settings.customBannerShuffleField[0]]
130+
(this.plugin.app.metadataCache.getFileCache(activeFile)?.frontmatter &&
131+
this.plugin.settings.customBannerShuffleField.some(field =>
132+
this.plugin.app.metadataCache.getFileCache(activeFile)?.frontmatter?.[field]
133+
))
131134
) : false;
132135

133136
// Create main container

styles.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@
6565
/* add transition to banner image background position */
6666
transition: background-position 0.5s ease;
6767
}
68-
/* fix background color preventing banner from showing in reading mode for some themes */
69-
.markdown-reading-view,
70-
[class^=markdown-preview] {
71-
background-color: transparent !important;
72-
}
7368

7469
.markdown-embed-content .markdown-preview-view {
7570
min-height: var(--pixel-banner-embed-min-height, unset) !important;

0 commit comments

Comments
 (0)