Skip to content

Commit

Permalink
Merge pull request #137 from jparkerweb/develop
Browse files Browse the repository at this point in the history
v2.21.0
  • Loading branch information
jparkerweb authored Jan 22, 2025
2 parents ab6abbe + bea4878 commit 3278b7d
Show file tree
Hide file tree
Showing 25 changed files with 3,658 additions and 1,572 deletions.
1 change: 1 addition & 0 deletions .vault/pixel-banner-example/.obsidian/command-palette.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"pinned": [
"pexels-banner:set-banner-icon",
"pexels-banner:set-banner-position",
"pexels-banner:pin-banner-image",
"pexels-banner:refresh-banner-image",
"editor:toggle-source",
Expand Down
20 changes: 17 additions & 3 deletions .vault/pixel-banner-example/.obsidian/plugins/css-editor/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9955,6 +9955,13 @@ var CssEditorView = class extends import_obsidian2.ItemView {
import_view5.EditorView.updateListener.of((update) => {
if (update.docChanged) {
this.requestSave(update.state.doc.toString());
if (this.file) {
this.app.workspace.trigger(
"css-editor-change",
this.file,
update.state.doc.toString()
);
}
}
})
]
Expand All @@ -9977,6 +9984,14 @@ var CssEditorView = class extends import_obsidian2.ItemView {
clearInterval(timer);
}, 200);
this.registerInterval(timer);
this.registerEvent(
this.app.workspace.on("css-editor-change", async (file, data) => {
var _a;
if (((_a = this.file) == null ? void 0 : _a.name) === file.name && this.getEditorData() !== data) {
this.dispatchEditorData(data);
}
})
);
}
getEditorData() {
return this.editor.state.doc.toString();
Expand All @@ -9987,7 +10002,8 @@ var CssEditorView = class extends import_obsidian2.ItemView {
from: 0,
to: this.editor.state.doc.length,
insert: data
}
},
selection: this.editor.state.selection
});
}
getState() {
Expand Down Expand Up @@ -10471,5 +10487,3 @@ var CssEditorPlugin = class extends import_obsidian7.Plugin {
});
}
};

/* nosourcemap */
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
{
"id": "css-editor",
"name": "CSS Editor",
"version": "1.2.2",
"minAppVersion": "0.15.0",
"description": "Edit CSS files within Obsidian.",
"author": "Zachatoo",
"authorUrl": "https://zachyoung.dev",
"fundingUrl": "https://github.com/sponsors/Zachatoo",
"isDesktopOnly": false
}
{"id":"css-editor","name":"CSS Editor","version":"1.2.3","minAppVersion":"0.15.0","description":"Edit CSS files within Obsidian.","author":"Zachatoo","authorUrl":"https://zachyoung.dev","fundingUrl":"https://github.com/sponsors/Zachatoo","isDesktopOnly":false}
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,17 @@
"imageRepeat": false,
"bannerHeight": 350,
"fade": -75,
"bannerFadeInAnimationDuration": 300,
"bannerFadeInAnimationDuration": 0,
"borderRadius": 17,
"showPinIcon": true,
"pinnedImageFolder": "pixel-banner-images",
"showReleaseNotes": true,
"lastVersion": "2.20.3",
"lastVersion": "2.21.0",
"showRefreshIcon": true,
"showViewImageIcon": true,
"hidePixelBannerFields": false,
"hidePropertiesSectionIfOnlyBanner": false,
"showSetTargetXYPosition": true,
"hidePixelBannerFields": true,
"hidePropertiesSectionIfOnlyBanner": true,
"titleColor": "var(--inline-title-color)",
"enableImageShuffle": false,
"hideEmbeddedNoteTitles": true,
Expand Down
1,711 changes: 1,032 additions & 679 deletions .vault/pixel-banner-example/.obsidian/plugins/pexels-banner/main.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "pexels-banner",
"name": "Pixel Banner",
"version": "2.20.4",
"version": "2.21.0",
"minAppVersion": "1.6.0",
"description": "Apply an image from various sources as a banner to your notes.",
"author": "Justin Parker (eQui\\\\ Labs)",
Expand Down
251 changes: 217 additions & 34 deletions .vault/pixel-banner-example/.obsidian/plugins/pexels-banner/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,6 @@
display: none !important;
}

/* pin / refresh / view image icons */
.pin-icon,
.refresh-icon,
.view-image-icon {
z-index: var(--layer-modal);
opacity: 0.2;
transition: all 0.3s ease-in-out;
}
.pin-icon:hover,
.refresh-icon:hover,
.view-image-icon:hover {
opacity: 1;
cursor: pointer;
transform: scale(1.2);
}

/* ----------------------------------------------------- */
/* -- content start (push frontmatter container down) -- */
Expand Down Expand Up @@ -600,36 +585,31 @@
to { opacity: 0.2; }
}


.select-image-icon,
.set-banner-icon-button,
.view-image-icon,
.target-btn,
.pin-icon,
.refresh-icon {
animation: pixel-banner--icon-fade-in 0.3s ease-in-out;
width: unset !important;
}

.select-image-icon {
z-index: var(--layer-modal);
opacity: 0.2;
transition: all 0.3s ease-in-out;
}
.select-image-icon:hover {
opacity: 1;
cursor: pointer;
transform: scale(1.2);
}
.set-banner-icon-button {
.refresh-icon,
.view-image-icon {
z-index: var(--layer-modal);
opacity: 0.2;
transition: all 0.3s ease-in-out;
animation: pixel-banner--icon-fade-in 0.3s ease-in-out;
width: unset !important;
}
.set-banner-icon-button:hover {
.select-image-icon:hover,
.set-banner-icon-button:hover,
.target-btn:hover,
.pin-icon:hover,
.refresh-icon:hover,
.view-image-icon:hover {
opacity: 1;
cursor: pointer;
transform: scale(1.2);
}


/* mobile layout */
@media screen and (max-width: 775px) {
.pixel-banner-search-container {
Expand Down Expand Up @@ -681,4 +661,207 @@
margin-top: var(--pixel-banner-icon-vertical-offset, 0);
width: unset !important;
max-width: unset !important;
}
}


/* --------------------------- */
/* -- Target Position Modal -- */
/* --------------------------- */
.target-position-modal {
display: flex;
flex-direction: column;
justify-content: space-between;
}

.target-position-modal .target-container {
display: flex;
flex-direction: column;
gap: 10px;
flex-grow: 1;
min-width: 300px;
}

.target-position-modal .target-area {
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
border-radius: 4px;
}

.target-position-modal .position-indicator {
padding: 4px;
border-radius: 4px;
background-color: var(--background-secondary);
}

.target-position-modal .crosshair-line {
position: absolute;
background-color: var(--text-accent);
pointer-events: none;
}

.target-position-modal .vertical {
width: 1px;
height: 100%;
}

.target-position-modal .horizontal {
width: 100%;
height: 1px;
}

.target-position-modal .control-panel {
background-color: var(--background-secondary);
padding: 15px;
border-radius: 8px;
}

.target-position-modal .display-mode-select {
width: 100%;
padding: 6px;
border-radius: 4px;
border: 1px solid var(--background-modifier-border);
background-color: var(--background-primary);
color: var(--text-normal);
}

.target-position-modal .zoom-container {
position: relative;
}

.target-position-modal .zoom-slider {
width: 15px;
background-color: var(--background-primary);
border-radius: 5px;
cursor: pointer;
margin: 10px auto;
appearance: none;
}

.target-position-modal .zoom-slider::-webkit-slider-runnable-track {
width: 100%;
height: 200px;
background: var(--background-modifier-border);
border-radius: 5px;
border: none;
}

.target-position-modal .zoom-slider::-moz-range-track {
width: 100%;
height: 200px;
background: var(--background-modifier-border);
border-radius: 5px;
border: none;
}

.target-position-modal .zoom-slider::-webkit-slider-thumb {
-webkit-appearance: none;
width: 20px;
height: 20px;
border-radius: 50%;
background: var(--text-accent);
cursor: pointer;
border: none;
margin-top: 90px;
position: relative;
left: -2px;
}

.target-position-modal .zoom-slider::-moz-range-thumb {
width: 20px;
height: 20px;
border-radius: 50%;
background: var(--text-accent);
cursor: pointer;
border: none;
}

.target-position-modal .zoom-value {
color: var(--text-muted);
text-align: center;
}

.target-position-modal .height-slider {
width: 15px;
background-color: var(--background-primary);
border-radius: 5px;
cursor: pointer;
margin: 10px auto;
appearance: none;
}

.target-position-modal .height-slider::-webkit-slider-runnable-track {
width: 100%;
height: 200px;
background: var(--background-modifier-border);
border-radius: 5px;
border: none;
}

.target-position-modal .height-slider::-moz-range-track {
width: 100%;
height: 200px;
background: var(--background-modifier-border);
border-radius: 5px;
border: none;
}

.target-position-modal .height-slider::-webkit-slider-thumb {
-webkit-appearance: none;
width: 20px;
height: 20px;
border-radius: 50%;
background: var(--text-accent);
cursor: pointer;
border: none;
margin-top: 90px;
position: relative;
left: -2px;
}

.target-position-modal .height-slider::-moz-range-thumb {
width: 20px;
height: 20px;
border-radius: 50%;
background: var(--text-accent);
cursor: pointer;
border: none;
}

.target-position-modal .height-value {
color: var(--text-muted);
text-align: center;
}

.target-position-modal .height-container {
display: flex;
flex-direction: column;
gap: 5px;
align-items: center;
background-color: var(--background-secondary);
padding: 15px;
border-radius: 4px;
}

.target-position-modal .height-label {
color: var(--text-muted);
font-size: 0.9em;
}

.target-position-modal .height-value {
font-family: var(--font-monospace);
font-size: 0.9em;
color: var(--text-muted);
}

.target-position-modal .reset-button {
margin-top: 20px;
padding: 8px;
width: 100%;
font-size: 14px;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.2s ease;
}

.target-position-modal .reset-button:hover {
background-color: var(--interactive-accent-hover);
}
3 changes: 2 additions & 1 deletion .vault/pixel-banner-example/.obsidian/types.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"cssclasses": "multitext",
"tags": "tags",
"pexels-banner-y-position": "number",
"banner": "text"
"banner": "text",
"banner-height": "number"
}
}
Loading

0 comments on commit 3278b7d

Please sign in to comment.