vault backup: 2024-12-26 14:32:57
This commit is contained in:
parent
a634ccd899
commit
5c91f5a063
5
.obsidian/community-plugins.json
vendored
5
.obsidian/community-plugins.json
vendored
@ -1,5 +1,8 @@
|
||||
[
|
||||
"obsidian-kanban",
|
||||
"obsidian-git",
|
||||
"obsidian-icon-folder"
|
||||
"obsidian-icon-folder",
|
||||
"obsidian-emoji-toolbar",
|
||||
"execute-code",
|
||||
"auto-card-link"
|
||||
]
|
10
.obsidian/hotkeys.json
vendored
Normal file
10
.obsidian/hotkeys.json
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"obsidian-emoji-toolbar:emoji-picker:open-picker": [
|
||||
{
|
||||
"modifiers": [
|
||||
"Alt"
|
||||
],
|
||||
"key": "Q"
|
||||
}
|
||||
]
|
||||
}
|
634
.obsidian/plugins/auto-card-link/main.js
vendored
Normal file
634
.obsidian/plugins/auto-card-link/main.js
vendored
Normal file
@ -0,0 +1,634 @@
|
||||
/*
|
||||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
||||
if you want to view the source, please visit the github repository of this plugin
|
||||
*/
|
||||
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
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());
|
||||
});
|
||||
};
|
||||
|
||||
// src/main.ts
|
||||
var main_exports = {};
|
||||
__export(main_exports, {
|
||||
default: () => ObsidianAutoCardLink
|
||||
});
|
||||
module.exports = __toCommonJS(main_exports);
|
||||
var import_obsidian4 = require("obsidian");
|
||||
|
||||
// src/settings.ts
|
||||
var import_obsidian = require("obsidian");
|
||||
var DEFAULT_SETTINGS = {
|
||||
showInMenuItem: true,
|
||||
enhanceDefaultPaste: false
|
||||
};
|
||||
var ObsidianAutoCardLinkSettingTab = class extends import_obsidian.PluginSettingTab {
|
||||
constructor(app, plugin) {
|
||||
super(app, plugin);
|
||||
this.plugin = plugin;
|
||||
}
|
||||
display() {
|
||||
const { containerEl } = this;
|
||||
containerEl.empty();
|
||||
new import_obsidian.Setting(containerEl).setName("Enhance Default Paste").setDesc("Fetch the link metadata when pasting a url in the editor with the default paste command").addToggle((val) => {
|
||||
if (!this.plugin.settings)
|
||||
return;
|
||||
return val.setValue(this.plugin.settings.enhanceDefaultPaste).onChange((value) => __async(this, null, function* () {
|
||||
if (!this.plugin.settings)
|
||||
return;
|
||||
this.plugin.settings.enhanceDefaultPaste = value;
|
||||
yield this.plugin.saveSettings();
|
||||
}));
|
||||
});
|
||||
new import_obsidian.Setting(containerEl).setName("Add commands in menu item").setDesc("Whether to add commands in right click menu items").addToggle((val) => {
|
||||
if (!this.plugin.settings)
|
||||
return;
|
||||
return val.setValue(this.plugin.settings.showInMenuItem).onChange((value) => __async(this, null, function* () {
|
||||
if (!this.plugin.settings)
|
||||
return;
|
||||
this.plugin.settings.showInMenuItem = value;
|
||||
yield this.plugin.saveSettings();
|
||||
}));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// src/regex.ts
|
||||
var urlRegex = /^(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})$/i;
|
||||
var lineRegex = /(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/gi;
|
||||
var linkRegex = /^\[([^[\]]*)\]\((https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})\)$/i;
|
||||
var linkLineRegex = /\[([^[\]]*)\]\((https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})\)/gi;
|
||||
var imageRegex = /\.(gif|jpe?g|tiff?|png|webp|bmp|tga|psd|ai)$/i;
|
||||
|
||||
// src/editor_enhancements.ts
|
||||
var EditorExtensions = class {
|
||||
static getSelectedText(editor) {
|
||||
if (!editor.somethingSelected()) {
|
||||
const wordBoundaries = this.getWordBoundaries(editor);
|
||||
editor.setSelection(wordBoundaries.start, wordBoundaries.end);
|
||||
}
|
||||
return editor.getSelection();
|
||||
}
|
||||
static isCursorWithinBoundaries(cursor, match) {
|
||||
var _a;
|
||||
const startIndex = (_a = match.index) != null ? _a : 0;
|
||||
const endIndex = startIndex + match[0].length;
|
||||
return startIndex <= cursor.ch && cursor.ch <= endIndex;
|
||||
}
|
||||
static getWordBoundaries(editor) {
|
||||
var _a, _b;
|
||||
const cursor = editor.getCursor();
|
||||
const lineText = editor.getLine(cursor.line);
|
||||
const linksInLine = lineText.matchAll(linkLineRegex);
|
||||
for (const match of linksInLine) {
|
||||
if (this.isCursorWithinBoundaries(cursor, match)) {
|
||||
const startCh = (_a = match.index) != null ? _a : 0;
|
||||
return {
|
||||
start: {
|
||||
line: cursor.line,
|
||||
ch: startCh
|
||||
},
|
||||
end: { line: cursor.line, ch: startCh + match[0].length }
|
||||
};
|
||||
}
|
||||
}
|
||||
const urlsInLine = lineText.matchAll(lineRegex);
|
||||
for (const match of urlsInLine) {
|
||||
if (this.isCursorWithinBoundaries(cursor, match)) {
|
||||
const startCh = (_b = match.index) != null ? _b : 0;
|
||||
return {
|
||||
start: { line: cursor.line, ch: startCh },
|
||||
end: { line: cursor.line, ch: startCh + match[0].length }
|
||||
};
|
||||
}
|
||||
}
|
||||
return {
|
||||
start: cursor,
|
||||
end: cursor
|
||||
};
|
||||
}
|
||||
static getEditorPositionFromIndex(content, index) {
|
||||
const substr = content.substr(0, index);
|
||||
let l = 0;
|
||||
let offset = -1;
|
||||
let r = -1;
|
||||
for (; (r = substr.indexOf("\n", r + 1)) !== -1; l++, offset = r)
|
||||
;
|
||||
offset += 1;
|
||||
const ch = content.substr(offset, index - offset).length;
|
||||
return { line: l, ch };
|
||||
}
|
||||
};
|
||||
|
||||
// src/checkif.ts
|
||||
var CheckIf = class {
|
||||
static isUrl(text) {
|
||||
const regex = new RegExp(urlRegex);
|
||||
return regex.test(text);
|
||||
}
|
||||
static isImage(text) {
|
||||
const regex = new RegExp(imageRegex);
|
||||
return regex.test(text);
|
||||
}
|
||||
static isLinkedUrl(text) {
|
||||
const regex = new RegExp(linkRegex);
|
||||
return regex.test(text);
|
||||
}
|
||||
};
|
||||
|
||||
// src/code_block_generator.ts
|
||||
var import_obsidian2 = require("obsidian");
|
||||
|
||||
// src/link_metadata_parser.ts
|
||||
var LinkMetadataParser = class {
|
||||
constructor(url, htmlText) {
|
||||
this.url = url;
|
||||
const parser = new DOMParser();
|
||||
const htmlDoc = parser.parseFromString(htmlText, "text/html");
|
||||
this.htmlDoc = htmlDoc;
|
||||
}
|
||||
parse() {
|
||||
return __async(this, null, function* () {
|
||||
var _a, _b;
|
||||
const title = (_a = this.getTitle()) == null ? void 0 : _a.replace(/\r\n|\n|\r/g, "").replace(/\\/g, "\\\\").replace(/"/g, '\\"').trim();
|
||||
if (!title)
|
||||
return;
|
||||
const description = (_b = this.getDescription()) == null ? void 0 : _b.replace(/\r\n|\n|\r/g, "").replace(/\\/g, "\\\\").replace(/"/g, '\\"').trim();
|
||||
const { hostname } = new URL(this.url);
|
||||
const favicon = yield this.getFavicon();
|
||||
const image = yield this.getImage();
|
||||
return {
|
||||
url: this.url,
|
||||
title,
|
||||
description,
|
||||
host: hostname,
|
||||
favicon,
|
||||
image,
|
||||
indent: 0
|
||||
};
|
||||
});
|
||||
}
|
||||
getTitle() {
|
||||
var _a, _b;
|
||||
const ogTitle = (_a = this.htmlDoc.querySelector("meta[property='og:title']")) == null ? void 0 : _a.getAttr("content");
|
||||
if (ogTitle)
|
||||
return ogTitle;
|
||||
const title = (_b = this.htmlDoc.querySelector("title")) == null ? void 0 : _b.textContent;
|
||||
if (title)
|
||||
return title;
|
||||
}
|
||||
getDescription() {
|
||||
var _a, _b;
|
||||
const ogDescription = (_a = this.htmlDoc.querySelector("meta[property='og:description']")) == null ? void 0 : _a.getAttr("content");
|
||||
if (ogDescription)
|
||||
return ogDescription;
|
||||
const metaDescription = (_b = this.htmlDoc.querySelector("meta[name='description']")) == null ? void 0 : _b.getAttr("content");
|
||||
if (metaDescription)
|
||||
return metaDescription;
|
||||
}
|
||||
getFavicon() {
|
||||
return __async(this, null, function* () {
|
||||
var _a;
|
||||
const favicon = (_a = this.htmlDoc.querySelector("link[rel='icon']")) == null ? void 0 : _a.getAttr("href");
|
||||
if (favicon)
|
||||
return yield this.fixImageUrl(favicon);
|
||||
});
|
||||
}
|
||||
getImage() {
|
||||
return __async(this, null, function* () {
|
||||
var _a;
|
||||
const ogImage = (_a = this.htmlDoc.querySelector("meta[property='og:image']")) == null ? void 0 : _a.getAttr("content");
|
||||
if (ogImage)
|
||||
return yield this.fixImageUrl(ogImage);
|
||||
});
|
||||
}
|
||||
fixImageUrl(url) {
|
||||
return __async(this, null, function* () {
|
||||
if (url === void 0)
|
||||
return "";
|
||||
const { hostname } = new URL(this.url);
|
||||
let image = url;
|
||||
if (url && url.startsWith("//")) {
|
||||
const testUrlHttps = `https:${url}`;
|
||||
const testUrlHttp = `http:${url}`;
|
||||
if (yield checkUrlAccessibility(testUrlHttps)) {
|
||||
image = testUrlHttps;
|
||||
} else if (yield checkUrlAccessibility(testUrlHttp)) {
|
||||
image = testUrlHttp;
|
||||
}
|
||||
} else if (url && url.startsWith("/") && hostname) {
|
||||
const testUrlHttps = `https://${hostname}${url}`;
|
||||
const testUrlHttp = `http://${hostname}${url}`;
|
||||
const resUrlHttps = yield checkUrlAccessibility(testUrlHttps);
|
||||
const resUrlHttp = yield checkUrlAccessibility(testUrlHttp);
|
||||
if (resUrlHttps) {
|
||||
image = testUrlHttps;
|
||||
} else if (resUrlHttp) {
|
||||
image = testUrlHttp;
|
||||
}
|
||||
}
|
||||
function checkUrlAccessibility(url2) {
|
||||
return __async(this, null, function* () {
|
||||
return new Promise((resolve) => {
|
||||
const img = new Image();
|
||||
img.onload = () => resolve(true);
|
||||
img.onerror = () => resolve(false);
|
||||
img.src = url2;
|
||||
});
|
||||
});
|
||||
}
|
||||
return image;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// src/code_block_generator.ts
|
||||
var CodeBlockGenerator = class {
|
||||
constructor(editor) {
|
||||
this.editor = editor;
|
||||
}
|
||||
convertUrlToCodeBlock(url) {
|
||||
return __async(this, null, function* () {
|
||||
const selectedText = this.editor.getSelection();
|
||||
const pasteId = this.createBlockHash();
|
||||
const fetchingText = `[Fetching Data#${pasteId}](${url})`;
|
||||
this.editor.replaceSelection(fetchingText);
|
||||
const linkMetadata = yield this.fetchLinkMetadata(url);
|
||||
const text = this.editor.getValue();
|
||||
const start = text.indexOf(fetchingText);
|
||||
if (start < 0) {
|
||||
console.log(`Unable to find text "${fetchingText}" in current editor, bailing out; link ${url}`);
|
||||
return;
|
||||
}
|
||||
const end = start + fetchingText.length;
|
||||
const startPos = EditorExtensions.getEditorPositionFromIndex(text, start);
|
||||
const endPos = EditorExtensions.getEditorPositionFromIndex(text, end);
|
||||
if (!linkMetadata) {
|
||||
new import_obsidian2.Notice("Couldn't fetch link metadata");
|
||||
this.editor.replaceRange(selectedText || url, startPos, endPos);
|
||||
return;
|
||||
}
|
||||
this.editor.replaceRange(this.genCodeBlock(linkMetadata), startPos, endPos);
|
||||
});
|
||||
}
|
||||
genCodeBlock(linkMetadata) {
|
||||
const codeBlockTexts = ["\n```cardlink"];
|
||||
codeBlockTexts.push(`url: ${linkMetadata.url}`);
|
||||
codeBlockTexts.push(`title: "${linkMetadata.title}"`);
|
||||
if (linkMetadata.description)
|
||||
codeBlockTexts.push(`description: "${linkMetadata.description}"`);
|
||||
if (linkMetadata.host)
|
||||
codeBlockTexts.push(`host: ${linkMetadata.host}`);
|
||||
if (linkMetadata.favicon)
|
||||
codeBlockTexts.push(`favicon: ${linkMetadata.favicon}`);
|
||||
if (linkMetadata.image)
|
||||
codeBlockTexts.push(`image: ${linkMetadata.image}`);
|
||||
codeBlockTexts.push("```\n");
|
||||
return codeBlockTexts.join("\n");
|
||||
}
|
||||
fetchLinkMetadata(url) {
|
||||
return __async(this, null, function* () {
|
||||
const res = yield (() => __async(this, null, function* () {
|
||||
try {
|
||||
return (0, import_obsidian2.requestUrl)({ url });
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
return;
|
||||
}
|
||||
}))();
|
||||
if (!res || res.status != 200) {
|
||||
console.log(`bad response. response status code was ${res == null ? void 0 : res.status}`);
|
||||
return;
|
||||
}
|
||||
const parser = new LinkMetadataParser(url, res.text);
|
||||
return parser.parse();
|
||||
});
|
||||
}
|
||||
createBlockHash() {
|
||||
let result = "";
|
||||
const characters = "abcdefghijklmnopqrstuvwxyz0123456789";
|
||||
const charactersLength = characters.length;
|
||||
for (let i = 0; i < 4; i++) {
|
||||
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
// src/code_block_processor.ts
|
||||
var import_obsidian3 = require("obsidian");
|
||||
|
||||
// src/errors.ts
|
||||
var YamlParseError = class extends Error {
|
||||
};
|
||||
var NoRequiredParamsError = class extends Error {
|
||||
};
|
||||
|
||||
// src/code_block_processor.ts
|
||||
var CodeBlockProcessor = class {
|
||||
constructor(app) {
|
||||
this.app = app;
|
||||
}
|
||||
run(source, el) {
|
||||
return __async(this, null, function* () {
|
||||
try {
|
||||
const data = this.parseLinkMetadataFromYaml(source);
|
||||
el.appendChild(this.genLinkEl(data));
|
||||
} catch (error) {
|
||||
if (error instanceof NoRequiredParamsError) {
|
||||
el.appendChild(this.genErrorEl(error.message));
|
||||
} else if (error instanceof YamlParseError) {
|
||||
el.appendChild(this.genErrorEl(error.message));
|
||||
} else if (error instanceof TypeError) {
|
||||
el.appendChild(this.genErrorEl("internal links must be surrounded by quotes."));
|
||||
console.log(error);
|
||||
} else {
|
||||
console.log("Code Block: cardlink unknown error", error);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
parseLinkMetadataFromYaml(source) {
|
||||
let yaml;
|
||||
let indent = -1;
|
||||
source = source.split(/\r?\n|\r|\n/g).map((line) => line.replace(/^\t+/g, (tabs) => {
|
||||
const n = tabs.length;
|
||||
if (indent < 0) {
|
||||
indent = n;
|
||||
}
|
||||
return " ".repeat(n);
|
||||
})).join("\n");
|
||||
try {
|
||||
yaml = (0, import_obsidian3.parseYaml)(source);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
throw new YamlParseError("failed to parse yaml. Check debug console for more detail.");
|
||||
}
|
||||
if (!yaml || !yaml.url || !yaml.title) {
|
||||
throw new NoRequiredParamsError("required params[url, title] are not found.");
|
||||
}
|
||||
return {
|
||||
url: yaml.url,
|
||||
title: yaml.title,
|
||||
description: yaml.description,
|
||||
host: yaml.host,
|
||||
favicon: yaml.favicon,
|
||||
image: yaml.image,
|
||||
indent
|
||||
};
|
||||
}
|
||||
genErrorEl(errorMsg) {
|
||||
const containerEl = document.createElement("div");
|
||||
containerEl.addClass("auto-card-link-error-container");
|
||||
const spanEl = document.createElement("span");
|
||||
spanEl.textContent = `cardlink error: ${errorMsg}`;
|
||||
containerEl.appendChild(spanEl);
|
||||
return containerEl;
|
||||
}
|
||||
genLinkEl(data) {
|
||||
const containerEl = document.createElement("div");
|
||||
containerEl.addClass("auto-card-link-container");
|
||||
containerEl.setAttr("data-auto-card-link-depth", data.indent);
|
||||
const cardEl = document.createElement("a");
|
||||
cardEl.addClass("auto-card-link-card");
|
||||
cardEl.setAttr("href", data.url);
|
||||
containerEl.appendChild(cardEl);
|
||||
const mainEl = document.createElement("div");
|
||||
mainEl.addClass("auto-card-link-main");
|
||||
cardEl.appendChild(mainEl);
|
||||
const titleEl = document.createElement("div");
|
||||
titleEl.addClass("auto-card-link-title");
|
||||
titleEl.textContent = data.title;
|
||||
mainEl.appendChild(titleEl);
|
||||
if (data.description) {
|
||||
const descriptionEl = document.createElement("div");
|
||||
descriptionEl.addClass("auto-card-link-description");
|
||||
descriptionEl.textContent = data.description;
|
||||
mainEl.appendChild(descriptionEl);
|
||||
}
|
||||
const hostEl = document.createElement("div");
|
||||
hostEl.addClass("auto-card-link-host");
|
||||
mainEl.appendChild(hostEl);
|
||||
if (data.favicon) {
|
||||
if (!CheckIf.isUrl(data.favicon))
|
||||
data.favicon = this.getLocalImagePath(data.favicon);
|
||||
const faviconEl = document.createElement("img");
|
||||
faviconEl.addClass("auto-card-link-favicon");
|
||||
faviconEl.setAttr("src", data.favicon);
|
||||
hostEl.appendChild(faviconEl);
|
||||
}
|
||||
if (data.host) {
|
||||
const hostNameEl = document.createElement("span");
|
||||
hostNameEl.textContent = data.host;
|
||||
hostEl.appendChild(hostNameEl);
|
||||
}
|
||||
if (data.image) {
|
||||
if (!CheckIf.isUrl(data.image))
|
||||
data.image = this.getLocalImagePath(data.image);
|
||||
const thumbnailEl = document.createElement("img");
|
||||
thumbnailEl.addClass("auto-card-link-thumbnail");
|
||||
thumbnailEl.setAttr("src", data.image);
|
||||
thumbnailEl.setAttr("draggable", "false");
|
||||
cardEl.appendChild(thumbnailEl);
|
||||
}
|
||||
new import_obsidian3.ButtonComponent(containerEl).setClass("auto-card-link-copy-url").setClass("clickable-icon").setIcon("copy").setTooltip(`Copy URL
|
||||
${data.url}`).onClick(() => {
|
||||
navigator.clipboard.writeText(data.url);
|
||||
new import_obsidian3.Notice("URL copied to your clipboard");
|
||||
});
|
||||
return containerEl;
|
||||
}
|
||||
getLocalImagePath(link) {
|
||||
var _a;
|
||||
link = link.slice(2, -2);
|
||||
const imageRelativePath = (_a = this.app.metadataCache.getFirstLinkpathDest((0, import_obsidian3.getLinkpath)(link), "")) == null ? void 0 : _a.path;
|
||||
if (!imageRelativePath)
|
||||
return link;
|
||||
return this.app.vault.adapter.getResourcePath(imageRelativePath);
|
||||
}
|
||||
};
|
||||
|
||||
// src/main.ts
|
||||
var ObsidianAutoCardLink = class extends import_obsidian4.Plugin {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.onPaste = (evt, editor) => __async(this, null, function* () {
|
||||
var _a;
|
||||
if (!((_a = this.settings) == null ? void 0 : _a.enhanceDefaultPaste))
|
||||
return;
|
||||
if (!navigator.onLine)
|
||||
return;
|
||||
if (evt.clipboardData == null)
|
||||
return;
|
||||
if (evt.clipboardData.files.length > 0)
|
||||
return;
|
||||
const clipboardText = evt.clipboardData.getData("text/plain");
|
||||
if (clipboardText == null || clipboardText == "")
|
||||
return;
|
||||
if (!CheckIf.isUrl(clipboardText) || CheckIf.isImage(clipboardText)) {
|
||||
return;
|
||||
}
|
||||
evt.stopPropagation();
|
||||
evt.preventDefault();
|
||||
const codeBlockGenerator = new CodeBlockGenerator(editor);
|
||||
yield codeBlockGenerator.convertUrlToCodeBlock(clipboardText);
|
||||
return;
|
||||
});
|
||||
this.onEditorMenu = (menu) => {
|
||||
var _a;
|
||||
if (!((_a = this.settings) == null ? void 0 : _a.showInMenuItem))
|
||||
return;
|
||||
menu.addItem((item) => {
|
||||
item.setTitle("Paste URL and enhance to card link").setIcon("paste").onClick(() => __async(this, null, function* () {
|
||||
const editor = this.getEditor();
|
||||
if (!editor)
|
||||
return;
|
||||
this.manualPasteAndEnhanceURL(editor);
|
||||
}));
|
||||
});
|
||||
if (!navigator.onLine)
|
||||
return;
|
||||
menu.addItem((item) => {
|
||||
item.setTitle("Enhance selected URL to card link").setIcon("link").onClick(() => {
|
||||
const editor = this.getEditor();
|
||||
if (!editor)
|
||||
return;
|
||||
this.enhanceSelectedURL(editor);
|
||||
});
|
||||
});
|
||||
return;
|
||||
};
|
||||
}
|
||||
onload() {
|
||||
return __async(this, null, function* () {
|
||||
yield this.loadSettings();
|
||||
this.registerMarkdownCodeBlockProcessor("cardlink", (source, el) => __async(this, null, function* () {
|
||||
const processor = new CodeBlockProcessor(this.app);
|
||||
yield processor.run(source, el);
|
||||
}));
|
||||
this.addCommand({
|
||||
id: "auto-card-link-paste-and-enhance",
|
||||
name: "Paste URL and enhance to card link",
|
||||
editorCallback: (editor) => __async(this, null, function* () {
|
||||
yield this.manualPasteAndEnhanceURL(editor);
|
||||
}),
|
||||
hotkeys: []
|
||||
});
|
||||
this.addCommand({
|
||||
id: "auto-card-link-enhance-selected-url",
|
||||
name: "Enhance selected URL to card link",
|
||||
editorCheckCallback: (checking, editor) => {
|
||||
if (!navigator.onLine)
|
||||
return false;
|
||||
if (checking)
|
||||
return true;
|
||||
this.enhanceSelectedURL(editor);
|
||||
},
|
||||
hotkeys: [
|
||||
{
|
||||
modifiers: ["Mod", "Shift"],
|
||||
key: "e"
|
||||
}
|
||||
]
|
||||
});
|
||||
this.registerEvent(this.app.workspace.on("editor-paste", this.onPaste));
|
||||
this.registerEvent(this.app.workspace.on("editor-menu", this.onEditorMenu));
|
||||
this.addSettingTab(new ObsidianAutoCardLinkSettingTab(this.app, this));
|
||||
});
|
||||
}
|
||||
enhanceSelectedURL(editor) {
|
||||
const selectedText = (EditorExtensions.getSelectedText(editor) || "").trim();
|
||||
const codeBlockGenerator = new CodeBlockGenerator(editor);
|
||||
for (const line of selectedText.split(/[\n ]/)) {
|
||||
if (CheckIf.isUrl(line)) {
|
||||
codeBlockGenerator.convertUrlToCodeBlock(line);
|
||||
} else if (CheckIf.isLinkedUrl(line)) {
|
||||
const url = this.getUrlFromLink(line);
|
||||
codeBlockGenerator.convertUrlToCodeBlock(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
manualPasteAndEnhanceURL(editor) {
|
||||
return __async(this, null, function* () {
|
||||
const clipboardText = yield navigator.clipboard.readText();
|
||||
if (clipboardText == null || clipboardText == "") {
|
||||
return;
|
||||
}
|
||||
if (!navigator.onLine) {
|
||||
editor.replaceSelection(clipboardText);
|
||||
return;
|
||||
}
|
||||
console.log(clipboardText);
|
||||
console.log(CheckIf.isUrl(clipboardText));
|
||||
if (!CheckIf.isUrl(clipboardText) || CheckIf.isImage(clipboardText)) {
|
||||
editor.replaceSelection(clipboardText);
|
||||
return;
|
||||
}
|
||||
const codeBlockGenerator = new CodeBlockGenerator(editor);
|
||||
yield codeBlockGenerator.convertUrlToCodeBlock(clipboardText);
|
||||
return;
|
||||
});
|
||||
}
|
||||
getEditor() {
|
||||
const view = this.app.workspace.getActiveViewOfType(import_obsidian4.MarkdownView);
|
||||
if (!view)
|
||||
return;
|
||||
return view.editor;
|
||||
}
|
||||
getUrlFromLink(link) {
|
||||
const urlRegex2 = new RegExp(linkRegex);
|
||||
const regExpExecArray = urlRegex2.exec(link);
|
||||
if (regExpExecArray === null || regExpExecArray.length < 2) {
|
||||
return "";
|
||||
}
|
||||
return regExpExecArray[2];
|
||||
}
|
||||
onunload() {
|
||||
console.log("unloading auto-card-link");
|
||||
}
|
||||
loadSettings() {
|
||||
return __async(this, null, function* () {
|
||||
this.settings = Object.assign({}, DEFAULT_SETTINGS, yield this.loadData());
|
||||
});
|
||||
}
|
||||
saveSettings() {
|
||||
return __async(this, null, function* () {
|
||||
yield this.saveData(this.settings);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/* nosourcemap */
|
10
.obsidian/plugins/auto-card-link/manifest.json
vendored
Normal file
10
.obsidian/plugins/auto-card-link/manifest.json
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "auto-card-link",
|
||||
"name": "Auto Card Link",
|
||||
"version": "1.2.3",
|
||||
"minAppVersion": "0.12.0",
|
||||
"description": "Automatically fetches metadata from a url and makes it as a card-styled link",
|
||||
"author": "Nekoshita Yuki",
|
||||
"authorUrl": "https://github.com/nekoshita",
|
||||
"isDesktopOnly": false
|
||||
}
|
180
.obsidian/plugins/auto-card-link/styles.css
vendored
Normal file
180
.obsidian/plugins/auto-card-link/styles.css
vendored
Normal file
@ -0,0 +1,180 @@
|
||||
.markdown-reading-view .block-language-cardlink {
|
||||
margin: var(--p-spacing) 0;
|
||||
}
|
||||
|
||||
.auto-card-link-container {
|
||||
container-type: inline-size;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
user-select: none;
|
||||
|
||||
--auto-card-link-button-width: calc(var(--icon-size) + var(--size-2-3));
|
||||
|
||||
--auto-card-link-indent-size: 2.5em;
|
||||
|
||||
&[data-auto-card-link-depth="0"] {
|
||||
margin-left: calc(var(--auto-card-link-indent-size) * 0);
|
||||
}
|
||||
&[data-auto-card-link-depth="1"] {
|
||||
margin-left: calc(var(--auto-card-link-indent-size) * 1);
|
||||
}
|
||||
&[data-auto-card-link-depth="2"] {
|
||||
margin-left: calc(var(--auto-card-link-indent-size) * 2);
|
||||
}
|
||||
&[data-auto-card-link-depth="3"] {
|
||||
margin-left: calc(var(--auto-card-link-indent-size) * 3);
|
||||
}
|
||||
&[data-auto-card-link-depth="4"] {
|
||||
margin-left: calc(var(--auto-card-link-indent-size) * 4);
|
||||
}
|
||||
&[data-auto-card-link-depth="5"] {
|
||||
margin-left: calc(var(--auto-card-link-indent-size) * 5);
|
||||
}
|
||||
&[data-auto-card-link-depth="6"] {
|
||||
margin-left: calc(var(--auto-card-link-indent-size) * 6);
|
||||
}
|
||||
&[data-auto-card-link-depth="7"] {
|
||||
margin-left: calc(var(--auto-card-link-indent-size) * 7);
|
||||
}
|
||||
}
|
||||
|
||||
@container (max-width: 300px) {
|
||||
.auto-card-link-thumbnail {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@container (max-width: 500px) {
|
||||
.auto-card-link-description {
|
||||
display: none;
|
||||
}
|
||||
.auto-card-link-thumbnail {
|
||||
max-width: 40% !important;
|
||||
}
|
||||
.auto-card-link-title {
|
||||
white-space: normal !important;
|
||||
--lh: 1.5em;
|
||||
line-height: var(--lh);
|
||||
height: calc(var(--lh) * 3);
|
||||
}
|
||||
}
|
||||
|
||||
.auto-card-link-error-container {
|
||||
max-width: 780px;
|
||||
margin: 1em auto;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background-color: var(--background-modifier-error);
|
||||
padding: 10px;
|
||||
font-family: var(--font-text);
|
||||
|
||||
&:hover {
|
||||
background: var(--background-modifier-error-hover);
|
||||
}
|
||||
}
|
||||
|
||||
.auto-card-link-card {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
height: 8em;
|
||||
transition: 20ms ease-in 0s;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
color: var(--link-external-color);
|
||||
background: var(--background-primary-alt);
|
||||
border: solid var(--border-width) var(--divider-color);
|
||||
border-radius: var(--radius-s);
|
||||
|
||||
&:hover {
|
||||
background: var(--background-modifier-hover);
|
||||
border-color: var(--background-modifier-hover);
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.auto-card-link-main {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
gap: 0.18em;
|
||||
padding: 0.5em 0.6em;
|
||||
overflow: hidden;
|
||||
text-align: left; /* necessary for ellipsis to work */
|
||||
}
|
||||
|
||||
.auto-card-link-title {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
&:hover {
|
||||
color: var(--link-external-color-hover)
|
||||
}
|
||||
|
||||
/* Prevent clash with edit block button */
|
||||
.is-live-preview .auto-card-link-container:hover &,
|
||||
.is-live-preview .block-language-cardlink:has(+ .edit-block-button:hover) & {
|
||||
margin-right: var(--auto-card-link-button-width);
|
||||
}
|
||||
}
|
||||
|
||||
.auto-card-link-description {
|
||||
overflow: hidden;
|
||||
--lh: 1.4em;
|
||||
line-height: var(--lh);
|
||||
height: calc(var(--lh) * 3);
|
||||
color: var(--text-muted);
|
||||
font-size: var(--font-smallest);
|
||||
}
|
||||
|
||||
.auto-card-link-host {
|
||||
font-size: var(--font-smallest);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
& span {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Prevent clash with copy url button */
|
||||
.auto-card-link-container:hover &,
|
||||
.is-mobile .auto-card-link-container & {
|
||||
margin-right: var(--auto-card-link-button-width);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--link-external-color-hover)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.auto-card-link-favicon {
|
||||
width: 16px !important;
|
||||
height: auto !important;
|
||||
margin: 0 0.5em 0 0 !important;
|
||||
}
|
||||
|
||||
.auto-card-link-thumbnail {
|
||||
width: unset !important;
|
||||
border-radius: var(--radius-s) 0 0 var(--radius-s) !important;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
max-width: 50% !important;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.auto-card-link-copy-url {
|
||||
position: absolute;
|
||||
right: var(--size-2-2);
|
||||
bottom: var(--size-2-2);
|
||||
z-index: 1;
|
||||
|
||||
/* Show copy button only on hover on desktop */
|
||||
.obsidian-app:not(.is-mobile) .auto-card-link-container:not(:hover) & {
|
||||
display: none;
|
||||
}
|
||||
}
|
175
.obsidian/plugins/execute-code/data.json
vendored
Normal file
175
.obsidian/plugins/execute-code/data.json
vendored
Normal file
@ -0,0 +1,175 @@
|
||||
{
|
||||
"releaseNote2_0_0wasShowed": true,
|
||||
"persistentOuput": false,
|
||||
"timeout": 10000,
|
||||
"allowInput": true,
|
||||
"wslMode": false,
|
||||
"shellWSLMode": false,
|
||||
"onlyCurrentBlock": false,
|
||||
"nodePath": "node",
|
||||
"nodeArgs": "",
|
||||
"jsFileExtension": "js",
|
||||
"jsInject": "",
|
||||
"tsPath": "ts-node",
|
||||
"tsArgs": "",
|
||||
"tsInject": "",
|
||||
"leanPath": "lean",
|
||||
"leanArgs": "",
|
||||
"leanInject": "",
|
||||
"luaPath": "lua",
|
||||
"luaArgs": "",
|
||||
"luaFileExtension": "lua",
|
||||
"luaInject": "",
|
||||
"dartPath": "dart",
|
||||
"dartArgs": "",
|
||||
"dartFileExtension": "dart",
|
||||
"dartInject": "",
|
||||
"csPath": "dotnet-script",
|
||||
"csArgs": "",
|
||||
"csFileExtension": "csx",
|
||||
"csInject": "",
|
||||
"pythonPath": "python",
|
||||
"pythonArgs": "",
|
||||
"pythonEmbedPlots": true,
|
||||
"pythonFileExtension": "py",
|
||||
"pythonInject": "",
|
||||
"shellPath": "bash",
|
||||
"shellArgs": "",
|
||||
"shellFileExtension": "sh",
|
||||
"shellInject": "",
|
||||
"batchPath": "call",
|
||||
"batchArgs": "",
|
||||
"batchFileExtension": "bat",
|
||||
"batchInject": "",
|
||||
"groovyPath": "groovy",
|
||||
"groovyArgs": "",
|
||||
"groovyFileExtension": "groovy",
|
||||
"groovyInject": "",
|
||||
"golangPath": "go",
|
||||
"golangArgs": "run",
|
||||
"golangFileExtension": "go",
|
||||
"goInject": "",
|
||||
"javaPath": "java",
|
||||
"javaArgs": "-ea",
|
||||
"javaFileExtension": "java",
|
||||
"javaInject": "",
|
||||
"maxPrologAnswers": 15,
|
||||
"prologInject": "",
|
||||
"powershellPath": "powershell",
|
||||
"powershellArgs": "-file",
|
||||
"powershellFileExtension": "ps1",
|
||||
"powershellInject": "$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding",
|
||||
"powershellEncoding": "latin1",
|
||||
"cargoPath": "cargo",
|
||||
"cargoEvalArgs": "",
|
||||
"rustInject": "",
|
||||
"cppRunner": "cling",
|
||||
"cppFileExtension": "cpp",
|
||||
"cppInject": "",
|
||||
"cppArgs": "",
|
||||
"cppUseMain": false,
|
||||
"clingPath": "cling",
|
||||
"clingArgs": "",
|
||||
"clingStd": "c++17",
|
||||
"rustFileExtension": "rs",
|
||||
"RPath": "Rscript",
|
||||
"RArgs": "",
|
||||
"REmbedPlots": true,
|
||||
"RFileExtension": "R",
|
||||
"rInject": "",
|
||||
"kotlinPath": "kotlinc",
|
||||
"kotlinArgs": "-script",
|
||||
"kotlinFileExtension": "kts",
|
||||
"kotlinInject": "",
|
||||
"swiftPath": "swift",
|
||||
"swiftArgs": "",
|
||||
"swiftFileExtension": "swift",
|
||||
"swiftInject": "",
|
||||
"runghcPath": "runghc",
|
||||
"ghcPath": "ghc",
|
||||
"ghciPath": "ghci",
|
||||
"useGhci": false,
|
||||
"haskellInject": "",
|
||||
"mathematicaPath": "wolframscript",
|
||||
"mathematicaArgs": "-file",
|
||||
"mathematicaFileExtension": "wls",
|
||||
"mathematicaInject": "",
|
||||
"scalaPath": "scala",
|
||||
"scalaArgs": "",
|
||||
"scalaFileExtension": "scala",
|
||||
"scalaInject": "",
|
||||
"racketPath": "racket",
|
||||
"racketArgs": "",
|
||||
"racketFileExtension": "rkt",
|
||||
"racketInject": "#lang racket",
|
||||
"fsharpPath": "dotnet",
|
||||
"fsharpArgs": "",
|
||||
"fsharpInject": "",
|
||||
"fsharpFileExtension": "fsx",
|
||||
"cArgs": "",
|
||||
"cUseMain": true,
|
||||
"cInject": "",
|
||||
"rubyPath": "ruby",
|
||||
"rubyArgs": "",
|
||||
"rubyFileExtension": "rb",
|
||||
"rubyInject": "",
|
||||
"sqlPath": "psql",
|
||||
"sqlArgs": "-d <database> -U <user> -f",
|
||||
"sqlInject": "",
|
||||
"octavePath": "octave",
|
||||
"octaveArgs": "-q",
|
||||
"octaveFileExtension": "m",
|
||||
"octaveInject": "figure('visible','off') # Necessary to embed plots",
|
||||
"maximaPath": "maxima",
|
||||
"maximaArgs": "-qb",
|
||||
"maximaFileExtension": "mx",
|
||||
"maximaInject": "",
|
||||
"applescriptPath": "osascript",
|
||||
"applescriptArgs": "",
|
||||
"applescriptFileExtension": "scpt",
|
||||
"applescriptInject": "",
|
||||
"zigPath": "zig",
|
||||
"zigArgs": "run",
|
||||
"zigInject": "",
|
||||
"ocamlPath": "ocaml",
|
||||
"ocamlArgs": "",
|
||||
"ocamlInject": "",
|
||||
"phpPath": "php",
|
||||
"phpArgs": "",
|
||||
"phpFileExtension": "php",
|
||||
"phpInject": "",
|
||||
"jsInteractive": true,
|
||||
"tsInteractive": false,
|
||||
"csInteractive": false,
|
||||
"leanInteractive": false,
|
||||
"luaInteractive": false,
|
||||
"dartInteractive": false,
|
||||
"pythonInteractive": true,
|
||||
"cppInteractive": false,
|
||||
"prologInteractive": false,
|
||||
"shellInteractive": false,
|
||||
"batchInteractive": false,
|
||||
"bashInteractive": false,
|
||||
"groovyInteractive": false,
|
||||
"rInteractive": false,
|
||||
"goInteractive": false,
|
||||
"rustInteractive": false,
|
||||
"javaInteractive": false,
|
||||
"powershellInteractive": false,
|
||||
"kotlinInteractive": false,
|
||||
"swiftInteractive": false,
|
||||
"mathematicaInteractive": false,
|
||||
"haskellInteractive": false,
|
||||
"scalaInteractive": false,
|
||||
"fsharpInteractive": false,
|
||||
"cInteractive": false,
|
||||
"racketInteractive": false,
|
||||
"rubyInteractive": false,
|
||||
"sqlInteractive": false,
|
||||
"octaveInteractive": false,
|
||||
"maximaInteractive": false,
|
||||
"applescriptInteractive": false,
|
||||
"zigInteractive": false,
|
||||
"ocamlInteractive": false,
|
||||
"phpInteractive": false
|
||||
}
|
13510
.obsidian/plugins/execute-code/main.js
vendored
Normal file
13510
.obsidian/plugins/execute-code/main.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
.obsidian/plugins/execute-code/manifest.json
vendored
Normal file
10
.obsidian/plugins/execute-code/manifest.json
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "execute-code",
|
||||
"name": "Execute Code",
|
||||
"version": "2.0.0",
|
||||
"minAppVersion": "1.7.2",
|
||||
"description": "Allows to execute code snippets within a note. Supported programming languages: C, CPP, Dart, Golang, Groovy, Kotlin, Java, JavaScript, TypeScript, Lean, Lua, CSharp, Prolog, Rust, Python, R, Ruby, Wolfram Mathematica, Haskell, Scala, Racket, F#, Batch, Shell & Powershell.",
|
||||
"author": "twibiral",
|
||||
"authorUrl": "https://www.github.com/twibiral",
|
||||
"isDesktopOnly": true
|
||||
}
|
242
.obsidian/plugins/execute-code/styles.css
vendored
Normal file
242
.obsidian/plugins/execute-code/styles.css
vendored
Normal file
@ -0,0 +1,242 @@
|
||||
/* @settings
|
||||
|
||||
name: Execute Code Settings
|
||||
id: obsidian-execute-code
|
||||
settings:
|
||||
-
|
||||
id: color-section-title
|
||||
title: Color Settings
|
||||
type: heading
|
||||
level: 3
|
||||
-
|
||||
id: use-custom-output-color
|
||||
title: Custom Code Output Color
|
||||
description: Use a custom color for the output of code blocks
|
||||
type: class-toggle
|
||||
default: false
|
||||
-
|
||||
id: code-output-text-color
|
||||
title: Output Text Color
|
||||
type: variable-color
|
||||
format: hex
|
||||
opacity: false
|
||||
default: '#FFFFFF'
|
||||
-
|
||||
id: use-custom-error-color
|
||||
title: Custom Code Error Color
|
||||
description: Use a custom color for the error output of code blocks
|
||||
type: class-toggle
|
||||
default: false
|
||||
-
|
||||
id: code-error-text-color
|
||||
title: Error Text Color
|
||||
type: variable-color
|
||||
format: hex
|
||||
opacity: false
|
||||
default: '#FF0000'
|
||||
*/
|
||||
|
||||
button.run-code-button {
|
||||
display: none;
|
||||
color: var(--text-muted);
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
margin: 5px;
|
||||
padding: 5px 20px 5px 20px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
button.clear-button {
|
||||
display: none;
|
||||
color: var(--text-muted);
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
margin: 5px;
|
||||
padding: 5px 20px 5px 20px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
pre:hover .run-code-button, pre:hover .clear-button {
|
||||
display: block;
|
||||
}
|
||||
|
||||
pre:hover .run-button-disabled, pre:hover .clear-button-disabled {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.run-button-disabled, .clear-button-disabled {
|
||||
display: none;
|
||||
}
|
||||
|
||||
pre:hover code.language-output {
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
|
||||
:not(.use-custom-output-color) code.language-output span.stdout {
|
||||
color: var(--text-muted) !important;
|
||||
}
|
||||
|
||||
.use-custom-output-color code.language-output span.stdout {
|
||||
color: var(--code-output-text-color) !important;
|
||||
}
|
||||
|
||||
:not(.use-custom-error-color) code.language-output span.stderr {
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
.use-custom-error-color code.language-output span.stderr {
|
||||
color: var(--code-error-text-color) !important;
|
||||
}
|
||||
|
||||
code.language-output hr {
|
||||
margin: 0 0 1em;
|
||||
}
|
||||
|
||||
.settings-code-input-box textarea, .settings-code-input-box input {
|
||||
min-width: 400px;
|
||||
min-height: 100px;
|
||||
font-family: monospace;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
input.interactive-stdin {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
.manage-executors-view h3 {
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
.manage-executors-view ul {
|
||||
margin: 1em;
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.manage-executors-view ul li {
|
||||
padding: 0.5em;
|
||||
background: var(--background-primary-alt);
|
||||
border-radius: 4px;
|
||||
display: grid;
|
||||
flex-direction: column;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.manage-executors-view small {
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.1ch;
|
||||
grid-row: 1;
|
||||
}
|
||||
|
||||
.manage-executors-view .filename {
|
||||
grid-row: 2;
|
||||
}
|
||||
|
||||
.manage-executors-view li button {
|
||||
grid-column: 2;
|
||||
grid-row: 1 / 3;
|
||||
margin: 0;
|
||||
padding: 0.25em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--text-muted);
|
||||
background: none;
|
||||
}
|
||||
|
||||
.manage-executors-view li button:hover {
|
||||
background: var(--background-tertiary);
|
||||
color: var(--icon-color-hover);
|
||||
}
|
||||
|
||||
.manage-executors-view > div {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.manage-executors-view .empty-state {
|
||||
color: var(--text-muted);
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.has-run-code-button {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.has-run-code-button pre {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.load-state-indicator {
|
||||
position: absolute;
|
||||
top: 0.1em;
|
||||
left: -2em;
|
||||
width: 2em;
|
||||
height: 2em;
|
||||
background: var(--background-primary-alt);
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
color: var(--tx1);
|
||||
transform: translateX(2em);
|
||||
transition: transform 0.25s, opacity 0.25s;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.load-state-indicator svg {
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
margin: 0.25em;
|
||||
}
|
||||
|
||||
.load-state-indicator.visible {
|
||||
transform: translateX(0);
|
||||
transform: translateX(var(--folding-offset, 0));
|
||||
opacity: 1;
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
.load-state-indicator::before {
|
||||
content: "";
|
||||
box-shadow: -1em 0 1em -0.75em inset var(--background-modifier-box-shadow);
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transform: translateX(-2em);
|
||||
opacity: 0;
|
||||
transition: transform 0.25s, opacity 0.25s;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.load-state-indicator.visible::before {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Hide code blocks with language-output only in markdown view using "markdown-preview-view"*/
|
||||
.markdown-preview-view pre.language-output {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.markdown-rendered pre.language-output {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Do not hide code block when exporting to PDF */
|
||||
@media print {
|
||||
pre.language-output {
|
||||
display: block;
|
||||
}
|
||||
/* Hide code blocks with language-output only in markdown view using "markdown-preview-view"*/
|
||||
.markdown-preview-view pre.language-output {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.markdown-rendered pre.language-output {
|
||||
display: block;
|
||||
}
|
||||
}
|
3637
.obsidian/plugins/highlightr-plugin/main.js
vendored
3637
.obsidian/plugins/highlightr-plugin/main.js
vendored
File diff suppressed because one or more lines are too long
@ -1,10 +0,0 @@
|
||||
{
|
||||
"id": "highlightr-plugin",
|
||||
"name": "Highlightr",
|
||||
"version": "1.2.2",
|
||||
"minAppVersion": "0.12.8",
|
||||
"description": "A minimal and aesthetically pleasing highlighting menu that makes color-coded highlighting much easier with a configurable assortment of highlight colors 🎨.",
|
||||
"author": "chetachi",
|
||||
"authorUrl": "https://github.com/chetachiezikeuzor",
|
||||
"isDesktopOnly": false
|
||||
}
|
774
.obsidian/plugins/highlightr-plugin/styles.css
vendored
774
.obsidian/plugins/highlightr-plugin/styles.css
vendored
@ -1,774 +0,0 @@
|
||||
/*highlighter style*/
|
||||
/*lowlight*/
|
||||
.highlightr-lowlight mark,
|
||||
.highlightr-lowlight span.cm-highlight,
|
||||
.highlightr-lowlight .markdown-preview-view mark {
|
||||
--lowlight-background: var(--background-primary);
|
||||
border-radius: 0;
|
||||
background-image: linear-gradient(
|
||||
360deg,
|
||||
rgba(255, 255, 255, 0) 40%,
|
||||
var(--lowlight-background) 40%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.highlightr-lowlight .workspace-split.mod-left-split mark,
|
||||
.highlightr-lowlight .workspace-split.mod-left-split span.cm-highlight,
|
||||
.highlightr-lowlight
|
||||
.workspace-split.mod-left-split
|
||||
.markdown-preview-view
|
||||
mark,
|
||||
.highlightr-lowlight .workspace-split.mod-right-split mark,
|
||||
.highlightr-lowlight .workspace-split.mod-right-split span.cm-highlight,
|
||||
.highlightr-lowlight
|
||||
.workspace-split.mod-right-split
|
||||
.markdown-preview-view
|
||||
mark {
|
||||
--lowlight-background: var(--background-secondary);
|
||||
}
|
||||
|
||||
.highlightr-lowlight .admonition-content mark,
|
||||
.highlightr-lowlight .admonition-content span.cm-highlight,
|
||||
.highlightr-lowlight .admonition-content > .markdown-preview-view mark {
|
||||
--lowlight-background: var(--background-primary-alt);
|
||||
}
|
||||
|
||||
/*floating*/
|
||||
.highlightr-floating mark,
|
||||
.highlightr-floating span.cm-highlight,
|
||||
.highlightr-floating .markdown-preview-view mark {
|
||||
--floating-background: var(--background-primary);
|
||||
border-radius: 0;
|
||||
padding-bottom: 5px;
|
||||
background-image: linear-gradient(
|
||||
360deg,
|
||||
rgba(255, 255, 255, 0) 28%,
|
||||
var(--floating-background) 28%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.highlightr-floating .workspace-split.mod-left-split mark,
|
||||
.highlightr-floating .workspace-split.mod-left-split span.cm-highlight,
|
||||
.highlightr-floating
|
||||
.workspace-split.mod-left-split
|
||||
.markdown-preview-view
|
||||
mark,
|
||||
.highlightr-floating .workspace-split.mod-right-split mark,
|
||||
.highlightr-floating .workspace-split.mod-right-split span.cm-highlight,
|
||||
.highlightr-floating
|
||||
.workspace-split.mod-right-split
|
||||
.markdown-preview-view
|
||||
mark {
|
||||
--floating-background: var(--background-secondary);
|
||||
}
|
||||
|
||||
.highlightr-floating .admonition-content mark,
|
||||
.highlightr-floating .admonition-content span.cm-highlight,
|
||||
.highlightr-floating .admonition-content > .markdown-preview-view mark {
|
||||
--floating-background: var(--background-primary-alt);
|
||||
}
|
||||
|
||||
/*rounded*/
|
||||
.highlightr-rounded mark,
|
||||
.highlightr-rounded .markdown-preview-view mark {
|
||||
margin: 0 -0.05em;
|
||||
padding: 0.125em 0.15em;
|
||||
border-radius: 0.2em;
|
||||
-webkit-box-decoration-break: clone;
|
||||
box-decoration-break: clone;
|
||||
}
|
||||
|
||||
.highlightr-rounded span.cm-highlight {
|
||||
border-radius: 0.2em;
|
||||
-webkit-box-decoration-break: clone;
|
||||
box-decoration-break: clone;
|
||||
}
|
||||
|
||||
.highlightr-rounded .cm-s-obsidian span.cm-highlight {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.highlightr-rounded .cm-highlight + span.cm-formatting-highlight {
|
||||
padding-left: 0em;
|
||||
padding-right: 0.15em;
|
||||
-webkit-box-decoration-break: clone;
|
||||
box-decoration-break: clone;
|
||||
}
|
||||
|
||||
/*realistic*/
|
||||
.highlightr-realistic mark,
|
||||
.highlightr-realistic .markdown-preview-view mark {
|
||||
margin: 0 -0.05em;
|
||||
padding: 0.1em 0.4em;
|
||||
border-radius: 0.8em 0.3em;
|
||||
-webkit-box-decoration-break: clone;
|
||||
box-decoration-break: clone;
|
||||
text-shadow: 0 0 0.75em var(--background-primary-alt);
|
||||
}
|
||||
|
||||
.highlightr-realistic.hide-tokens .cm-s-obsidian span.cm-highlight,
|
||||
.hide-tokens.highlightr-realistic .cm-s-obsidian span.cm-highlight {
|
||||
border-radius: 0.8em 0.3em;
|
||||
}
|
||||
|
||||
.highlightr-realistic .cm-s-obsidian span.cm-highlight {
|
||||
padding: 0.15em 0.25em;
|
||||
-webkit-box-decoration-break: clone;
|
||||
box-decoration-break: clone;
|
||||
text-shadow: 0 0 0.75em var(--background-primary-alt);
|
||||
}
|
||||
|
||||
.highlightr-realistic .cm-s-obsidian span.cm-formatting-highlight {
|
||||
margin: 0 0 0 -0.05em;
|
||||
padding: 0.15em 0.25em;
|
||||
border-radius: 0.8em 0 0 0.3em;
|
||||
-webkit-box-decoration-break: clone;
|
||||
box-decoration-break: clone;
|
||||
}
|
||||
|
||||
.highlightr-realistic
|
||||
.cm-s-obsidian
|
||||
.cm-highlight
|
||||
+ span.cm-formatting-highlight {
|
||||
margin: 0 -0.05em 0 0;
|
||||
padding: 0.15em 0.25em;
|
||||
border-radius: 0 0.3em 0.8em 0;
|
||||
-webkit-box-decoration-break: clone;
|
||||
box-decoration-break: clone;
|
||||
}
|
||||
|
||||
/**/
|
||||
|
||||
button.copy-highlights {
|
||||
padding: 4px 14px;
|
||||
border-radius: 5px;
|
||||
background-color: var(--interactive-accent);
|
||||
}
|
||||
|
||||
.copy-highlights svg {
|
||||
width: 1.3em;
|
||||
height: 1.3em;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
details summary.highlight-summary:before {
|
||||
width: 2em;
|
||||
height: 2em;
|
||||
content: "☐";
|
||||
font-size: 9px;
|
||||
cursor: pointer;
|
||||
margin-right: 5px;
|
||||
display: inline-block;
|
||||
vertical-align: 0.05em;
|
||||
background-color: currentColor;
|
||||
-webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="black" d="M10.707 17.707L16.414 12l-5.707-5.707l-1.414 1.414L13.586 12l-4.293 4.293z"></path></svg>');
|
||||
}
|
||||
|
||||
details[open] summary.highlight-summary::before {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
/*highlightr component*/
|
||||
|
||||
@keyframes fade {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
20% {
|
||||
opacity: 0.9;
|
||||
}
|
||||
40% {
|
||||
opacity: 0.95;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.menu.highlighterContainer {
|
||||
min-width: 140px;
|
||||
max-width: 225px;
|
||||
max-height: 180px;
|
||||
padding-left: 0em;
|
||||
padding: 0;
|
||||
margin: 0 auto;
|
||||
border-radius: 6px;
|
||||
font-size: 14px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
position: fixed;
|
||||
animation: fade 300ms ease-in-out;
|
||||
background-color: var(--background-primary);
|
||||
box-shadow: 0px 3px 25px rgba(31, 38, 135, 0.1);
|
||||
border: 1px solid var(--background-modifier-border);
|
||||
}
|
||||
|
||||
.menu.highlighterContainer .menu-item .menu-item-icon {
|
||||
display: inline-block;
|
||||
width: 25px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
.menu.highlighterContainer .menu-item {
|
||||
display: flex;
|
||||
padding: 2px 14px 3px 14px;
|
||||
align-items: unset;
|
||||
margin: auto;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
height: 32px;
|
||||
line-height: 31px;
|
||||
white-space: nowrap;
|
||||
border-radius: 0;
|
||||
border-bottom: 1px solid var(--background-modifier-border);
|
||||
}
|
||||
|
||||
.menu.highlighterContainer .menu-item:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------
|
||||
SETTINGS TAB
|
||||
----------------------------------------------------------------*/
|
||||
|
||||
button.HighlightrSettingsButton {
|
||||
padding: 4px 14px;
|
||||
border-radius: 6px;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
button.HighlightrSettingsButton svg {
|
||||
width: 1.3em;
|
||||
height: 1.3em;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.highlighter-settings-color,
|
||||
.highlighter-settings-value {
|
||||
width: 42%;
|
||||
color: var(--text-normal);
|
||||
}
|
||||
|
||||
.highlighterplugin-setting-item {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.highlighterplugin-setting-item .setting-item-control {
|
||||
justify-content: space-between;
|
||||
margin-top: 12px;
|
||||
align-content: center;
|
||||
align-items: flex-end;
|
||||
grid-gap: 6px;
|
||||
}
|
||||
|
||||
.modal.mod-settings
|
||||
button:not(.mod-cta):not(.mod-warning).HighlightrSettingsButton.HighlightrSettingsButtonAdd,
|
||||
button:not(.mod-cta):not(.mod-warning).HighlightrSettingsButton.HighlightrSettingsButtonAdd {
|
||||
background-color: var(--interactive-accent);
|
||||
}
|
||||
|
||||
.modal.mod-settings
|
||||
button:not(.mod-cta):not(.mod-warning).HighlightrSettingsButton.HighlightrSettingsButtonDelete,
|
||||
button:not(.mod-cta):not(.mod-warning).HighlightrSettingsButton.HighlightrSettingsButtonDelete {
|
||||
background-color: #989cab;
|
||||
}
|
||||
|
||||
/**/
|
||||
.highlighter-setting-icon {
|
||||
display: flex;
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.highlighter-item-draggable {
|
||||
cursor: grab;
|
||||
display: grid;
|
||||
grid-gap: 8px;
|
||||
grid-template-columns: 0.5fr 7fr;
|
||||
align-items: center;
|
||||
border-top: 1px solid var(--background-modifier-border);
|
||||
}
|
||||
|
||||
.HighlightrSettingsTabsContainer {
|
||||
border-bottom: 1px solid var(--background-modifier-border);
|
||||
}
|
||||
|
||||
.setting-item.highlighter-setting-item:first-child {
|
||||
padding-top: 18px;
|
||||
}
|
||||
|
||||
.highlighter-setting-item {
|
||||
padding: 18px 0 18px 0;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.highlighter-sortable-fallback {
|
||||
cursor: grabbing;
|
||||
box-shadow: 0px 3px 32px rgb(31 38 135 / 15%);
|
||||
}
|
||||
|
||||
.highlighter-sortable-grab {
|
||||
cursor: grabbing !important;
|
||||
}
|
||||
|
||||
.highlighter-sortable-ghost {
|
||||
opacity: 0.4;
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.highlighter-sortable-chosen {
|
||||
cursor: grabbing;
|
||||
padding: 0 0 0 18px;
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
|
||||
.highlighter-sortable-drag {
|
||||
cursor: grabbing;
|
||||
box-shadow: 0px 3px 32px rgb(31 38 135 / 15%);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------
|
||||
HIGHLIGHTR SUPPORT
|
||||
----------------------------------------------------------------*/
|
||||
|
||||
.hltrDonationSection {
|
||||
width: 65%;
|
||||
height: 50vh;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
color: var(--text-normal);
|
||||
}
|
||||
|
||||
.pcr-app .pcr-swatches > button {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.pickr .pcr-button {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.themed-color-wrapper > div {
|
||||
background: var(--background-primary);
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.themed-color-wrapper > div + div {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.themed-color-wrapper button {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.themed-color-wrapper .pickr-reset > button {
|
||||
margin: 0 0 0 10px;
|
||||
padding: 9px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.themed-color-wrapper .pickr-reset > button > svg {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------
|
||||
PICKR 1.8.2 MIT | https://github.com/Simonwep/pickr
|
||||
----------------------------------------------------------------*/
|
||||
.pickr {
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
transform: translateY(0);
|
||||
}
|
||||
.pickr * {
|
||||
box-sizing: border-box;
|
||||
outline: none;
|
||||
border: none;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
.pickr .pcr-button {
|
||||
position: relative;
|
||||
height: 2em;
|
||||
width: 2em;
|
||||
padding: 0.5em;
|
||||
cursor: pointer;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
|
||||
"Helvetica Neue", Arial, sans-serif;
|
||||
border-radius: 0.15em;
|
||||
background: url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" stroke="%2342445A" stroke-width="5px" stroke-linecap="round"><path d="M45,45L5,5"></path><path d="M45,5L5,45"></path></svg>')
|
||||
no-repeat center;
|
||||
background-size: 0;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.pickr .pcr-button::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2"><path fill="white" d="M1,0H2V1H1V0ZM0,1H1V2H0V1Z"/><path fill="gray" d="M0,0H1V1H0V0ZM1,1H2V2H1V1Z"/></svg>');
|
||||
background-size: 0.5em;
|
||||
border-radius: 0.15em;
|
||||
z-index: -1;
|
||||
}
|
||||
.pickr .pcr-button::before {
|
||||
z-index: initial;
|
||||
}
|
||||
.pickr .pcr-button::after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
transition: background 0.3s;
|
||||
background: var(--pcr-color);
|
||||
border-radius: 0.15em;
|
||||
}
|
||||
.pickr .pcr-button.clear {
|
||||
background-size: 70%;
|
||||
}
|
||||
.pickr .pcr-button.clear::before {
|
||||
opacity: 0;
|
||||
}
|
||||
.pickr .pcr-button.clear:focus {
|
||||
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85), 0 0 0 3px var(--pcr-color);
|
||||
}
|
||||
.pickr .pcr-button.disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.pickr *,
|
||||
.pcr-app * {
|
||||
box-sizing: border-box;
|
||||
outline: none;
|
||||
border: none;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
.pickr input:focus,
|
||||
.pickr input.pcr-active,
|
||||
.pickr button:focus,
|
||||
.pickr button.pcr-active,
|
||||
.pcr-app input:focus,
|
||||
.pcr-app input.pcr-active,
|
||||
.pcr-app button:focus,
|
||||
.pcr-app button.pcr-active {
|
||||
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85), 0 0 0 3px var(--pcr-color);
|
||||
}
|
||||
.pickr .pcr-palette,
|
||||
.pickr .pcr-slider,
|
||||
.pcr-app .pcr-palette,
|
||||
.pcr-app .pcr-slider {
|
||||
transition: box-shadow 0.3s;
|
||||
}
|
||||
.pickr .pcr-palette:focus,
|
||||
.pickr .pcr-slider:focus,
|
||||
.pcr-app .pcr-palette:focus,
|
||||
.pcr-app .pcr-slider:focus {
|
||||
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85), 0 0 0 3px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.pcr-app {
|
||||
position: fixed;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
z-index: 10000;
|
||||
border-radius: 0.1em;
|
||||
background: #fff;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.3s, visibility 0s 0.3s;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
|
||||
"Helvetica Neue", Arial, sans-serif;
|
||||
box-shadow: 0 0.15em 1.5em 0 rgba(0, 0, 0, 0.1), 0 0 1em 0 rgba(0, 0, 0, 0.03);
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.pcr-app.visible {
|
||||
transition: opacity 0.3s;
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
.pcr-app .pcr-swatches {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 0.75em;
|
||||
}
|
||||
.pcr-app .pcr-swatches.pcr-last {
|
||||
margin: 0;
|
||||
}
|
||||
@supports (display: grid) {
|
||||
.pcr-app .pcr-swatches {
|
||||
display: grid;
|
||||
align-items: center;
|
||||
grid-template-columns: repeat(auto-fit, 1.75em);
|
||||
}
|
||||
}
|
||||
.pcr-app .pcr-swatches > button {
|
||||
font-size: 1em;
|
||||
position: relative;
|
||||
width: calc(1.75em - 5px);
|
||||
height: calc(1.75em - 5px);
|
||||
border-radius: 0.15em;
|
||||
cursor: pointer;
|
||||
margin: 2.5px;
|
||||
flex-shrink: 0;
|
||||
justify-self: center;
|
||||
transition: all 0.15s;
|
||||
overflow: hidden;
|
||||
background: transparent;
|
||||
z-index: 1;
|
||||
}
|
||||
.pcr-app .pcr-swatches > button::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2"><path fill="white" d="M1,0H2V1H1V0ZM0,1H1V2H0V1Z"/><path fill="gray" d="M0,0H1V1H0V0ZM1,1H2V2H1V1Z"/></svg>');
|
||||
background-size: 6px;
|
||||
border-radius: 0.15em;
|
||||
z-index: -1;
|
||||
}
|
||||
.pcr-app .pcr-swatches > button::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: var(--pcr-color);
|
||||
border: 1px solid rgba(0, 0, 0, 0.05);
|
||||
border-radius: 0.15em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.pcr-app .pcr-swatches > button:hover {
|
||||
filter: brightness(1.05);
|
||||
}
|
||||
.pcr-app .pcr-swatches > button:not(.pcr-active) {
|
||||
box-shadow: none;
|
||||
}
|
||||
.pcr-app .pcr-interaction {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
margin: 0 -0.2em 0 -0.2em;
|
||||
}
|
||||
.pcr-app .pcr-interaction > * {
|
||||
margin: 0 0.2em;
|
||||
}
|
||||
.pcr-app .pcr-interaction input {
|
||||
letter-spacing: 0.07em;
|
||||
font-size: 0.75em;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
color: #75797e;
|
||||
background: #f1f3f4;
|
||||
border-radius: 0.15em;
|
||||
transition: all 0.15s;
|
||||
padding: 0.45em 0.5em;
|
||||
margin-top: 0.75em;
|
||||
}
|
||||
.pcr-app .pcr-interaction input:hover {
|
||||
filter: brightness(0.975);
|
||||
}
|
||||
.pcr-app .pcr-interaction input:focus {
|
||||
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85),
|
||||
0 0 0 3px rgba(66, 133, 244, 0.75);
|
||||
}
|
||||
.pcr-app .pcr-interaction .pcr-result {
|
||||
color: #75797e;
|
||||
text-align: left;
|
||||
flex: 1 1 8em;
|
||||
min-width: 8em;
|
||||
transition: all 0.2s;
|
||||
border-radius: 0.15em;
|
||||
background: #f1f3f4;
|
||||
cursor: text;
|
||||
}
|
||||
.pcr-app .pcr-interaction .pcr-result::-moz-selection {
|
||||
background: #4285f4;
|
||||
color: #fff;
|
||||
}
|
||||
.pcr-app .pcr-interaction .pcr-result::selection {
|
||||
background: #4285f4;
|
||||
color: #fff;
|
||||
}
|
||||
.pcr-app .pcr-interaction .pcr-type.active {
|
||||
color: #fff;
|
||||
background: #4285f4;
|
||||
}
|
||||
.pcr-app .pcr-interaction .pcr-save,
|
||||
.pcr-app .pcr-interaction .pcr-cancel,
|
||||
.pcr-app .pcr-interaction .pcr-clear {
|
||||
color: #fff;
|
||||
width: auto;
|
||||
}
|
||||
.pcr-app .pcr-interaction .pcr-save,
|
||||
.pcr-app .pcr-interaction .pcr-cancel,
|
||||
.pcr-app .pcr-interaction .pcr-clear {
|
||||
color: #fff;
|
||||
}
|
||||
.pcr-app .pcr-interaction .pcr-save:hover,
|
||||
.pcr-app .pcr-interaction .pcr-cancel:hover,
|
||||
.pcr-app .pcr-interaction .pcr-clear:hover {
|
||||
filter: brightness(0.925);
|
||||
}
|
||||
.pcr-app .pcr-interaction .pcr-save {
|
||||
background: #4285f4;
|
||||
}
|
||||
.pcr-app .pcr-interaction .pcr-clear,
|
||||
.pcr-app .pcr-interaction .pcr-cancel {
|
||||
background: #f44250;
|
||||
}
|
||||
.pcr-app .pcr-interaction .pcr-clear:focus,
|
||||
.pcr-app .pcr-interaction .pcr-cancel:focus {
|
||||
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85),
|
||||
0 0 0 3px rgba(244, 66, 80, 0.75);
|
||||
}
|
||||
.pcr-app .pcr-selection .pcr-picker {
|
||||
position: absolute;
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
border: 2px solid #fff;
|
||||
border-radius: 100%;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.pcr-app .pcr-selection .pcr-color-palette,
|
||||
.pcr-app .pcr-selection .pcr-color-chooser,
|
||||
.pcr-app .pcr-selection .pcr-color-opacity {
|
||||
position: relative;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
cursor: grab;
|
||||
cursor: -webkit-grab;
|
||||
}
|
||||
.pcr-app .pcr-selection .pcr-color-palette:active,
|
||||
.pcr-app .pcr-selection .pcr-color-chooser:active,
|
||||
.pcr-app .pcr-selection .pcr-color-opacity:active {
|
||||
cursor: grabbing;
|
||||
cursor: -webkit-grabbing;
|
||||
}
|
||||
.pcr-app[data-theme="nano"] {
|
||||
width: 14.25em;
|
||||
max-width: 95vw;
|
||||
}
|
||||
.pcr-app[data-theme="nano"] .pcr-swatches {
|
||||
margin-top: 0.6em;
|
||||
padding: 0 0.6em;
|
||||
}
|
||||
.pcr-app[data-theme="nano"] .pcr-interaction {
|
||||
padding: 0 0.6em 0.6em 0.6em;
|
||||
}
|
||||
.pcr-app[data-theme="nano"] .pcr-selection {
|
||||
display: grid;
|
||||
grid-gap: 0.6em;
|
||||
grid-template-columns: 1fr 4fr;
|
||||
grid-template-rows: 5fr auto auto;
|
||||
align-items: center;
|
||||
height: 10.5em;
|
||||
width: 100%;
|
||||
align-self: flex-start;
|
||||
}
|
||||
.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-preview {
|
||||
grid-area: 2 / 1 / 4 / 1;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
margin-left: 0.6em;
|
||||
}
|
||||
.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-preview .pcr-last-color {
|
||||
display: none;
|
||||
}
|
||||
.pcr-app[data-theme="nano"]
|
||||
.pcr-selection
|
||||
.pcr-color-preview
|
||||
.pcr-current-color {
|
||||
position: relative;
|
||||
background: var(--pcr-color);
|
||||
width: 2em;
|
||||
height: 2em;
|
||||
border-radius: 50em;
|
||||
overflow: hidden;
|
||||
}
|
||||
.pcr-app[data-theme="nano"]
|
||||
.pcr-selection
|
||||
.pcr-color-preview
|
||||
.pcr-current-color::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2"><path fill="white" d="M1,0H2V1H1V0ZM0,1H1V2H0V1Z"/><path fill="gray" d="M0,0H1V1H0V0ZM1,1H2V2H1V1Z"/></svg>');
|
||||
background-size: 0.5em;
|
||||
border-radius: 0.15em;
|
||||
z-index: -1;
|
||||
}
|
||||
.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-palette {
|
||||
grid-area: 1 / 1 / 2 / 3;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-palette .pcr-palette {
|
||||
border-radius: 0.15em;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.pcr-app[data-theme="nano"]
|
||||
.pcr-selection
|
||||
.pcr-color-palette
|
||||
.pcr-palette::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2"><path fill="white" d="M1,0H2V1H1V0ZM0,1H1V2H0V1Z"/><path fill="gray" d="M0,0H1V1H0V0ZM1,1H2V2H1V1Z"/></svg>');
|
||||
background-size: 0.5em;
|
||||
border-radius: 0.15em;
|
||||
z-index: -1;
|
||||
}
|
||||
.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-chooser {
|
||||
grid-area: 2 / 2 / 2 / 2;
|
||||
}
|
||||
.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-opacity {
|
||||
grid-area: 3 / 2 / 3 / 2;
|
||||
}
|
||||
.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-chooser,
|
||||
.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-opacity {
|
||||
height: 0.5em;
|
||||
margin: 0 0.6em;
|
||||
}
|
||||
.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-chooser .pcr-picker,
|
||||
.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-opacity .pcr-picker {
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-chooser .pcr-slider,
|
||||
.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-opacity .pcr-slider {
|
||||
flex-grow: 1;
|
||||
border-radius: 50em;
|
||||
}
|
||||
.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-chooser .pcr-slider {
|
||||
background: linear-gradient(to right, red, #ff0, lime, cyan, blue, #f0f, red);
|
||||
}
|
||||
.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-opacity .pcr-slider {
|
||||
background: linear-gradient(to right, transparent, black),
|
||||
url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2"><path fill="white" d="M1,0H2V1H1V0ZM0,1H1V2H0V1Z"/><path fill="gray" d="M0,0H1V1H0V0ZM1,1H2V2H1V1Z"/></svg>');
|
||||
background-size: 100%, 0.25em;
|
||||
}
|
43
.obsidian/workspace.json
vendored
43
.obsidian/workspace.json
vendored
@ -10,18 +10,39 @@
|
||||
{
|
||||
"id": "a4aecbf974137286",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "kanban",
|
||||
"state": {
|
||||
"file": "任务.md",
|
||||
"kanbanViewState": {
|
||||
"kanban-plugin": "board",
|
||||
"list-collapse": [
|
||||
false,
|
||||
false,
|
||||
false
|
||||
]
|
||||
}
|
||||
},
|
||||
"icon": "lucide-trello",
|
||||
"title": "任务"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "8f9cf073a3063443",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "4. 存档/PARA 组织法.md",
|
||||
"file": "4. 存档/插件效果 实验测试页.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "PARA 组织法"
|
||||
"title": "插件效果 实验测试页"
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"currentTab": 1
|
||||
}
|
||||
],
|
||||
"direction": "vertical"
|
||||
@ -112,12 +133,12 @@
|
||||
"state": {
|
||||
"type": "outgoing-link",
|
||||
"state": {
|
||||
"file": "4. 存档/PARA 组织法.md",
|
||||
"file": "4. 存档/插件效果 实验测试页.md",
|
||||
"linksCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-going-out",
|
||||
"title": "PARA 组织法 的出链列表"
|
||||
"title": "插件效果 实验测试页 的出链列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -139,10 +160,10 @@
|
||||
"state": {
|
||||
"type": "outline",
|
||||
"state": {
|
||||
"file": "4. 存档/PARA 组织法.md"
|
||||
"file": "4. 存档/插件效果 实验测试页.md"
|
||||
},
|
||||
"icon": "lucide-list",
|
||||
"title": "PARA 组织法 的大纲"
|
||||
"title": "插件效果 实验测试页 的大纲"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -175,14 +196,14 @@
|
||||
"obsidian-git:Open Git source control": false
|
||||
}
|
||||
},
|
||||
"active": "a4aecbf974137286",
|
||||
"active": "6497486430fd2d6d",
|
||||
"lastOpenFiles": [
|
||||
"主页.canvas",
|
||||
"任务.md",
|
||||
"4. 存档/插件效果 实验测试页.md",
|
||||
"3. 资源/PARA 组织法.md",
|
||||
"主页.canvas",
|
||||
"2024-12-26.md",
|
||||
"未命名看板.md",
|
||||
"4. 存档/PARA 组织法.md",
|
||||
"未命名.md",
|
||||
"1. 项目/未命名.canvas",
|
||||
"欢迎.md",
|
||||
"5. 表达",
|
||||
|
10
4. 存档/插件效果 实验测试页.md
Normal file
10
4. 存档/插件效果 实验测试页.md
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
```cardlink
|
||||
url: https://xjyofc.top
|
||||
title: "仙君御"
|
||||
description: "这里是一个普通人建的小站,努力分享自己收藏的知识资源,帮助更多人节省时间注册用户一起来共同进步吧!"
|
||||
host: xjyofc.top
|
||||
favicon: https://xjyofc.top/upload/头像.webp
|
||||
image: https://xjyofc.top/upload/头像.webp
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user