Skip to content

Commit

Permalink
update example vault
Browse files Browse the repository at this point in the history
  • Loading branch information
jparkerweb committed Nov 24, 2024
1 parent bb408d3 commit 14c936d
Show file tree
Hide file tree
Showing 12 changed files with 667 additions and 86 deletions.
Binary file modified example-vault.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"apiProvider": "pexels",
"pexelsApiKey": "",
"pixabayApiKey": "",
"flickrApiKey": "",
"unsplashApiKey": "",
"imageSize": "medium",
"imageOrientation": "landscape",
"numberOfImages": 10,
Expand Down Expand Up @@ -41,6 +43,12 @@
"showPinIcon": true,
"pinnedImageFolder": "pixel-banner-images",
"showReleaseNotes": true,
"lastVersion": "2.6.4",
"showRefreshIcon": true
"lastVersion": "2.10.1",
"showRefreshIcon": true,
"hidePixelBannerFields": false,
"hidePropertiesSectionIfOnlyBanner": false,
"titleColor": "var(--inline-title-color)",
"customTitleColorField": [
"banner-inline-title-color"
]
}
602 changes: 548 additions & 54 deletions example-vault/rich-foot-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.6.4",
"version": "2.10.1",
"minAppVersion": "1.6.0",
"description": "Apply an image from various sources as a banner to your notes.",
"author": "Justin Parker",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/* ------------------------------------------------------------------ */
/* -- configure default: move banner image to top, fade/size, etc. -- */
/* ------------------------------------------------------------------ */
@keyframes pixel-banner-image--fade-in {
from { opacity: 0; }
to { opacity: 1; }
}

/* ------------------------------------------------------------------ */
/* -- configure default: move banner image to top, fade/size, etc. -- */
/* ------------------------------------------------------------------ */
.pixel-banner-image {
position: absolute;
top: 0;
Expand All @@ -23,28 +22,42 @@
will-change: opacity;
transform: translateZ(0);
background-repeat: no-repeat;
z-index: 0;
z-index: -1;
}

/* Apply title color to both reading and editing mode */
.pixel-banner div.inline-title,
.markdown-source-view div.inline-title {
color: var(--pixel-banner-title-color, var(--inline-title-color));
}

/* fix for banner image overlapping with note content */
.pixel-banner-image ~ div {
z-index: 1;
/* isolate the banner image from the note content */
.view-content.pixel-banner {
position: relative;
isolation: isolate;
}

.cm-sizer .metadata-container,
.markdown-preview-sizer .metadata-container {
z-index: 1;
}
.cm-sizer,
.markdown-preview-sizer {
display: flex;
flex-direction: column;
}

/* fix overflow issue with embedded notes */
.internal-embed:not(.image-embed),
.internal-embed:not(.image-embed) > .markdown-embed-content > .markdown-preview-view {
overflow: hidden;
}

/* hide frontmatter fields in reading mode */
.markdown-preview-view .pixel-banner-hidden-field {
display: none !important;
}
/* Add specific targeting for properties view */
.metadata-property.pixel-banner-hidden-field {
display: none !important;
}

/* pin / refresh icons */
.pin-icon,
.refresh-icon {
Expand Down Expand Up @@ -86,7 +99,6 @@
overflow: hidden;
padding: 20px;
max-width: 800px;
margin: 50px auto 0 auto;
}

.pixel-banner-header {
Expand All @@ -107,7 +119,7 @@
flex: 1;
display: flex;
flex-direction: column;
gap: 30px;
gap: 10px;
overflow: hidden;
}

Expand Down Expand Up @@ -261,10 +273,11 @@

.pixel-banner-settings-tabs {
display: flex;
flex-wrap: wrap;
}

.pixel-banner-settings-tab {
margin-right: 10px;
margin: 0 10px 10px 0;
padding: 10px 20px;
border: none;
background: none;
Expand Down Expand Up @@ -352,6 +365,16 @@
background-color: var(--background-secondary);
}

.release-notes-container img {
max-width: 100%;
}

.release-notes-instructions {
font-size: 0.75em;
font-weight: 300;
letter-spacing: 2px;
}

.release-notes-section {
margin: 10px 0;
}
Expand Down Expand Up @@ -381,3 +404,8 @@
.release-notes-spacer {
margin: 10px 0;
}

/* Add to your existing CSS */
.metadata-container.pixel-banner-hidden-section {
display: none !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
"showBacklinks": true,
"showOutlinks": true,
"showDates": true,
"lastVersion": "1.6.0"
"lastVersion": "1.6.2"
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ var ReleaseNotesModal = class extends import_obsidian.Modal {
};

// virtual-module:virtual:release-notes
var releaseNotes = '<h2>\u{1F389} What&#39;s New</h2>\n<h3>v1.6.1</h3>\n<h4>Fixed</h4>\n<ul>\n<li>Fixed console error when switching between reading/editing modes</li>\n</ul>\n<h3>v1.6.0</h3>\n<h4>New Color Customization Options</h4>\n<ul>\n<li>New Border, Links, and Date color customization options in settings<ul>\n<li>Color picker to select custom colors</li>\n<li>Reset button to restore default colors (theme accent color)</li>\n<li>Real-time color updates</li>\n</ul>\n</li>\n</ul>\n<p><img src="https://raw.githubusercontent.com/jparkerweb/rich-foot/refs/heads/main/img/releases/rich-foot-v1.6.0.jpg" alt="New Color Customization Options"></p>\n';
var releaseNotes = '<h2>\u{1F389} What&#39;s New</h2>\n<h3>v1.6.2</h3>\n<h4>Updated</h4>\n<ul>\n<li>outlinks section to inclued transclusion links (example <code>[[note#section]]</code> or <code>[text](note#section)</code>)</li>\n</ul>\n<h3>v1.6.1</h3>\n<h4>Fixed</h4>\n<ul>\n<li>Fixed console error when switching between reading/editing modes</li>\n</ul>\n<h3>v1.6.0</h3>\n<h4>New Color Customization Options</h4>\n<ul>\n<li>New Border, Links, and Date color customization options in settings<ul>\n<li>Color picker to select custom colors</li>\n<li>Reset button to restore default colors (theme accent color)</li>\n<li>Real-time color updates</li>\n</ul>\n</li>\n</ul>\n<p><img src="https://raw.githubusercontent.com/jparkerweb/rich-foot/refs/heads/main/img/releases/rich-foot-v1.6.0.jpg" alt="New Color Customization Options"></p>\n';

// src/main.js
var DEFAULT_SETTINGS = {
Expand Down Expand Up @@ -323,12 +323,13 @@ var RichFootPlugin = class extends import_obsidian2.Plugin {
return richFoot;
}
getOutlinks(file) {
var _a, _b;
var _a, _b, _c, _d;
const cache = this.app.metadataCache.getFileCache(file);
const links = /* @__PURE__ */ new Set();
if (cache == null ? void 0 : cache.links) {
for (const link of cache.links) {
const targetFile = this.app.metadataCache.getFirstLinkpathDest(link.link, file.path);
const linkPath = link.link.split("#")[0];
const targetFile = this.app.metadataCache.getFirstLinkpathDest(linkPath, file.path);
if (targetFile && targetFile.extension === "md") {
links.add(targetFile.path);
}
Expand All @@ -340,14 +341,41 @@ var RichFootPlugin = class extends import_obsidian2.Plugin {
for (const link of frontmatterLinks) {
const linkText = (_b = link.match(/\[\[(.*?)\]\]/)) == null ? void 0 : _b[1];
if (linkText) {
const targetFile = this.app.metadataCache.getFirstLinkpathDest(linkText, file.path);
const linkPath = linkText.split("#")[0];
const targetFile = this.app.metadataCache.getFirstLinkpathDest(linkPath, file.path);
if (targetFile && targetFile.extension === "md") {
links.add(targetFile.path);
}
}
}
}
}
if (cache == null ? void 0 : cache.embeds) {
for (const embed of cache.embeds) {
const filePath = embed.link.split("#")[0];
const targetFile = this.app.metadataCache.getFirstLinkpathDest(filePath, file.path);
if (targetFile && targetFile.extension === "md") {
links.add(targetFile.path);
}
}
}
if (cache == null ? void 0 : cache.sections) {
for (const section of cache.sections) {
if (section.type === "paragraph") {
const matches = ((_c = section.text) == null ? void 0 : _c.match(/\[.*?\]\((.*?)(?:#.*?)?\)/g)) || [];
for (const match of matches) {
const linkPath = (_d = match.match(/\[.*?\]\((.*?)(?:#.*?)?\)/)) == null ? void 0 : _d[1];
if (linkPath) {
const cleanPath = linkPath.split("#")[0];
const targetFile = this.app.metadataCache.getFirstLinkpathDest(cleanPath, file.path);
if (targetFile && targetFile.extension === "md") {
links.add(targetFile.path);
}
}
}
}
}
}
return links;
}
onunload() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"id": "rich-foot",
"name": "Rich Foot",
"version": "1.6.1",
"minAppVersion": "1.6.0",
"version": "1.6.2",
"minAppVersion": "1.5.0",
"description": "Adds backlink tags and created/modified dates to the footer of your notes.",
"author": "Justin Parker",
"authorUrl": "https://www.jparkerweb.com",
"author": "Justin Parker (eQui\\\\ Labs)",
"authorUrl": "https://www.equilllabs.com",
"fundingUrl": "https://ko-fi.com/jparkerweb",
"isDesktopOnly": false
}
24 changes: 22 additions & 2 deletions example-vault/rich-foot-example/.obsidian/workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,26 @@
{
"id": "388b22a3a54ccc4c",
"type": "leaf",
"state": {
"type": "empty",
"state": {},
"icon": "lucide-file",
"title": "New tab"
}
},
{
"id": "fc7ebc193edee888",
"type": "leaf",
"state": {
"type": "empty",
"state": {},
"icon": "lucide-file",
"title": "New tab"
}
},
{
"id": "86780c664be3375b",
"type": "leaf",
"state": {
"type": "Saved Queries View",
"state": {},
Expand All @@ -134,7 +154,7 @@
}
}
],
"currentTab": 3
"currentTab": 5
}
],
"direction": "horizontal",
Expand All @@ -153,10 +173,10 @@
},
"active": "e2b1b7584f7a474c",
"lastOpenFiles": [
"exclude/me too/no rich-feet here either.md",
"backlink test.md",
"exclude/no rich-feet here.md",
"🦶 Rich Foot.md",
"exclude/me too/no rich-feet here either.md",
"images/rich-feet-3.jpg",
"images/rich-feet-2.jpg",
"images/rich-feet.jpg",
Expand Down
4 changes: 3 additions & 1 deletion example-vault/rich-foot-example/backlink test.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Backlink Test

When the `rich-foot` plugin is enabled, this note will display a *backlink* to [[🦶 Rich Foot]] because it links to this note.
When the `rich-foot` plugin is enabled, this note will display a *backlink* to [[🦶 Rich Foot]] because it links to this note.

I wonder where this goes: [[no rich-feet here#This some some section that I want an outlink to go to]]
4 changes: 3 additions & 1 deletion example-vault/rich-foot-example/exclude/no rich-feet here.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
This note is a direct child of a folder defined in the settings `Excluded Folders` section, and will not display the [[🦶 Rich Foot]] plugin in the note's footer.
### This note is a direct child of a folder defined in the settings `Excluded Folders` section, and will not display the [[🦶 Rich Foot]] plugin in the note's footer.

#### This some some section that I want an outlink to go to
1 change: 0 additions & 1 deletion example-vault/rich-foot-example/🦶 Rich Foot.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ links:
https://github.com/jparkerweb/rich-foot

Rich Foot is an Obsidian plugin that enhances the footer of your notes by adding backlink tags and created/modified dates.

0 comments on commit 14c936d

Please sign in to comment.