Skip to content

Commit

Permalink
v1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jparkerweb committed Nov 29, 2024
1 parent 14ed772 commit fcca20a
Show file tree
Hide file tree
Showing 11 changed files with 106 additions and 30 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 Rich Foot will be documented in this file.

## [1.8.0] - 2024-11-29
### ✨ Added
- Support for `Page Preview` core plugin for `Outlinks` & `Backlinks`

## [1.7.2] - 2024-11-29
### ✨ Added
- `Date Display Format` option to allow users to specify their own date format
Expand Down
23 changes: 4 additions & 19 deletions UPDATE.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
## 📆 Dates Your Way
## 🫣 Page Preview Support

### v1.7.2
### [1.8.0] - 2024-11-29
#### ✨ Added
- `Date Display Format` option to allow users to specify their own date format
- Support for `Page Preview` core plugin for `Outlinks` & `Backlinks`

#### 🐛 Fixed
- Date not formatted correctly if timestamp was included in the Custom Created/Modified Date Property

### v1.7.1
#### 🐛 Fixed
- Note embeds in canvas now have the correct height
- Duplicate "show dates" option in settings

#### ✨ Added
- If using custom created/modified date properties, the date now displays in the format of "Month Day, Year" if in proper date format, otherwise it displays the raw frontmatter filed string value.

### v1.7.0
#### ✨ Added
- `Custom Created/Modified Date Property` fields to allow users to specify their own frontmatter properties for dates, useful when file system dates are affected by sync processes and you track them separately.

[![screenshot](https://raw.githubusercontent.com/jparkerweb/rich-foot/refs/heads/develop/img/releases/rich-foot-v1.7.0.jpg)](https://raw.githubusercontent.com/jparkerweb/rich-foot/refs/heads/develop/img/releases/rich-foot-v1.7.0.jpg)
[![screenshot]()]()
Binary file modified example-vault.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ var ReleaseNotesModal = class extends import_obsidian.Modal {
};

// virtual-module:virtual:release-notes
var releaseNotes = '<h2>\u{1F4C6} Dates Your Way</h2>\n<h3>v1.7.2</h3>\n<h4>\u2728 Added</h4>\n<ul>\n<li><code>Date Display Format</code> option to allow users to specify their own date format</li>\n</ul>\n<h4>\u{1F41B} Fixed</h4>\n<ul>\n<li>Date not formatted correctly if timestamp was included in the Custom Created/Modified Date Property</li>\n</ul>\n<h3>v1.7.1</h3>\n<h4>\u{1F41B} Fixed</h4>\n<ul>\n<li>Note embeds in canvas now have the correct height</li>\n<li>Duplicate &quot;show dates&quot; option in settings</li>\n</ul>\n<h4>\u2728 Added</h4>\n<ul>\n<li>If using custom created/modified date properties, the date now displays in the format of &quot;Month Day, Year&quot; if in proper date format, otherwise it displays the raw frontmatter filed string value.</li>\n</ul>\n<h3>v1.7.0</h3>\n<h4>\u2728 Added</h4>\n<ul>\n<li><code>Custom Created/Modified Date Property</code> fields to allow users to specify their own frontmatter properties for dates, useful when file system dates are affected by sync processes and you track them separately.</li>\n</ul>\n<p><a href="https://raw.githubusercontent.com/jparkerweb/rich-foot/refs/heads/develop/img/releases/rich-foot-v1.7.0.jpg"><img src="https://raw.githubusercontent.com/jparkerweb/rich-foot/refs/heads/develop/img/releases/rich-foot-v1.7.0.jpg" alt="screenshot"></a></p>\n';
var releaseNotes = '<h2>\u{1FAE3} Page Preview Support</h2>\n<h3>[1.8.0] - 2024-11-29</h3>\n<h4>\u2728 Added</h4>\n<ul>\n<li>Support for <code>Page Preview</code> core plugin for <code>Outlinks</code> &amp; <code>Backlinks</code></li>\n</ul>\n<p><a href=""><img src="" alt="screenshot"></a></p>\n';

// src/main.js
var DEFAULT_SETTINGS = {
Expand Down Expand Up @@ -352,8 +352,10 @@ var RichFootPlugin = class extends import_obsidian2.Plugin {
const li = backlinksUl.createEl("li");
const link = li.createEl("a", {
href: linkPath,
text: linkPath.split("/").pop().slice(0, -3)
text: linkPath.split("/").pop().slice(0, -3),
cls: this.isEditMode() ? "cm-hmd-internal-link" : "internal-link"
});
link.dataset.href = linkPath;
link.addEventListener("click", (event) => {
event.preventDefault();
this.app.workspace.openLinkText(linkPath, file.path);
Expand All @@ -375,8 +377,10 @@ var RichFootPlugin = class extends import_obsidian2.Plugin {
const li = outlinksUl.createEl("li");
const link = li.createEl("a", {
href: linkPath,
text: displayName
text: displayName,
cls: this.isEditMode() ? "cm-hmd-internal-link" : "internal-link"
});
link.dataset.href = linkPath;
link.addEventListener("click", (event) => {
event.preventDefault();
this.app.workspace.openLinkText(linkPath, file.path);
Expand Down Expand Up @@ -552,6 +556,12 @@ var RichFootPlugin = class extends import_obsidian2.Plugin {
}
return this.settings.excludedFolders.some((folder) => filePath.startsWith(folder));
}
isEditMode() {
var _a, _b;
const activeView = this.app.workspace.getActiveViewOfType(import_obsidian2.MarkdownView);
if (!activeView) return false;
return ((_b = (_a = activeView.getMode) == null ? void 0 : _a.call(activeView)) != null ? _b : activeView.mode) === "source";
}
};
var RichFootSettingTab = class extends import_obsidian2.PluginSettingTab {
constructor(app, plugin) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "rich-foot",
"name": "Rich Foot",
"version": "1.7.2",
"version": "1.8.0",
"minAppVersion": "1.5.0",
"description": "Adds backlink tags and created/modified dates to the footer of your notes.",
"author": "Justin Parker (eQui\\\\ Labs)",
Expand Down
61 changes: 57 additions & 4 deletions example-vault/rich-foot-example/.obsidian/workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"file": "🦶 Rich Foot.md",
"mode": "preview",
"backlinks": false,
"source": false
"source": true
},
"icon": "lucide-file",
"title": "🦶 Rich Foot"
Expand Down Expand Up @@ -388,6 +388,56 @@
{
"id": "d0aa2777f3e47d4b",
"type": "leaf",
"state": {
"type": "empty",
"state": {},
"icon": "lucide-file",
"title": "New tab"
}
},
{
"id": "690df41322286ad3",
"type": "leaf",
"state": {
"type": "empty",
"state": {},
"icon": "lucide-file",
"title": "New tab"
}
},
{
"id": "02dd71aa8a7ce50a",
"type": "leaf",
"state": {
"type": "empty",
"state": {},
"icon": "lucide-file",
"title": "New tab"
}
},
{
"id": "6efac1d0721e85b9",
"type": "leaf",
"state": {
"type": "empty",
"state": {},
"icon": "lucide-file",
"title": "New tab"
}
},
{
"id": "95d825311d85a3e9",
"type": "leaf",
"state": {
"type": "empty",
"state": {},
"icon": "lucide-file",
"title": "New tab"
}
},
{
"id": "6d3996441775543d",
"type": "leaf",
"state": {
"type": "Saved Queries View",
"state": {},
Expand All @@ -396,7 +446,7 @@
}
}
],
"currentTab": 29
"currentTab": 34
}
],
"direction": "horizontal",
Expand All @@ -417,13 +467,16 @@
},
"active": "e2b1b7584f7a474c",
"lastOpenFiles": [
"releases/v1.8.0 - 🫣 Page Preview Support.md",
"Pasted image 20241129154754.png",
"pixel-banner-images/feet-dreaming.png",
"releases/v1.7.0 - 📆 Dates Your Way.md",
"🦶 Rich Foot.md",
"exclude/me too/no rich-feet here either.md",
"exclude/no rich-feet here.md",
"backlink test.md",
"note with table.md",
"Untitled.canvas",
"exclude/no rich-feet here.md",
"exclude/me too/no rich-feet here either.md",
"pixel-banner-images/calendar-feet.png",
"images/rich-feet-3.jpg",
"images/rich-feet-2.jpg",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
banner: "[[feet-dreaming.png]]"
banner-height: "300"
banner-y: "70"
content-start: "150"
---
# 🦶 Rich Foot ⋅ 🫣 Page Preview Support { .release-title }

#### v1.8.0

### ✨ Added
- Support for `Page Preview` core plugin for `Outlinks` & `Backlinks`
2 changes: 2 additions & 0 deletions example-vault/rich-foot-example/🦶 Rich Foot.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ 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.

[[no rich-feet here]]
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "rich-foot",
"name": "Rich Foot",
"version": "1.7.2",
"version": "1.8.0",
"minAppVersion": "1.5.0",
"description": "Adds backlink tags and created/modified dates to the footer of your notes.",
"author": "Justin Parker (eQui\\\\ Labs)",
Expand Down
14 changes: 12 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,10 @@ class RichFootPlugin extends Plugin {
const li = backlinksUl.createEl('li');
const link = li.createEl('a', {
href: linkPath,
text: linkPath.split('/').pop().slice(0, -3)
text: linkPath.split('/').pop().slice(0, -3),
cls: this.isEditMode() ? 'cm-hmd-internal-link' : 'internal-link'
});
link.dataset.href = linkPath;
link.addEventListener('click', (event) => {
event.preventDefault();
this.app.workspace.openLinkText(linkPath, file.path);
Expand Down Expand Up @@ -423,8 +425,10 @@ class RichFootPlugin extends Plugin {
const li = outlinksUl.createEl('li');
const link = li.createEl('a', {
href: linkPath,
text: displayName
text: displayName,
cls: this.isEditMode() ? 'cm-hmd-internal-link' : 'internal-link'
});
link.dataset.href = linkPath;
link.addEventListener('click', (event) => {
event.preventDefault();
this.app.workspace.openLinkText(linkPath, file.path);
Expand Down Expand Up @@ -636,6 +640,12 @@ class RichFootPlugin extends Plugin {
}
return this.settings.excludedFolders.some(folder => filePath.startsWith(folder));
}

isEditMode() {
const activeView = this.app.workspace.getActiveViewOfType(MarkdownView);
if (!activeView) return false;
return (activeView.getMode?.() ?? activeView.mode) === 'source';
}
}

class RichFootSettingTab extends PluginSettingTab {
Expand Down

0 comments on commit fcca20a

Please sign in to comment.