Skip to content

Commit

Permalink
Merge pull request #73 from jparkerweb/develop
Browse files Browse the repository at this point in the history
v2.12.0
  • Loading branch information
jparkerweb authored Dec 2, 2024
2 parents 2b79661 + 1abf28e commit 9fd9bc3
Show file tree
Hide file tree
Showing 43 changed files with 1,343 additions and 1,206 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

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

## v2.12.0
#### ✨ Added
- 🔀 Random Image Shuffle functionality.
- Folder Images: You can enable random image selection from a specified folder in settings.
- Frontmatter Support: Use `banner-shuffle` in frontmatter to specify a folder path for random image selection.
- Images are randomly selected each time the note is opened.
- This feature is perfect for adding variety to your notes with minimal setup using local images.

## v2.11.0
#### ✨ Added
- Abity to 📌 Pin URL banners
Expand Down
20 changes: 11 additions & 9 deletions UPDATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
## 🎉 What's New

### v2.11.0
#### ✨ Added
- Ability to 📌 Pin URL banners

_Great for when you find a URL for an image you want to use in Pixel Banner, you can quickly save it by adding the URL and then "Pinning" it._

[![screenshot](https://raw.githubusercontent.com/jparkerweb/pixel-banner/refs/heads/main/img/releases/pixel-banner-v2.11.0.jpg)](https://raw.githubusercontent.com/jparkerweb/pixel-banner/refs/heads/main/img/releases/pixel-banner-v2.11.0.jpg)
## 🎉 What's New

### v2.12.0
#### ✨ Added
- 🔀 Random Image Shuffle functionality.
- Folder Images: You can enable random image selection from a specified folder in settings.
- Frontmatter Support: Use `banner-shuffle` in frontmatter to specify a folder path for random image selection.
- Images are randomly selected each time the note is opened.
- This feature is perfect for adding variety to your notes with minimal setup using local images.

[![screenshot](https://raw.githubusercontent.com/jparkerweb/ref/refs/heads/main/equill-labs/pixel-banner/pixel-banner-v2.12.0.jpg)](https://raw.githubusercontent.com/jparkerweb/ref/refs/heads/main/equill-labs/pixel-banner/pixel-banner-v2.12.0.jpg)
37 changes: 37 additions & 0 deletions build.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { spawn } from 'child_process';
import { promises as fs } from 'fs';
import path from 'path';

async function copyFiles() {
const targetDir = 'example-vault/pixel-banner-example/.obsidian/plugins/pexels-banner';
const files = ['styles.css', 'main.js', 'manifest.json'];

// Ensure target directory exists
await fs.mkdir(targetDir, { recursive: true });

// Copy each file
for (const file of files) {
await fs.copyFile(file, path.join(targetDir, file));
}
}

// First run esbuild
const esbuild = spawn('node', ['esbuild.config.mjs', 'production'], {
stdio: 'inherit',
shell: true
});

esbuild.on('close', async (code) => {
if (code === 0) {
try {
await copyFiles();
console.log('Build completed successfully!');
} catch (err) {
console.error('Error copying files:', err);
process.exit(1);
}
} else {
console.error('esbuild failed');
process.exit(code);
}
});
Binary file modified example-vault.zip
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"pinned": [
"pexels-banner:pin-banner-image",
"pexels-banner:refresh-banner-image"
"pexels-banner:refresh-banner-image",
"editor:toggle-source",
"markdown:toggle-preview"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,21 @@
"customImageRepeatField": [
"banner-repeat"
],
"customBannerHeightField": [
"banner-height"
],
"customFadeField": [
"banner-fade"
],
"customBorderRadiusField": [
"banner-radius"
],
"customTitleColorField": [
"banner-title-color"
],
"customBannerShuffleField": [
"banner-shuffle"
],
"folderImages": [
{
"folder": "notes",
Expand All @@ -37,7 +52,20 @@
"imageRepeat": false,
"directChildrenOnly": true,
"borderRadius": 0,
"titleColor": "#ff0000"
"titleColor": "#ff0000",
"enableImageShuffle": false,
"shuffleFolder": ""
},
{
"folder": "Random Shuffle",
"image": "",
"yPosition": 20,
"contentStartPosition": 200,
"enableImageShuffle": true,
"shuffleFolder": "shuffle-images",
"imageDisplay": "cover",
"imageRepeat": false,
"directChildrenOnly": false
},
{
"folder": "tests",
Expand All @@ -55,17 +83,8 @@
"imageDisplay": "cover",
"imageRepeat": false,
"bannerHeight": 350,
"customBannerHeightField": [
"banner-height"
],
"fade": -75,
"customFadeField": [
"banner-fade"
],
"borderRadius": 17,
"customBorderRadiusField": [
"banner-radius"
],
"showPinIcon": true,
"pinnedImageFolder": "pixel-banner-images",
"showReleaseNotes": true,
Expand All @@ -74,7 +93,5 @@
"hidePixelBannerFields": true,
"hidePropertiesSectionIfOnlyBanner": true,
"titleColor": "#ff0000",
"customTitleColorField": [
"banner-title-color"
]
"enableImageShuffle": false
}
Loading

0 comments on commit 9fd9bc3

Please sign in to comment.