fixed untracked files

This commit is contained in:
Ell 2022-08-21 17:50:27 +02:00
parent 8b7c80d218
commit 14b01b67e5
7 changed files with 146 additions and 279 deletions

View file

@ -1,9 +1,9 @@
# top-most EditorConfig file # top-most EditorConfig file
root = true root = true
[*] [*]
charset = utf-8 charset = utf-8
insert_final_newline = true insert_final_newline = true
indent_style = tab indent_style = tab
indent_size = 4 indent_size = 4
tab_width = 4 tab_width = 4

44
.gitignore vendored
View file

@ -1,22 +1,22 @@
# vscode # vscode
.vscode .vscode
# Intellij # Intellij
*.iml *.iml
.idea .idea
# npm # npm
node_modules node_modules
# Don't include the compiled main.js file in the repo. # Don't include the compiled main.js file in the repo.
# They should be uploaded to GitHub releases instead. # They should be uploaded to GitHub releases instead.
./main.js ./main.js
# Exclude sourcemaps # Exclude sourcemaps
*.map *.map
# obsidian # obsidian
workspace workspace
# Exclude macOS Finder (System Explorer) View States # Exclude macOS Finder (System Explorer) View States
.DS_Store .DS_Store

140
README.md
View file

@ -1,70 +1,70 @@
# Obsidian Custom Frames # Obsidian Custom Frames
An Obsidian plugin that turns web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more. An Obsidian plugin that turns web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.
![A screenshot of the plugin in action, where you can see Google Keep attached as a narrow side pane on the right](https://raw.githubusercontent.com/Ellpeck/ObsidianCustomFrames/master/screenshot.png) ![A screenshot of the plugin in action, where you can see Google Keep attached as a narrow side pane on the right](https://raw.githubusercontent.com/Ellpeck/ObsidianCustomFrames/master/screenshot.png)
![A screenshot of the plugin in action, where you can see Google Calendar opened in the center, and the mouse hovering over the corresponding ribbon button](https://raw.githubusercontent.com/Ellpeck/ObsidianCustomFrames/master/screenshot-big.png) ![A screenshot of the plugin in action, where you can see Google Calendar opened in the center, and the mouse hovering over the corresponding ribbon button](https://raw.githubusercontent.com/Ellpeck/ObsidianCustomFrames/master/screenshot-big.png)
![A screenshot of the plugin's settings](https://raw.githubusercontent.com/Ellpeck/ObsidianCustomFrames/master/settings.png) ![A screenshot of the plugin's settings](https://raw.githubusercontent.com/Ellpeck/ObsidianCustomFrames/master/settings.png)
## 🤔 Usage ## 🤔 Usage
To use this plugin, simply go into its settings and add a new frame, either from a preset shipped with the plugin, or a custom one that you can edit yourself. To use this plugin, simply go into its settings and add a new frame, either from a preset shipped with the plugin, or a custom one that you can edit yourself.
### 🪟 Pane Mode ### 🪟 Pane Mode
To open a Custom Frame as a pane, you can use the "Custom Frames: Open" command. To open a Custom Frame as a pane, you can use the "Custom Frames: Open" command.
There are also plenty of settings to customize your frame further, including adding custom CSS to the site, adding a ribbon icon, displaying the frame in the center of the editor, and more. There are also plenty of settings to customize your frame further, including adding custom CSS to the site, adding a ribbon icon, displaying the frame in the center of the editor, and more.
### 🗒️ Markdown Mode ### 🗒️ Markdown Mode
You can also display your custom frames in your Markdown documents. Custom Frames adds a special code block syntax that transforms the code block into a custom frame in Live Preview and Reading mode. Your code block should look like this: You can also display your custom frames in your Markdown documents. Custom Frames adds a special code block syntax that transforms the code block into a custom frame in Live Preview and Reading mode. Your code block should look like this:
~~~ ~~~
```custom-frames ```custom-frames
frame: YOUR FRAME'S NAME frame: YOUR FRAME'S NAME
``` ```
~~~ ~~~
Optionally, you can also pass custom style settings to the embed, which allows you to change things like the embed's height, as well as an additional suffix that will be appended to the frame's regular URL, which can be useful for things like displaying a specific note in Google Keep. Optionally, you can also pass custom style settings to the embed, which allows you to change things like the embed's height, as well as an additional suffix that will be appended to the frame's regular URL, which can be useful for things like displaying a specific note in Google Keep.
Here's an example using the [Google Keep preset](#-presets): Here's an example using the [Google Keep preset](#-presets):
~~~ ~~~
```custom-frames ```custom-frames
frame: Google Keep frame: Google Keep
style: height: 1000px; style: height: 1000px;
urlSuffix: #reminders urlSuffix: #reminders
``` ```
~~~ ~~~
### 📱 On Obsidian Mobile ### 📱 On Obsidian Mobile
Unfortunately, Obsidian Mobile does not run on [Electron](https://www.electronjs.org/), which is what allows iframes and [webviews](https://www.electronjs.org/docs/latest/api/webview-tag) to be displayed with very few restrictions related to cookies, cross-origin resource sharing, and so on. This means that a lot of sites won't work there, especially ones that you have to log in to. However, when you create a frame, you can toggle the "Disable on Mobile" option to hide a Desktop-only frame in Obsidian mobile. Unfortunately, Obsidian Mobile does not run on [Electron](https://www.electronjs.org/), which is what allows iframes and [webviews](https://www.electronjs.org/docs/latest/api/webview-tag) to be displayed with very few restrictions related to cookies, cross-origin resource sharing, and so on. This means that a lot of sites won't work there, especially ones that you have to log in to. However, when you create a frame, you can toggle the "Disable on Mobile" option to hide a Desktop-only frame in Obsidian mobile.
## 📦 Presets ## 📦 Presets
By default, Custom Frames comes with a few presets that allow you to get new panes for popular sites up and running quickly. By default, Custom Frames comes with a few presets that allow you to get new panes for popular sites up and running quickly.
- [Obsidian Forum](https://forum.obsidian.md/) - [Obsidian Forum](https://forum.obsidian.md/)
- [Google Keep](https://keep.google.com), optimized for a narrow pane on the side - [Google Keep](https://keep.google.com), optimized for a narrow pane on the side
- [Google Calendar](https://calendar.google.com/calendar/u/0/r/day), optimized by removing some buttons. Close side panel with top-left button. - [Google Calendar](https://calendar.google.com/calendar/u/0/r/day), optimized by removing some buttons. Close side panel with top-left button.
- [Todoist](https://todoist.com), optimized for a narrow (half-height) side panel by removing some buttons and slimming margins. - [Todoist](https://todoist.com), optimized for a narrow (half-height) side panel by removing some buttons and slimming margins.
- [Notion](https://www.notion.so/) (it's recommended to close Notion's sidebar if used as a side pane) - [Notion](https://www.notion.so/) (it's recommended to close Notion's sidebar if used as a side pane)
- [Twitter](https://twitter.com) - [Twitter](https://twitter.com)
If you create a frame that you think other people would like, don't hesitate to create a pull request with [a new preset](https://github.com/Ellpeck/ObsidianCustomFrames/blob/master/src/settings.ts#L5). If you create a frame that you think other people would like, don't hesitate to create a pull request with [a new preset](https://github.com/Ellpeck/ObsidianCustomFrames/blob/master/src/settings.ts#L5).
## 🛣️ Roadmap ## 🛣️ Roadmap
- ~~Allow setting a custom icon for each pane~~ - ~~Allow setting a custom icon for each pane~~
- ~~Allow displaying custom frames in Markdown code blocks~~ - ~~Allow displaying custom frames in Markdown code blocks~~
- ~~Add the ability to add a ribbon button for a frame that opens it in the main view~~ - ~~Add the ability to add a ribbon button for a frame that opens it in the main view~~
- Allow creating links that open in a custom frame rather than the browser - Allow creating links that open in a custom frame rather than the browser
- Possibly allow executing custom JavaScript in iframes (though security implications still need to be explored) - Possibly allow executing custom JavaScript in iframes (though security implications still need to be explored)
- Add a global setting that causes popups to be opened in a new Obsidian window rather than the default browser - Add a global setting that causes popups to be opened in a new Obsidian window rather than the default browser
- Add more options to Markdown mode, like allowing for back and forward buttons - Add more options to Markdown mode, like allowing for back and forward buttons
## ⚠️ Known Issues ## ⚠️ Known Issues
There are a few known issues with Custom Frames. If you encounter any of these, please **don't** report it on the issue tracker. There are a few known issues with Custom Frames. If you encounter any of these, please **don't** report it on the issue tracker.
- In Obsidian **0.14.2 and lower**, a lot of websites don't function properly in custom frames. This is due to these older versions not having features in place that allow for frames to have special, additional functionality related to cookies and headers. - In Obsidian **0.14.2 and lower**, a lot of websites don't function properly in custom frames. This is due to these older versions not having features in place that allow for frames to have special, additional functionality related to cookies and headers.
- In Obsidian **0.14.5 and lower**, when dragging or moving a pane, hovering the mouse over a custom frame will cause it to get stuck or behave unexpectedly. - In Obsidian **0.14.5 and lower**, when dragging or moving a pane, hovering the mouse over a custom frame will cause it to get stuck or behave unexpectedly.
## 🙏 Acknowledgements ## 🙏 Acknowledgements
Thanks to [lishid](https://github.com/lishid) for their help with making iframes work in Obsidian for a purpose like this. Also thanks to them for *motivating* me to turn Obsidian Keep into a more versatile plugin, which is how Custom Frames was born. Thanks to [lishid](https://github.com/lishid) for their help with making iframes work in Obsidian for a purpose like this. Also thanks to them for *motivating* me to turn Obsidian Keep into a more versatile plugin, which is how Custom Frames was born.
If you like this plugin and want to support its development, you can do so through my website by clicking this fancy image! If you like this plugin and want to support its development, you can do so through my website by clicking this fancy image!
[![Support me (if you want), via Patreon, Ko-fi or GitHub Sponsors](https://ellpeck.de/res/generalsupport.png)](https://ellpeck.de/support) [![Support me (if you want), via Patreon, Ko-fi or GitHub Sponsors](https://ellpeck.de/res/generalsupport.png)](https://ellpeck.de/support)

View file

@ -1,10 +1,10 @@
{ {
"id": "obsidian-custom-frames", "id": "obsidian-custom-frames",
"name": "Custom Frames", "name": "Custom Frames",
"version": "2.4.2", "version": "2.4.2",
"minAppVersion": "0.14.5", "minAppVersion": "0.14.5",
"description": "A plugin that turns web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.", "description": "A plugin that turns web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.",
"author": "Ellpeck", "author": "Ellpeck",
"authorUrl": "https://ellpeck.de", "authorUrl": "https://ellpeck.de",
"isDesktopOnly": false "isDesktopOnly": false
} }

View file

@ -1,133 +0,0 @@
{
"main": {
"id": "c1516e0860f8ca2d",
"type": "split",
"children": [
{
"id": "cbc6da4aa7697308",
"type": "leaf",
"state": {
"type": "custom-frames-obsidian-forum",
"state": {}
}
}
],
"direction": "vertical"
},
"left": {
"id": "f48d3cfe4b95c092",
"type": "split",
"children": [
{
"id": "f1178df345e439d7",
"type": "tabs",
"children": [
{
"id": "1953d881032399d7",
"type": "leaf",
"state": {
"type": "file-explorer",
"state": {}
}
},
{
"id": "36f241641b1334c7",
"type": "leaf",
"state": {
"type": "search",
"state": {
"query": "",
"matchingCase": false,
"explainSearch": false,
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical"
}
}
},
{
"id": "2b4a59e1687c8b13",
"type": "leaf",
"state": {
"type": "starred",
"state": {}
}
}
]
}
],
"direction": "horizontal",
"width": 300
},
"right": {
"id": "48128f792502a876",
"type": "split",
"children": [
{
"id": "6635b8a61f3363dc",
"type": "tabs",
"children": [
{
"id": "8b8ee33059b392df",
"type": "leaf",
"state": {
"type": "backlink",
"state": {
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
"showSearch": false,
"searchQuery": "",
"backlinkCollapsed": false,
"unlinkedCollapsed": true
}
}
},
{
"id": "1a5164ddf50fc39d",
"type": "leaf",
"state": {
"type": "outgoing-link",
"state": {
"linksCollapsed": false,
"unlinkedCollapsed": true
}
}
},
{
"id": "360f0e93e58b9472",
"type": "leaf",
"state": {
"type": "tag",
"state": {
"sortOrder": "frequency",
"useHierarchy": true
}
}
},
{
"id": "edb9a559fde3ae0c",
"type": "leaf",
"state": {
"type": "outline",
"state": {}
}
},
{
"id": "d77c1f6b102072c2",
"type": "leaf",
"state": {
"type": "custom-frames-google-keep",
"state": {}
}
}
],
"currentTab": 4
}
],
"direction": "horizontal",
"width": 388
},
"active": "d77c1f6b102072c2",
"lastOpenFiles": []
}

View file

@ -1,23 +1,23 @@
{ {
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"inlineSourceMap": true, "inlineSourceMap": true,
"inlineSources": true, "inlineSources": true,
"module": "ESNext", "module": "ESNext",
"target": "ES6", "target": "ES6",
"allowJs": true, "allowJs": true,
"noImplicitAny": true, "noImplicitAny": true,
"moduleResolution": "node", "moduleResolution": "node",
"importHelpers": true, "importHelpers": true,
"isolatedModules": true, "isolatedModules": true,
"lib": [ "lib": [
"DOM", "DOM",
"ES5", "ES5",
"ES6", "ES6",
"ES7" "ES7"
] ]
}, },
"include": [ "include": [
"**/*.ts" "**/*.ts"
] ]
} }

View file

@ -1,12 +1,12 @@
{ {
"2.0.0": "0.13.33", "2.0.0": "0.13.33",
"2.0.1": "0.13.33", "2.0.1": "0.13.33",
"2.1.0": "0.13.33", "2.1.0": "0.13.33",
"2.2.0": "0.14.3", "2.2.0": "0.14.3",
"2.2.1": "0.14.3", "2.2.1": "0.14.3",
"2.2.2": "0.14.3", "2.2.2": "0.14.3",
"2.3.0": "0.14.5", "2.3.0": "0.14.5",
"2.4.0": "0.14.5", "2.4.0": "0.14.5",
"2.4.1": "0.14.5", "2.4.1": "0.14.5",
"2.4.2": "0.14.5" "2.4.2": "0.14.5"
} }