-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from chrisgrieser/main
Added pages for Tooltips, Notices, Mobile, and Hub Guide...
- Loading branch information
Showing
10 changed files
with
178 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Mac | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
[] | ||
[ | ||
"obsidian-theme-design-utilities" | ||
] |
113 changes: 113 additions & 0 deletions
113
.obsidian/plugins/obsidian-theme-design-utilities/main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
/* | ||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD | ||
if you want to view the source, please visit the github repository of this plugin | ||
*/ | ||
|
||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); | ||
var __export = (target, all) => { | ||
__markAsModule(target); | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __reExport = (target, module2, desc) => { | ||
if (module2 && typeof module2 === "object" || typeof module2 === "function") { | ||
for (let key of __getOwnPropNames(module2)) | ||
if (!__hasOwnProp.call(target, key) && key !== "default") | ||
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); | ||
} | ||
return target; | ||
}; | ||
var __toModule = (module2) => { | ||
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); | ||
}; | ||
var __async = (__this, __arguments, generator) => { | ||
return new Promise((resolve, reject) => { | ||
var fulfilled = (value) => { | ||
try { | ||
step(generator.next(value)); | ||
} catch (e) { | ||
reject(e); | ||
} | ||
}; | ||
var rejected = (value) => { | ||
try { | ||
step(generator.throw(value)); | ||
} catch (e) { | ||
reject(e); | ||
} | ||
}; | ||
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); | ||
step((generator = generator.apply(__this, __arguments)).next()); | ||
}); | ||
}; | ||
|
||
// main.ts | ||
__export(exports, { | ||
default: () => themeDesignUtilities | ||
}); | ||
var import_obsidian = __toModule(require("obsidian")); | ||
var themeDesignUtilities = class extends import_obsidian.Plugin { | ||
onload() { | ||
return __async(this, null, function* () { | ||
const freezeDelaySecs = 4; | ||
console.log("Theme Design Utilities Plugin loaded."); | ||
this.addCommand({ | ||
id: "freeze-obsidian", | ||
name: "Freeze Obsidian (triggered with " + freezeDelaySecs.toString() + "s delay)", | ||
callback: () => { | ||
new import_obsidian.Notice("Will freeze Obsidian in " + freezeDelaySecs.toString() + "s (if the console is open.)", 3e3); | ||
setTimeout(() => { | ||
debugger; | ||
}, freezeDelaySecs * 1e3); | ||
} | ||
}); | ||
this.addCommand({ | ||
id: "test-notice", | ||
name: "Test Notice", | ||
callback: () => new import_obsidian.Notice("I am a test notice. \u{1F44B} \n\nI will stay here until you click me.", 0) | ||
}); | ||
this.addCommand({ | ||
id: "toggle-emulate-mobile", | ||
name: "Toggle mobile emulation", | ||
callback: () => this.app.emulateMobile(!this.app.isMobile) | ||
}); | ||
this.addCommand({ | ||
id: "cheatsheet-css-classes", | ||
name: "Cheatsheet: Obsidian CSS Classes", | ||
callback: () => window.open("https://raw.githubusercontent.com/chrisgrieser/obsidian-theme-design-utilities/master/cheatsheets/css-classes.png") | ||
}); | ||
this.addCommand({ | ||
id: "toggle-dark-light-mode", | ||
name: "Toggle Dark/Light Mode", | ||
callback: () => { | ||
const isDarkMode = this.app.vault.getConfig("theme") === "obsidian"; | ||
if (isDarkMode) | ||
this.useLightMode(); | ||
else | ||
this.useDarkMode(); | ||
} | ||
}); | ||
}); | ||
} | ||
onunload() { | ||
return __async(this, null, function* () { | ||
console.log("Theme Design Utilities Plugin unloaded."); | ||
}); | ||
} | ||
useDarkMode() { | ||
this.app.setTheme("obsidian"); | ||
this.app.vault.setConfig("theme", "obsidian"); | ||
this.app.workspace.trigger("css-change"); | ||
} | ||
useLightMode() { | ||
this.app.setTheme("moonstone"); | ||
this.app.vault.setConfig("theme", "moonstone"); | ||
this.app.workspace.trigger("css-change"); | ||
} | ||
}; |
10 changes: 10 additions & 0 deletions
10
.obsidian/plugins/obsidian-theme-design-utilities/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"id": "obsidian-theme-design-utilities", | ||
"name": "Theme Design Utilities", | ||
"version": "0.13.0", | ||
"minAppVersion": "0.12.0", | ||
"description": "Some Utilities and Quality-of-Life Features for Designers of Obsidian Themes.", | ||
"author": "pseudometa", | ||
"authorUrl": "https://github.com/chrisgrieser/theme-design-utilities", | ||
"isDesktopOnly": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
![[obsidian.jpeg]] | ||
|
||
![[test-unknown-file.fake]] | ||
|
||
![[Headings#^038507]] | ||
|
||
![[Headings#h1 Heading 2]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Check out the [Guides for Theme Designers at the Obsidian Hub](https://publish.obsidian.md/hub/04+-+Guides%2C+Workflows%2C+%26+Courses/for+Theme+Designers). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Use the command `Theme Design Utilities: Toggle Mobile Emulation` in the command palette. | ||
|
||
As the name says, this will emulate the mobile Obsidian app in this vault. Run the command again, to end the emulation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# Obsidian Theme Dev Vault | ||
|
||
The purpose of this vault is to aid in theme development by demonstraiting and exercising as many features of Obsidian as possible. | ||
The purpose of this vault is to aid in theme development by demonstrating and exercising as many features of Obsidian as possible. | ||
|
||
This vault is currently incomplete. Please help update it by submitting pull requests. | ||
|
||
|
||
## Guidelines for contributing | ||
|
||
- Keep plugins turned off by default | ||
- ....TODO.... | ||
- ....TODO.... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Tooltips & Notices | ||
|
||
## Tooltips | ||
%% Enable Preview Mode to see buttons with the different tooltips. %% | ||
|
||
<button aria-label="Lorem Ipsum">Bottom Tooltip</button> | ||
|
||
<button aria-label="Lorem Ipsum" aria-label-position="top">Top Tooltip</button> | ||
|
||
<button aria-label="Lorem Ipsum" aria-label-position="right">Right Tooltip</button> | ||
|
||
<button aria-label="Lorem Ipsum" aria-label-position="left">Left Tooltip</button> | ||
|
||
## Notices | ||
|
||
Use the command `Theme Design Utilities: Test Notice` in the command palette. |