Skip to content

Commit

Permalink
feat: add markdown monospace theme (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnetop authored Dec 7, 2023
1 parent 877f394 commit fa4ee29
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cdn/plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,9 @@
{
"identifier": "com.sncommunity.standard-blue-dark-theme",
"staticFiles": ["dist", "package.json"]
},
{
"identifier": "com.sncommunity.markdown-monospace",
"staticFiles": ["dist", "package.json"]
}
]
20 changes: 20 additions & 0 deletions packages/com.sncommunity.markdown-monospace/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Monospace font for Standard Notes markdown editors

(This theme used to live in https://github.com/DanielNetoP/markdown-monospace)

This theme is toggable on top of other themes, it simply adds the monospace font family to the editors.

Instead, it adds a Monospace font to use in the following editors:
- Basic Markdown
- Minimal Markdown
- Markdown

## Preview
**Toggle theme:**
![Example of the theme toggle](examples/preview.png)

**Before:**
![Example of the before theme](examples/before.png)

**After:**
![Example of the after theme](examples/after.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions packages/com.sncommunity.markdown-monospace/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "@standardnotes/markdown-monospace",
"version": "1.0.0",
"main": "dist/dist.css",
"author": "DanielNetoP",
"description": "Ability to toggle monospace font for Markdown, Minimal Markdown, and Basic Markdown plugins.",
"publishConfig": {
"access": "public"
},
"sn": {
"name": "Markdown Monospace",
"content_type": "SN|Theme",
"area": "themes",
"main": "dist/dist.css",
"showInGallery": true
},
"scripts": {
"build": "webpack --entry ./src/main.scss --config ../theme.webpack.config.js",
"test": "echo \"Error: no test specified\" && exit 0"
},
"devDependencies": {
"webpack": "*"
}
}
9 changes: 9 additions & 0 deletions packages/com.sncommunity.markdown-monospace/src/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.CodeMirror-code,
#editor,
.CodeMirror .CodeMirror-code .cm-comment {
font-family: var(--sn-stylekit-monospace-font) !important;
}

.CodeMirror .CodeMirror-code .cm-comment {
font-size: 100% !important;
}
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6024,6 +6024,14 @@ __metadata:
languageName: unknown
linkType: soft

"@standardnotes/markdown-monospace@workspace:packages/com.sncommunity.markdown-monospace":
version: 0.0.0-use.local
resolution: "@standardnotes/markdown-monospace@workspace:packages/com.sncommunity.markdown-monospace"
dependencies:
webpack: "*"
languageName: unknown
linkType: soft

"@standardnotes/markdown-visual@workspace:packages/com.sncommunity.markdown-visual":
version: 0.0.0-use.local
resolution: "@standardnotes/markdown-visual@workspace:packages/com.sncommunity.markdown-visual"
Expand Down

0 comments on commit fa4ee29

Please sign in to comment.