1
0

Add .obisidan so we can share between machines.

This commit is contained in:
2025-12-09 15:52:10 +01:00
parent 81790199af
commit 17475e6955
41 changed files with 33630 additions and 2 deletions

View File

@@ -0,0 +1,53 @@
/*
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);
// main.ts
var main_exports = {};
__export(main_exports, {
default: () => SpoilerBlock
});
module.exports = __toCommonJS(main_exports);
var import_obsidian = require("obsidian");
var SpoilerBlock = class extends import_obsidian.Plugin {
async onload() {
console.log("reload");
this.registerMarkdownCodeBlockProcessor("spoiler-block", (source, el, _) => {
const container = el.createEl("div");
container.className = "spoiler";
const rows = source.split("\n");
for (let row of rows)
container.createEl("div", { text: row });
container.addEventListener("click", () => {
if (container.className === "spoiler")
container.className = "spoiler-show";
});
container.addEventListener("dblclick", () => {
if (container.className === "spoiler-show")
container.className = "spoiler";
});
});
}
};
/* nosourcemap */

View File

@@ -0,0 +1,10 @@
{
"id": "spoiler-block-obsidian",
"name": "Spoiler Block",
"version": "1.0.0",
"minAppVersion": "0.15.0",
"description": "Create Spoiler Blocks to hide information until you want to see it",
"author": "AllJavi",
"authorUrl": "https://github.com/AllJavi",
"isDesktopOnly": false
}

View File

@@ -0,0 +1,42 @@
.spoiler, .spoiler-show {
transition: all .3s;
position: relative;
color: transparent;
text-shadow: 0 0 12px var(--text-normal);
padding: .8em;
cursor: pointer;
background-color: var(--background-secondary);
border-radius: 4px;
user-select: none;
}
.spoiler-show {
text-shadow: 0 0 0 transparent !important;
color: var(--text-normal) !important;
user-select: auto !important;
cursor: auto !important;
}
.spoiler::before, .spoiler::after {
display: block;
position: absolute;
font-weight: 500;
color: var(--text-accent);
text-align: center;
text-shadow: none;
transition: all .3s;
content: 'CLICK TO SHOW';
opacity: 0;
left: 0;
right: 0;
transform: translateY(-50%);
top: 50%;
}
.spoiler:hover:before {
opacity: 1;
}
.spoiler:hover {
text-shadow: 0 0 14px var(--text-normal);
}