Skip to content

Commit

Permalink
Merge pull request #89 from jparkerweb/develop
Browse files Browse the repository at this point in the history
v2.16.1
  • Loading branch information
jparkerweb authored Dec 23, 2024
2 parents 0bbd6c9 + 36ac036 commit 716b400
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 33 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the Pixel Banner plugin will be documented in this file.

## v2.16.1
### 🐛 Fixed
- Fixed an issue with "Banner Shuffle" not working when defined via frontmatter

## v2.16.0
### ✨ Added
- New setting to hide embedded note banners
Expand Down
4 changes: 4 additions & 0 deletions UPDATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## 🎉 What's New

### v2.16.1
#### 🐛 Fixed
- Fixed an issue with "Banner Shuffle" not working when defined via frontmatter

### v2.16.0
#### ✨ Added
- New setting to hide embedded note banners
Expand Down
Binary file modified example-vault.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"showPinIcon": true,
"pinnedImageFolder": "pixel-banner-images",
"showReleaseNotes": true,
"lastVersion": "2.15.2",
"lastVersion": "2.16.0",
"showRefreshIcon": true,
"showViewImageIcon": true,
"hidePixelBannerFields": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,7 @@ var SaveImageModal = class extends import_obsidian2.Modal {
};

// virtual-module:virtual:release-notes
var releaseNotes = '<h2>\u{1F389} What&#39;s New</h2>\n<h3>v2.16.0</h3>\n<h4>\u2728 Added</h4>\n<ul>\n<li>New setting to hide embedded note banners</li>\n</ul>\n<h4>\u{1F41B} Fixed</h4>\n<ul>\n<li>Fixed an issue with embedded note banner&#39;s &quot;content start&quot; position not being obeyed</li>\n</ul>\n<p><a href="https://raw.githubusercontent.com/jparkerweb/ref/refs/heads/main/equill-labs/pixel-banner/pixel-banner-v2.16.0.jpg"><img src="https://raw.githubusercontent.com/jparkerweb/ref/refs/heads/main/equill-labs/pixel-banner/pixel-banner-v2.16.0.jpg" alt="screenshot"></a></p>\n';
var releaseNotes = '<h2>\u{1F389} What&#39;s New</h2>\n<h3>v2.16.1</h3>\n<h4>\u{1F41B} Fixed</h4>\n<ul>\n<li>Fixed an issue with &quot;Banner Shuffle&quot; not working when defined via frontmatter</li>\n</ul>\n<h3>v2.16.0</h3>\n<h4>\u2728 Added</h4>\n<ul>\n<li>New setting to hide embedded note banners</li>\n</ul>\n<h4>\u{1F41B} Fixed</h4>\n<ul>\n<li>Fixed an issue with embedded note banner&#39;s &quot;content start&quot; position not being obeyed</li>\n</ul>\n<p><a href="https://raw.githubusercontent.com/jparkerweb/ref/refs/heads/main/equill-labs/pixel-banner/pixel-banner-v2.16.0.jpg"><img src="https://raw.githubusercontent.com/jparkerweb/ref/refs/heads/main/equill-labs/pixel-banner/pixel-banner-v2.16.0.jpg" alt="screenshot"></a></p>\n';

// src/main.js
function getFrontmatterValue(frontmatter, fieldNames) {
Expand Down Expand Up @@ -1817,7 +1817,7 @@ module.exports = class PixelBannerPlugin extends import_obsidian3.Plugin {
if (shufflePath) {
const randomImagePath = await this.getRandomImageFromFolder(shufflePath);
if (randomImagePath) {
bannerImage = `"${randomImagePath}"`;
bannerImage = randomImagePath;
}
}
if (!bannerImage) {
Expand Down Expand Up @@ -2648,7 +2648,6 @@ module.exports = class PixelBannerPlugin extends import_obsidian3.Plugin {
this.lastKeywords.set(file.path, bannerImage);
}
}
console.log("imageUrl", imageUrl);
if (imageUrl) {
const frontmatterYPosition = getFrontmatterValue(frontmatter, this.settings.customYPositionField);
const folderSpecific = this.getFolderSpecificImage(file.path);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "pexels-banner",
"name": "Pixel Banner",
"version": "2.16.0",
"version": "2.16.1",
"minAppVersion": "1.6.0",
"description": "Apply an image from various sources as a banner to your notes.",
"author": "Justin Parker (eQui\\\\ Labs)",
Expand Down
54 changes: 30 additions & 24 deletions example-vault/pixel-banner-example/.obsidian/workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,8 @@
"icon": "lucide-file",
"title": "🚩 Pixel-Banner"
}
},
{
"id": "6871cf718a9bab19",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "releases/v2.16.0 - 😱 Hide the Children, PART II.md",
"mode": "preview",
"source": true
},
"icon": "lucide-file",
"title": "v2.16.0 - 😱 Hide the Children, PART II"
}
}
],
"currentTab": 1
]
}
],
"direction": "vertical"
Expand Down Expand Up @@ -1929,6 +1914,26 @@
{
"id": "fcd1ca21209eca81",
"type": "leaf",
"state": {
"type": "empty",
"state": {},
"icon": "lucide-file",
"title": "New tab"
}
},
{
"id": "203f5f941482bd3a",
"type": "leaf",
"state": {
"type": "empty",
"state": {},
"icon": "lucide-file",
"title": "New tab"
}
},
{
"id": "4ed42ec13caf6e10",
"type": "leaf",
"state": {
"type": "Saved Queries View",
"state": {},
Expand All @@ -1937,7 +1942,7 @@
}
}
],
"currentTab": 180
"currentTab": 182
}
],
"direction": "horizontal",
Expand All @@ -1955,21 +1960,25 @@
"command-palette:Open command palette": false
}
},
"active": "6871cf718a9bab19",
"active": "342e5185840138ef",
"lastOpenFiles": [
"tests/🧪 test - 7- shuffle time!.md",
"Random Shuffle/Disney Lorcana.md",
"releases/v2.10.0 - 🖌️ Title Color.md",
"releases/v2.11.0 - 📌 Pin my URL Please.md",
"releases/v2.12.0 - 🔀 Random Image Shuffle.md",
"releases/v2.13.0 - 🖼️ View my Banner.md",
"releases/v2.14.0 - 👩‍👧‍👦 Hide the Children.md",
"releases/v2.15.0 - 🏷️ Streamlined Banner Bliss.md",
"releases/v2.16.0 - 😱 Hide the Children, PART II.md",
"pixel-banner-images/monster-looking-at-children.png",
"🚩 Pixel-Banner.md",
"pixel-banner-images/monster-looking-at-children.png",
"emtest.md",
"em222.md",
"em10.md",
"tests/🧪 test - 8 - embed tests.md",
"tests/🧪 test - 6 - image float right.md",
"notes/subfolder/Embedded Note in Subfolder.md",
"tests/🧪 test - 7- shuffle time!.md",
"Random Shuffle/Disney Lorcana.md",
"tests/🧪 test - 1 - internal link.md",
"tests/🧪 test - 2 - internal link - quoted.md",
"tests/🧪 test - 3 - direct url link.md",
Expand All @@ -1982,17 +1991,14 @@
"notes/📜 Embedded Note with Banner.md",
"notes/📃 Embedded Note.md",
"pixel-banner-images/garden[1].jpg",
"Untitled 1.md",
"shuffle-images/bell-hidden-archer.jpg",
"test blank note.png",
"test blank note.md",
"figs.jpg",
"pixel-banner-images/shuffle.png",
"pixel-banner-images/pin-clouds.png",
"pixel-banner-images/paint-drips.png",
"pixel-banner-images/good-art-is-never-forgotten.png",
"pixel-banner-images/justin.png",
"releases/v2.10.0 - 🖌️ Title Color.md",
"Random Shuffle",
"shuffle-images",
"releases",
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "pexels-banner",
"name": "Pixel Banner",
"version": "2.16.0",
"version": "2.16.1",
"minAppVersion": "1.6.0",
"description": "Apply an image from various sources as a banner to your notes.",
"author": "Justin Parker (eQui\\\\ Labs)",
Expand Down
4 changes: 1 addition & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ module.exports = class PixelBannerPlugin extends Plugin {
// If shuffle path exists in frontmatter, use it
const randomImagePath = await this.getRandomImageFromFolder(shufflePath);
if (randomImagePath) {
bannerImage = `"${randomImagePath}"`;
bannerImage = randomImagePath;
}
}

Expand Down Expand Up @@ -1454,8 +1454,6 @@ module.exports = class PixelBannerPlugin extends Plugin {
}
}

console.log('imageUrl', imageUrl);

if (imageUrl) {
const frontmatterYPosition = getFrontmatterValue(frontmatter, this.settings.customYPositionField);
const folderSpecific = this.getFolderSpecificImage(file.path);
Expand Down

0 comments on commit 716b400

Please sign in to comment.