Skip to content

Commit 700db52

Browse files
committed
Move the container style to styles.css.
1 parent 60fe55e commit 700db52

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## master
44

5+
- Move container style to `styles.css`.
6+
57
## 0.5.0
68

79
- Fixes the async chain.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ linjunpop/30efbfd874fb1a16176d3f638a1e712a#math.ex
3939

4040
### Manually installing the plugin
4141

42-
- Copy over `main.js`, `manifest.json` to your vault `VaultFolder/.obsidian/plugins/obsidian-gist/`.
42+
- Copy over `main.js`, `manifest.json`, `styles.css` to your vault `VaultFolder/.obsidian/plugins/obsidian-gist/`.
4343

4444
## Development
4545

@@ -57,5 +57,5 @@ linjunpop/30efbfd874fb1a16176d3f638a1e712a#math.ex
5757
- Update the `manifest.json` with a new version number, such as `1.0.1`, and the minimum Obsidian version required for your latest release.
5858
- Update the `versions.json` file with `"new-plugin-version": "minimum-obsidian-version"` so older versions of Obsidian can download an older version of your plugin that's compatible.
5959
- Create new GitHub release using your new version number as the "Tag version". Use the exact version number, don't include a prefix `v`.
60-
- Upload the files `manifest.json`, `main.js` as binary attachments.
60+
- Upload the files `manifest.json`, `main.js`, `styles.css` as binary attachments.
6161
- Publish the release.

main.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,6 @@ export default class GistPlugin extends Plugin {
6363
// container
6464
const container = document.createElement('iframe');
6565

66-
// container style
67-
const containerStyle = `
68-
width: 100%;
69-
border: 0;
70-
`
71-
container.setAttribute('style', containerStyle)
72-
7366
// auto adjust container height
7467
const innerStyle = `
7568
<style>

styles.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.block-language-gist > iframe {
2+
width: 100%;
3+
border: 0;
4+
}

0 commit comments

Comments
 (0)