diff --git a/.eslintrc b/.eslintrc index 9ba7573..aeba6f5 100644 --- a/.eslintrc +++ b/.eslintrc @@ -17,6 +17,7 @@ "rules": { "no-new": 0, "no-unused-vars": "off", + "@typescript-eslint/no-var-requires": "off", "@typescript-eslint/no-unused-vars": ["error", { "args": "none" }], "@typescript-eslint/ban-ts-comment": "off", "no-prototype-builtins": "off", diff --git a/manifest.json b/manifest.json index 0730e7b..f86cbb8 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "share-note", "name": "Share Note", - "version": "0.2.11", + "version": "0.2.12", "minAppVersion": "0.15.0", "description": "Share a note publicly with full styling. Data is stored encrypted on the server and only you have the key.", "author": "Alan Grainger", diff --git a/package.json b/package.json index 7de19f1..84adf8b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "share-note", - "version": "0.2.11", + "version": "0.2.12", "description": "Share a note publicly with full styling. Data is stored encrypted on the server and only you have the key.", "main": "main.js", "scripts": { diff --git a/src/note.ts b/src/note.ts index 53667b9..5e6eba6 100644 --- a/src/note.ts +++ b/src/note.ts @@ -91,7 +91,11 @@ export default class Note { // Make template value replacements this.outputFile.setReadingWidth(this.plugin.settings.noteWidth) this.outputFile.setPreviewViewClasses(this.previewViewEl.classList || []) - this.outputFile.setBodyClasses(document.body.classList) + const bodyClasses = document.body.classList + // Remove any mobile classes if present. + // They will be toggled by the template depending on viewport size. + bodyClasses.remove('is-mobile', 'is-android', 'is-phone') + this.outputFile.setBodyClasses(bodyClasses) this.outputFile.setBodyStyle(document.body.style.cssText.replace(/"/g, '\'')) if (!this.plugin.settings.showFooter) { this.outputFile.removeFooter() @@ -197,7 +201,7 @@ export default class Note { } this.status.hide() - new StatusMessage(shareMessage, StatusType.Info, 6000) + new StatusMessage(shareMessage, StatusType.Success) } async upload (data: UploadData) { diff --git a/src/template.ts b/src/template.ts index 0188f7d..3ebd52b 100644 --- a/src/template.ts +++ b/src/template.ts @@ -25,12 +25,6 @@ const html = ` .status-bar { position: fixed !important; } - - @media all and (max-width: 768px) { - #template-preview-view { - padding: 16px 8px; - } - }
@@ -64,6 +58,21 @@ const html = `