parent
542fe9c694
commit
5356323211
File diff suppressed because one or more lines are too long
@ -1,642 +0,0 @@
|
|||||||
/*
|
|
||||||
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 __commonJS = (cb, mod) => function __require() {
|
|
||||||
return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
||||||
};
|
|
||||||
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());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// node_modules/node-webvtt/lib/parser.js
|
|
||||||
var require_parser = __commonJS({
|
|
||||||
"node_modules/node-webvtt/lib/parser.js"(exports, module2) {
|
|
||||||
"use strict";
|
|
||||||
function ParserError(message, error) {
|
|
||||||
this.message = message;
|
|
||||||
this.error = error;
|
|
||||||
}
|
|
||||||
ParserError.prototype = Object.create(Error.prototype);
|
|
||||||
var TIMESTAMP_REGEXP = /([0-9]{1,2})?:?([0-9]{2}):([0-9]{2}\.[0-9]{2,3})/;
|
|
||||||
function parse2(input, options) {
|
|
||||||
if (!options) {
|
|
||||||
options = {};
|
|
||||||
}
|
|
||||||
const { meta = false, strict = true } = options;
|
|
||||||
if (typeof input !== "string") {
|
|
||||||
throw new ParserError("Input must be a string");
|
|
||||||
}
|
|
||||||
input = input.trim();
|
|
||||||
input = input.replace(/\r\n/g, "\n");
|
|
||||||
input = input.replace(/\r/g, "\n");
|
|
||||||
const parts = input.split("\n\n");
|
|
||||||
const header = parts.shift();
|
|
||||||
if (!header.startsWith("WEBVTT")) {
|
|
||||||
throw new ParserError('Must start with "WEBVTT"');
|
|
||||||
}
|
|
||||||
const headerParts = header.split("\n");
|
|
||||||
const headerComments = headerParts[0].replace("WEBVTT", "");
|
|
||||||
if (headerComments.length > 0 && (headerComments[0] !== " " && headerComments[0] !== " ")) {
|
|
||||||
throw new ParserError("Header comment must start with space or tab");
|
|
||||||
}
|
|
||||||
if (parts.length === 0 && headerParts.length === 1) {
|
|
||||||
return { valid: true, strict, cues: [], errors: [] };
|
|
||||||
}
|
|
||||||
if (!meta && headerParts.length > 1 && headerParts[1] !== "") {
|
|
||||||
throw new ParserError("Missing blank line after signature");
|
|
||||||
}
|
|
||||||
const { cues, errors } = parseCues(parts, strict);
|
|
||||||
if (strict && errors.length > 0) {
|
|
||||||
throw errors[0];
|
|
||||||
}
|
|
||||||
const headerMeta = meta ? parseMeta(headerParts) : null;
|
|
||||||
const result = { valid: errors.length === 0, strict, cues, errors };
|
|
||||||
if (meta) {
|
|
||||||
result.meta = headerMeta;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
function parseMeta(headerParts) {
|
|
||||||
const meta = {};
|
|
||||||
headerParts.slice(1).forEach((header) => {
|
|
||||||
const splitIdx = header.indexOf(":");
|
|
||||||
const key = header.slice(0, splitIdx).trim();
|
|
||||||
const value = header.slice(splitIdx + 1).trim();
|
|
||||||
meta[key] = value;
|
|
||||||
});
|
|
||||||
return Object.keys(meta).length > 0 ? meta : null;
|
|
||||||
}
|
|
||||||
function parseCues(cues, strict) {
|
|
||||||
const errors = [];
|
|
||||||
const parsedCues = cues.map((cue, i) => {
|
|
||||||
try {
|
|
||||||
return parseCue(cue, i, strict);
|
|
||||||
} catch (e) {
|
|
||||||
errors.push(e);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}).filter(Boolean);
|
|
||||||
return {
|
|
||||||
cues: parsedCues,
|
|
||||||
errors
|
|
||||||
};
|
|
||||||
}
|
|
||||||
function parseCue(cue, i, strict) {
|
|
||||||
let identifier = "";
|
|
||||||
let start = 0;
|
|
||||||
let end = 0.01;
|
|
||||||
let text = "";
|
|
||||||
let styles = "";
|
|
||||||
const lines = cue.split("\n").filter(Boolean);
|
|
||||||
if (lines.length > 0 && lines[0].trim().startsWith("NOTE")) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (lines.length === 1 && !lines[0].includes("-->")) {
|
|
||||||
throw new ParserError(`Cue identifier cannot be standalone (cue #${i})`);
|
|
||||||
}
|
|
||||||
if (lines.length > 1 && !(lines[0].includes("-->") || lines[1].includes("-->"))) {
|
|
||||||
const msg = `Cue identifier needs to be followed by timestamp (cue #${i})`;
|
|
||||||
throw new ParserError(msg);
|
|
||||||
}
|
|
||||||
if (lines.length > 1 && lines[1].includes("-->")) {
|
|
||||||
identifier = lines.shift();
|
|
||||||
}
|
|
||||||
const times = typeof lines[0] === "string" && lines[0].split(" --> ");
|
|
||||||
if (times.length !== 2 || !validTimestamp(times[0]) || !validTimestamp(times[1])) {
|
|
||||||
throw new ParserError(`Invalid cue timestamp (cue #${i})`);
|
|
||||||
}
|
|
||||||
start = parseTimestamp(times[0]);
|
|
||||||
end = parseTimestamp(times[1]);
|
|
||||||
if (strict) {
|
|
||||||
if (start > end) {
|
|
||||||
throw new ParserError(`Start timestamp greater than end (cue #${i})`);
|
|
||||||
}
|
|
||||||
if (end <= start) {
|
|
||||||
throw new ParserError(`End must be greater than start (cue #${i})`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!strict && end < start) {
|
|
||||||
throw new ParserError(`End must be greater or equal to start when not strict (cue #${i})`);
|
|
||||||
}
|
|
||||||
styles = times[1].replace(TIMESTAMP_REGEXP, "").trim();
|
|
||||||
lines.shift();
|
|
||||||
text = lines.join("\n");
|
|
||||||
if (!text) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return { identifier, start, end, text, styles };
|
|
||||||
}
|
|
||||||
function validTimestamp(timestamp) {
|
|
||||||
return TIMESTAMP_REGEXP.test(timestamp);
|
|
||||||
}
|
|
||||||
function parseTimestamp(timestamp) {
|
|
||||||
const matches = timestamp.match(TIMESTAMP_REGEXP);
|
|
||||||
let secs = parseFloat(matches[1] || 0) * 60 * 60;
|
|
||||||
secs += parseFloat(matches[2]) * 60;
|
|
||||||
secs += parseFloat(matches[3]);
|
|
||||||
return secs;
|
|
||||||
}
|
|
||||||
module2.exports = { ParserError, parse: parse2 };
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// node_modules/node-webvtt/lib/compiler.js
|
|
||||||
var require_compiler = __commonJS({
|
|
||||||
"node_modules/node-webvtt/lib/compiler.js"(exports, module2) {
|
|
||||||
"use strict";
|
|
||||||
function CompilerError(message, error) {
|
|
||||||
this.message = message;
|
|
||||||
this.error = error;
|
|
||||||
}
|
|
||||||
CompilerError.prototype = Object.create(Error.prototype);
|
|
||||||
function compile(input) {
|
|
||||||
if (!input) {
|
|
||||||
throw new CompilerError("Input must be non-null");
|
|
||||||
}
|
|
||||||
if (typeof input !== "object") {
|
|
||||||
throw new CompilerError("Input must be an object");
|
|
||||||
}
|
|
||||||
if (Array.isArray(input)) {
|
|
||||||
throw new CompilerError("Input cannot be array");
|
|
||||||
}
|
|
||||||
if (!input.valid) {
|
|
||||||
throw new CompilerError("Input must be valid");
|
|
||||||
}
|
|
||||||
let output = "WEBVTT\n";
|
|
||||||
if (input.meta) {
|
|
||||||
if (typeof input.meta !== "object" || Array.isArray(input.meta)) {
|
|
||||||
throw new CompilerError("Metadata must be an object");
|
|
||||||
}
|
|
||||||
Object.entries(input.meta).forEach((i) => {
|
|
||||||
if (typeof i[1] !== "string") {
|
|
||||||
throw new CompilerError(`Metadata value for "${i[0]}" must be string`);
|
|
||||||
}
|
|
||||||
output += `${i[0]}: ${i[1]}
|
|
||||||
`;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
let lastTime = null;
|
|
||||||
input.cues.forEach((cue, index) => {
|
|
||||||
if (lastTime && lastTime > cue.start) {
|
|
||||||
throw new CompilerError(`Cue number ${index} is not in chronological order`);
|
|
||||||
}
|
|
||||||
lastTime = cue.start;
|
|
||||||
output += "\n";
|
|
||||||
output += compileCue(cue);
|
|
||||||
output += "\n";
|
|
||||||
});
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
function compileCue(cue) {
|
|
||||||
if (typeof cue !== "object") {
|
|
||||||
throw new CompilerError("Cue malformed: not of type object");
|
|
||||||
}
|
|
||||||
if (typeof cue.identifier !== "string" && typeof cue.identifier !== "number" && cue.identifier !== null) {
|
|
||||||
throw new CompilerError(`Cue malformed: identifier value is not a string.
|
|
||||||
${JSON.stringify(cue)}`);
|
|
||||||
}
|
|
||||||
if (isNaN(cue.start)) {
|
|
||||||
throw new CompilerError(`Cue malformed: null start value.
|
|
||||||
${JSON.stringify(cue)}`);
|
|
||||||
}
|
|
||||||
if (isNaN(cue.end)) {
|
|
||||||
throw new CompilerError(`Cue malformed: null end value.
|
|
||||||
${JSON.stringify(cue)}`);
|
|
||||||
}
|
|
||||||
if (cue.start >= cue.end) {
|
|
||||||
throw new CompilerError(`Cue malformed: start timestamp greater than end
|
|
||||||
${JSON.stringify(cue)}`);
|
|
||||||
}
|
|
||||||
if (typeof cue.text !== "string") {
|
|
||||||
throw new CompilerError(`Cue malformed: null text value.
|
|
||||||
${JSON.stringify(cue)}`);
|
|
||||||
}
|
|
||||||
if (typeof cue.styles !== "string") {
|
|
||||||
throw new CompilerError(`Cue malformed: null styles value.
|
|
||||||
${JSON.stringify(cue)}`);
|
|
||||||
}
|
|
||||||
let output = "";
|
|
||||||
if (cue.identifier.length > 0) {
|
|
||||||
output += `${cue.identifier}
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
const startTimestamp = convertTimestamp(cue.start);
|
|
||||||
const endTimestamp = convertTimestamp(cue.end);
|
|
||||||
output += `${startTimestamp} --> ${endTimestamp}`;
|
|
||||||
output += cue.styles ? ` ${cue.styles}` : "";
|
|
||||||
output += `
|
|
||||||
${cue.text}`;
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
function convertTimestamp(time) {
|
|
||||||
const hours = pad(calculateHours(time), 2);
|
|
||||||
const minutes = pad(calculateMinutes(time), 2);
|
|
||||||
const seconds = pad(calculateSeconds(time), 2);
|
|
||||||
const milliseconds = pad(calculateMs(time), 3);
|
|
||||||
return `${hours}:${minutes}:${seconds}.${milliseconds}`;
|
|
||||||
}
|
|
||||||
function pad(num, zeroes) {
|
|
||||||
let output = `${num}`;
|
|
||||||
while (output.length < zeroes) {
|
|
||||||
output = `0${output}`;
|
|
||||||
}
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
function calculateHours(time) {
|
|
||||||
return Math.floor(time / 60 / 60);
|
|
||||||
}
|
|
||||||
function calculateMinutes(time) {
|
|
||||||
return Math.floor(time / 60) % 60;
|
|
||||||
}
|
|
||||||
function calculateSeconds(time) {
|
|
||||||
return Math.floor(time % 60);
|
|
||||||
}
|
|
||||||
function calculateMs(time) {
|
|
||||||
return Math.floor((time % 1).toFixed(4) * 1e3);
|
|
||||||
}
|
|
||||||
module2.exports = { CompilerError, compile };
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// node_modules/node-webvtt/lib/segmenter.js
|
|
||||||
var require_segmenter = __commonJS({
|
|
||||||
"node_modules/node-webvtt/lib/segmenter.js"(exports, module2) {
|
|
||||||
"use strict";
|
|
||||||
var parse2 = require_parser().parse;
|
|
||||||
function segment(input, segmentLength) {
|
|
||||||
segmentLength = segmentLength || 10;
|
|
||||||
const parsed = parse2(input);
|
|
||||||
const segments = [];
|
|
||||||
let cues = [];
|
|
||||||
let queuedCue = null;
|
|
||||||
let currentSegmentDuration = 0;
|
|
||||||
let totalSegmentsDuration = 0;
|
|
||||||
parsed.cues.forEach((cue, i) => {
|
|
||||||
const firstCue = i === 0;
|
|
||||||
const lastCue = i === parsed.cues.length - 1;
|
|
||||||
const start = cue.start;
|
|
||||||
const end = cue.end;
|
|
||||||
const nextStart = lastCue ? Infinity : parsed.cues[i + 1].start;
|
|
||||||
const cueLength = firstCue ? end : end - start;
|
|
||||||
const silence = firstCue ? 0 : start - parsed.cues[i - 1].end;
|
|
||||||
currentSegmentDuration = currentSegmentDuration + cueLength + silence;
|
|
||||||
debug("------------");
|
|
||||||
debug(`Cue #${i}, segment #${segments.length + 1}`);
|
|
||||||
debug(`Start ${start}`);
|
|
||||||
debug(`End ${end}`);
|
|
||||||
debug(`Length ${cueLength}`);
|
|
||||||
debug(`Total segment duration = ${totalSegmentsDuration}`);
|
|
||||||
debug(`Current segment duration = ${currentSegmentDuration}`);
|
|
||||||
debug(`Start of next = ${nextStart}`);
|
|
||||||
if (queuedCue) {
|
|
||||||
cues.push(queuedCue);
|
|
||||||
currentSegmentDuration += queuedCue.end - totalSegmentsDuration;
|
|
||||||
queuedCue = null;
|
|
||||||
}
|
|
||||||
cues.push(cue);
|
|
||||||
let shouldQueue = nextStart - end < segmentLength && silence < segmentLength && currentSegmentDuration > segmentLength;
|
|
||||||
if (shouldSegment(totalSegmentsDuration, segmentLength, nextStart, silence)) {
|
|
||||||
const duration = segmentDuration(lastCue, end, segmentLength, currentSegmentDuration, totalSegmentsDuration);
|
|
||||||
segments.push({ duration, cues });
|
|
||||||
totalSegmentsDuration += duration;
|
|
||||||
currentSegmentDuration = 0;
|
|
||||||
cues = [];
|
|
||||||
} else {
|
|
||||||
shouldQueue = false;
|
|
||||||
}
|
|
||||||
if (shouldQueue) {
|
|
||||||
queuedCue = cue;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return segments;
|
|
||||||
}
|
|
||||||
function shouldSegment(total, length, nextStart, silence) {
|
|
||||||
const x = alignToSegmentLength(silence, length);
|
|
||||||
const nextCueIsInNextSegment = silence <= length || x + total < nextStart;
|
|
||||||
return nextCueIsInNextSegment && nextStart - total >= length;
|
|
||||||
}
|
|
||||||
function segmentDuration(lastCue, end, length, currentSegment, totalSegments) {
|
|
||||||
let duration = length;
|
|
||||||
if (currentSegment > length) {
|
|
||||||
duration = alignToSegmentLength(currentSegment - length, length);
|
|
||||||
}
|
|
||||||
if (lastCue) {
|
|
||||||
duration = parseFloat((end - totalSegments).toFixed(2));
|
|
||||||
} else {
|
|
||||||
duration = Math.round(duration);
|
|
||||||
}
|
|
||||||
return duration;
|
|
||||||
}
|
|
||||||
function alignToSegmentLength(n, segmentLength) {
|
|
||||||
n += segmentLength - n % segmentLength;
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
var debugging = false;
|
|
||||||
function debug(m) {
|
|
||||||
if (debugging) {
|
|
||||||
console.log(m);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
module2.exports = { segment };
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// node_modules/node-webvtt/lib/hls.js
|
|
||||||
var require_hls = __commonJS({
|
|
||||||
"node_modules/node-webvtt/lib/hls.js"(exports, module2) {
|
|
||||||
"use strict";
|
|
||||||
var segment = require_segmenter().segment;
|
|
||||||
function hlsSegment(input, segmentLength, startOffset) {
|
|
||||||
if (typeof startOffset === "undefined") {
|
|
||||||
startOffset = "900000";
|
|
||||||
}
|
|
||||||
const segments = segment(input, segmentLength);
|
|
||||||
const result = [];
|
|
||||||
segments.forEach((seg, i) => {
|
|
||||||
const content = `WEBVTT
|
|
||||||
X-TIMESTAMP-MAP=MPEGTS:${startOffset},LOCAL:00:00:00.000
|
|
||||||
|
|
||||||
${printableCues(seg.cues)}
|
|
||||||
`;
|
|
||||||
const filename = generateSegmentFilename(i);
|
|
||||||
result.push({ filename, content });
|
|
||||||
});
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
function hlsSegmentPlaylist(input, segmentLength) {
|
|
||||||
const segmented = segment(input, segmentLength);
|
|
||||||
const printable = printableSegments(segmented);
|
|
||||||
const longestSegment = Math.round(findLongestSegment(segmented));
|
|
||||||
const template = `#EXTM3U
|
|
||||||
#EXT-X-TARGETDURATION:${longestSegment}
|
|
||||||
#EXT-X-VERSION:3
|
|
||||||
#EXT-X-MEDIA-SEQUENCE:0
|
|
||||||
#EXT-X-PLAYLIST-TYPE:VOD
|
|
||||||
${printable}
|
|
||||||
#EXT-X-ENDLIST
|
|
||||||
`;
|
|
||||||
return template;
|
|
||||||
}
|
|
||||||
function pad(num, n) {
|
|
||||||
const padding = "0".repeat(Math.max(0, n - num.toString().length));
|
|
||||||
return `${padding}${num}`;
|
|
||||||
}
|
|
||||||
function generateSegmentFilename(index) {
|
|
||||||
return `${index}.vtt`;
|
|
||||||
}
|
|
||||||
function printableSegments(segments) {
|
|
||||||
const result = [];
|
|
||||||
segments.forEach((seg, i) => {
|
|
||||||
result.push(`#EXTINF:${seg.duration.toFixed(5)},
|
|
||||||
${generateSegmentFilename(i)}`);
|
|
||||||
});
|
|
||||||
return result.join("\n");
|
|
||||||
}
|
|
||||||
function findLongestSegment(segments) {
|
|
||||||
let max = 0;
|
|
||||||
segments.forEach((seg) => {
|
|
||||||
if (seg.duration > max) {
|
|
||||||
max = seg.duration;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return max;
|
|
||||||
}
|
|
||||||
function printableCues(cues) {
|
|
||||||
const result = [];
|
|
||||||
cues.forEach((cue) => {
|
|
||||||
result.push(printableCue(cue));
|
|
||||||
});
|
|
||||||
return result.join("\n\n");
|
|
||||||
}
|
|
||||||
function printableCue(cue) {
|
|
||||||
const printable = [];
|
|
||||||
if (cue.identifier) {
|
|
||||||
printable.push(cue.identifier);
|
|
||||||
}
|
|
||||||
const start = printableTimestamp(cue.start);
|
|
||||||
const end = printableTimestamp(cue.end);
|
|
||||||
const styles = cue.styles ? `${cue.styles}` : "";
|
|
||||||
printable.push(`${start} --> ${end} ${styles}`);
|
|
||||||
printable.push(cue.text);
|
|
||||||
return printable.join("\n");
|
|
||||||
}
|
|
||||||
function printableTimestamp(timestamp) {
|
|
||||||
const ms = (timestamp % 1).toFixed(3);
|
|
||||||
timestamp = Math.round(timestamp - ms);
|
|
||||||
const hours = Math.floor(timestamp / 3600);
|
|
||||||
const mins = Math.floor((timestamp - hours * 3600) / 60);
|
|
||||||
const secs = timestamp - hours * 3600 - mins * 60;
|
|
||||||
const hourString = `${pad(hours, 2)}:`;
|
|
||||||
return `${hourString}${pad(mins, 2)}:${pad(secs, 2)}.${pad(ms * 1e3, 3)}`;
|
|
||||||
}
|
|
||||||
module2.exports = { hlsSegment, hlsSegmentPlaylist };
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// node_modules/node-webvtt/index.js
|
|
||||||
var require_node_webvtt = __commonJS({
|
|
||||||
"node_modules/node-webvtt/index.js"(exports, module2) {
|
|
||||||
"use strict";
|
|
||||||
var parse2 = require_parser().parse;
|
|
||||||
var compile = require_compiler().compile;
|
|
||||||
var segment = require_segmenter().segment;
|
|
||||||
var hls = require_hls();
|
|
||||||
module2.exports = { parse: parse2, compile, segment, hls };
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// main.ts
|
|
||||||
__export(exports, {
|
|
||||||
default: () => ChatViewPlugin
|
|
||||||
});
|
|
||||||
var import_obsidian = __toModule(require("obsidian"));
|
|
||||||
var webvtt = __toModule(require_node_webvtt());
|
|
||||||
var KEYMAP = { ">": "right", "<": "left", "^": "center" };
|
|
||||||
var CONFIGS = {
|
|
||||||
"header": ["h2", "h3", "h4", "h5", "h6"],
|
|
||||||
"mw": ["50", "55", "60", "65", "70", "75", "80", "85", "90"],
|
|
||||||
"mode": ["default", "minimal"]
|
|
||||||
};
|
|
||||||
var COLORS = [
|
|
||||||
"red",
|
|
||||||
"orange",
|
|
||||||
"yellow",
|
|
||||||
"green",
|
|
||||||
"blue",
|
|
||||||
"purple",
|
|
||||||
"grey",
|
|
||||||
"brown",
|
|
||||||
"indigo",
|
|
||||||
"teal",
|
|
||||||
"pink",
|
|
||||||
"slate",
|
|
||||||
"wood"
|
|
||||||
];
|
|
||||||
var _ChatPatterns = class {
|
|
||||||
};
|
|
||||||
var ChatPatterns = _ChatPatterns;
|
|
||||||
ChatPatterns.message = /(^>|<|\^)/;
|
|
||||||
ChatPatterns.delimiter = /.../;
|
|
||||||
ChatPatterns.comment = /^#/;
|
|
||||||
ChatPatterns.colors = /\[(.*?)\]/;
|
|
||||||
ChatPatterns.format = /{(.*?)}/;
|
|
||||||
ChatPatterns.joined = RegExp([_ChatPatterns.message, _ChatPatterns.delimiter, _ChatPatterns.colors, _ChatPatterns.comment, _ChatPatterns.format].map((pattern) => pattern.source).join("|"));
|
|
||||||
ChatPatterns.voice = /<v\s+([^>]+)>([^<]+)<\/v>/;
|
|
||||||
var ChatViewPlugin = class extends import_obsidian.Plugin {
|
|
||||||
onload() {
|
|
||||||
return __async(this, null, function* () {
|
|
||||||
this.registerMarkdownCodeBlockProcessor("chat-webvtt", (source, el, _) => {
|
|
||||||
const vtt = webvtt.parse(source, { meta: true });
|
|
||||||
const messages = [];
|
|
||||||
const self = vtt.meta && "Self" in vtt.meta ? vtt.meta.Self : void 0;
|
|
||||||
const selves = self ? self.split(",").map((val) => val.trim()) : void 0;
|
|
||||||
const formatConfigs = new Map();
|
|
||||||
const maxWidth = vtt.meta && "MaxWidth" in vtt.meta ? vtt.meta.MaxWidth : void 0;
|
|
||||||
const headerConfig = vtt.meta && "Header" in vtt.meta ? vtt.meta.Header : void 0;
|
|
||||||
const modeConfig = vtt.meta && "Mode" in vtt.meta ? vtt.meta.Mode : void 0;
|
|
||||||
if (CONFIGS["mw"].contains(maxWidth))
|
|
||||||
formatConfigs.set("mw", maxWidth);
|
|
||||||
if (CONFIGS["header"].contains(headerConfig))
|
|
||||||
formatConfigs.set("header", headerConfig);
|
|
||||||
if (CONFIGS["mode"].contains(modeConfig))
|
|
||||||
formatConfigs.set("mode", modeConfig);
|
|
||||||
console.log(formatConfigs);
|
|
||||||
for (let index = 0; index < vtt.cues.length; index++) {
|
|
||||||
const cue = vtt.cues[index];
|
|
||||||
const start = (0, import_obsidian.moment)(Math.round(cue.start * 1e3)).format("HH:mm:ss.SSS");
|
|
||||||
const end = (0, import_obsidian.moment)(Math.round(cue.end * 1e3)).format("HH:mm:ss.SSS");
|
|
||||||
if (ChatPatterns.voice.test(cue.text)) {
|
|
||||||
const matches = cue.text.match(ChatPatterns.voice);
|
|
||||||
messages.push({ header: matches[1], body: matches[2], subtext: `${start} to ${end}` });
|
|
||||||
} else {
|
|
||||||
messages.push({ header: "", body: cue.text, subtext: `${start} to ${end}` });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const headers = messages.map((message) => message.header);
|
|
||||||
const uniqueHeaders = new Set(headers);
|
|
||||||
uniqueHeaders.delete("");
|
|
||||||
console.log(messages);
|
|
||||||
console.log(uniqueHeaders);
|
|
||||||
const colorConfigs = new Map();
|
|
||||||
Array.from(uniqueHeaders).forEach((h, i) => colorConfigs.set(h, COLORS[i % COLORS.length]));
|
|
||||||
console.log(colorConfigs);
|
|
||||||
messages.forEach((message, index, arr) => {
|
|
||||||
const prevHeader = index > 0 ? arr[index - 1].header : "";
|
|
||||||
const align = selves && selves.contains(message.header) ? "right" : "left";
|
|
||||||
const continued = message.header === prevHeader;
|
|
||||||
this.createChatBubble(continued ? "" : message.header, prevHeader, message.body, message.subtext, align, el, continued, colorConfigs, formatConfigs);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.registerMarkdownCodeBlockProcessor("chat", (source, el, _) => {
|
|
||||||
const rawLines = source.split("\n").filter((line) => ChatPatterns.joined.test(line.trim()));
|
|
||||||
const lines = rawLines.map((rawLine) => rawLine.trim());
|
|
||||||
const formatConfigs = new Map();
|
|
||||||
const colorConfigs = new Map();
|
|
||||||
for (const line of lines) {
|
|
||||||
if (ChatPatterns.format.test(line)) {
|
|
||||||
const configs = line.replace("{", "").replace("}", "").split(",").map((l) => l.trim());
|
|
||||||
for (const config of configs) {
|
|
||||||
const [k, v] = config.split("=").map((c) => c.trim());
|
|
||||||
if (Object.keys(CONFIGS).contains(k) && CONFIGS[k].contains(v))
|
|
||||||
formatConfigs.set(k, v);
|
|
||||||
}
|
|
||||||
} else if (ChatPatterns.colors.test(line)) {
|
|
||||||
const configs = line.replace("[", "").replace("]", "").split(",").map((l) => l.trim());
|
|
||||||
for (const config of configs) {
|
|
||||||
const [k, v] = config.split("=").map((c) => c.trim());
|
|
||||||
if (k.length > 0 && COLORS.contains(v))
|
|
||||||
colorConfigs.set(k, v);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let continuedCount = 0;
|
|
||||||
for (let index = 0; index < lines.length; index++) {
|
|
||||||
const line = lines[index].trim();
|
|
||||||
if (ChatPatterns.comment.test(line)) {
|
|
||||||
el.createEl("p", { text: line.substring(1).trim(), cls: ["chat-view-comment"] });
|
|
||||||
} else if (line === "...") {
|
|
||||||
const delimiter = el.createDiv({ cls: ["delimiter"] });
|
|
||||||
for (let i = 0; i < 3; i++)
|
|
||||||
delimiter.createDiv({ cls: ["dot"] });
|
|
||||||
} else if (ChatPatterns.message.test(line)) {
|
|
||||||
const components = line.substring(1).split("|");
|
|
||||||
if (components.length > 0) {
|
|
||||||
const first = components[0];
|
|
||||||
const header = components.length > 1 ? first.trim() : "";
|
|
||||||
const message = components.length > 1 ? components[1].trim() : first.trim();
|
|
||||||
const subtext = components.length > 2 ? components[2].trim() : "";
|
|
||||||
const continued = index > 0 && line.charAt(0) === lines[index - 1].charAt(0) && header === "";
|
|
||||||
let prevHeader = "";
|
|
||||||
if (continued) {
|
|
||||||
continuedCount++;
|
|
||||||
const prevComponents = lines[index - continuedCount].trim().substring(1).split("|");
|
|
||||||
prevHeader = prevComponents[0].length > 1 ? prevComponents[0].trim() : "";
|
|
||||||
} else {
|
|
||||||
continuedCount = 0;
|
|
||||||
}
|
|
||||||
this.createChatBubble(header, prevHeader, message, subtext, KEYMAP[line.charAt(0)], el, continued, colorConfigs, formatConfigs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
createChatBubble(header, prevHeader, message, subtext, align, element, continued, colorConfigs, formatConfigs) {
|
|
||||||
const marginClass = continued ? "chat-view-small-vertical-margin" : "chat-view-default-vertical-margin";
|
|
||||||
const colorConfigClass = `chat-view-${colorConfigs.get(continued ? prevHeader : header)}`;
|
|
||||||
const widthClass = formatConfigs.has("mw") ? `chat-view-max-width-${formatConfigs.get("mw")}` : import_obsidian.Platform.isMobile ? "chat-view-mobile-width" : "chat-view-desktop-width";
|
|
||||||
const modeClass = `chat-view-bubble-mode-${formatConfigs.has("mode") ? formatConfigs.get("mode") : "default"}`;
|
|
||||||
const headerEl = formatConfigs.has("header") ? formatConfigs.get("header") : "h4";
|
|
||||||
const bubble = element.createDiv({
|
|
||||||
cls: ["chat-view-bubble", `chat-view-align-${align}`, marginClass, colorConfigClass, widthClass, modeClass]
|
|
||||||
});
|
|
||||||
if (header.length > 0)
|
|
||||||
bubble.createEl(headerEl, { text: header, cls: ["chat-view-header"] });
|
|
||||||
if (message.length > 0)
|
|
||||||
bubble.createEl("p", { text: message, cls: ["chat-view-message"] });
|
|
||||||
if (subtext.length > 0)
|
|
||||||
bubble.createEl("sub", { text: subtext, cls: ["chat-view-subtext"] });
|
|
||||||
}
|
|
||||||
};
|
|
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "obsidian-chat-view",
|
|
||||||
"name": "Chat View",
|
|
||||||
"version": "1.2.0",
|
|
||||||
"minAppVersion": "0.12.0",
|
|
||||||
"description": "Chat View enables you to create elegant Chat UIs in your Obsidian markdown files. It also supports the WebVTT format.",
|
|
||||||
"author": "Aditya Majethia",
|
|
||||||
"isDesktopOnly": false
|
|
||||||
}
|
|
@ -1,200 +0,0 @@
|
|||||||
:root {
|
|
||||||
--opacity: 0.6;
|
|
||||||
--line-height: 1.8;
|
|
||||||
--line-height-minimal: 1.6;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-bubble-mode-default>h2.chat-view-header,
|
|
||||||
div.chat-view-bubble-mode-default>h3.chat-view-header,
|
|
||||||
div.chat-view-bubble-mode-default>h4.chat-view-header,
|
|
||||||
div.chat-view-bubble-mode-default>h5.chat-view-header,
|
|
||||||
div.chat-view-bubble-mode-default>h6.chat-view-header {
|
|
||||||
margin: 0;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-bubble-mode-minimal>h2.chat-view-header,
|
|
||||||
div.chat-view-bubble-mode-minimal>h3.chat-view-header,
|
|
||||||
div.chat-view-bubble-mode-minimal>h4.chat-view-header,
|
|
||||||
div.chat-view-bubble-mode-minimal>h5.chat-view-header,
|
|
||||||
div.chat-view-bubble-mode-minimal>h6.chat-view-header {
|
|
||||||
margin: 0;
|
|
||||||
margin-bottom: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-bubble-mode-default>p.chat-view-message {
|
|
||||||
margin: 0;
|
|
||||||
margin-bottom: 2px;
|
|
||||||
line-height: var(--line-height);
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-bubble-mode-minimal>p.chat-view-message {
|
|
||||||
margin: 0;
|
|
||||||
line-height: var(--line-height-minimal);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub.chat-view-subtext {
|
|
||||||
opacity: var(--opacity);
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-view-comment {
|
|
||||||
width: fit-content;
|
|
||||||
max-width: 90%;
|
|
||||||
margin: 24px auto;
|
|
||||||
line-height: var(--line-height);
|
|
||||||
text-align: center;
|
|
||||||
opacity: var(--opacity);
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-bubble {
|
|
||||||
width: fit-content;
|
|
||||||
min-width: 30%;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-bubble-mode-default {
|
|
||||||
padding: 12px;
|
|
||||||
background-color: rgba(0, 0, 0, 0.075);
|
|
||||||
border: 2px solid rgba(255, 255, 255, 0.15);
|
|
||||||
border-radius: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-bubble-mode-minimal {
|
|
||||||
padding: 4px 0px;
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-view-mobile-width {
|
|
||||||
max-width: 85%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-view-desktop-width {
|
|
||||||
max-width: 75%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-view-max-width-50 {
|
|
||||||
max-width: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-view-max-width-55 {
|
|
||||||
max-width: 55%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-view-max-width-60 {
|
|
||||||
max-width: 60%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-view-max-width-65 {
|
|
||||||
max-width: 65%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-view-max-width-70 {
|
|
||||||
max-width: 70%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-view-max-width-75 {
|
|
||||||
max-width: 75%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-view-max-width-80 {
|
|
||||||
max-width: 80%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-view-max-width-85 {
|
|
||||||
max-width: 85%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-view-max-width-90 {
|
|
||||||
max-width: 90%;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-default-vertical-margin {
|
|
||||||
margin-top: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-small-vertical-margin {
|
|
||||||
margin-top: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-align-left {
|
|
||||||
border-top-left-radius: 0;
|
|
||||||
margin-left: 0;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-align-right {
|
|
||||||
border-top-right-radius: 0;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-align-center {
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.delimiter {
|
|
||||||
width: fit-content;
|
|
||||||
margin: 24px auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.delimiter div.dot {
|
|
||||||
display: inline-block;
|
|
||||||
width: 6px;
|
|
||||||
height: 6px;
|
|
||||||
margin: 0px 4px;
|
|
||||||
border-radius: 60%;
|
|
||||||
background-color: currentColor;
|
|
||||||
opacity: var(--opacity);
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-blue>.chat-view-header {
|
|
||||||
color: #08F;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-green>.chat-view-header {
|
|
||||||
color: #2B5;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-yellow>.chat-view-header {
|
|
||||||
color: #ED0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-orange>.chat-view-header {
|
|
||||||
color: #F80;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-red>.chat-view-header {
|
|
||||||
color: #F33;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-purple>.chat-view-header {
|
|
||||||
color: #B2C;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-grey>.chat-view-header {
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-brown .chat-view-header {
|
|
||||||
color: #A71;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-indigo .chat-view-header {
|
|
||||||
color: #75F;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-teal .chat-view-header {
|
|
||||||
color: #0AA;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-pink .chat-view-header {
|
|
||||||
color: #F2A;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-slate .chat-view-header {
|
|
||||||
color: #78A;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.chat-view-wood .chat-view-header {
|
|
||||||
color: #EE6a44;
|
|
||||||
}
|
|
@ -0,0 +1,340 @@
|
|||||||
|
/*
|
||||||
|
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());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// src/main.ts
|
||||||
|
__export(exports, {
|
||||||
|
default: () => DialoguePlugin
|
||||||
|
});
|
||||||
|
var import_obsidian2 = __toModule(require("obsidian"));
|
||||||
|
|
||||||
|
// src/types/dialogueTitleMode.ts
|
||||||
|
var DialogueTitleMode;
|
||||||
|
(function(DialogueTitleMode2) {
|
||||||
|
DialogueTitleMode2["Disabled"] = "disabled";
|
||||||
|
DialogueTitleMode2["First"] = "first";
|
||||||
|
DialogueTitleMode2["All"] = "all";
|
||||||
|
})(DialogueTitleMode || (DialogueTitleMode = {}));
|
||||||
|
|
||||||
|
// src/constants/classes.ts
|
||||||
|
var CLASSES = class {
|
||||||
|
};
|
||||||
|
CLASSES.DIALOGUE_WRAPPER = "dialogue-plugin-wrapper";
|
||||||
|
CLASSES.BLOCK_WRAPPER = "dialogue-plugin-block-wrapper";
|
||||||
|
CLASSES.MESSAGE_WRAPPER_LEFT = "dialogue-plugin-message-wrapper-left";
|
||||||
|
CLASSES.MESSAGE_WRAPPER_RIGHT = "dialogue-plugin-message-wrapper-right";
|
||||||
|
CLASSES.MESSAGE = "dialogue-plugin-message";
|
||||||
|
CLASSES.MESSAGE_TITLE = "dialogue-plugin-message-title";
|
||||||
|
CLASSES.MESSAGE_CONTENT = "dialogue-plugin-message-content";
|
||||||
|
CLASSES.DELIMITER_WRAPPER = "dialogue-plugin-delimiter-wrapper";
|
||||||
|
CLASSES.DELIMITER = "dialogue-plugin-delimiter";
|
||||||
|
CLASSES.DELIMITER_DOT = "dialogue-plugin-delimiter-dot";
|
||||||
|
CLASSES.COMMENT_WRAPPER = "dialogue-plugin-comment-wrapper";
|
||||||
|
CLASSES.COMMENT = "dialogue-plugin-comment";
|
||||||
|
|
||||||
|
// src/components/message.ts
|
||||||
|
var SIDES = class {
|
||||||
|
};
|
||||||
|
SIDES.LEFT = "left";
|
||||||
|
SIDES.RIGHT = "right";
|
||||||
|
var Message = class {
|
||||||
|
constructor(content, side, dialogueSettings) {
|
||||||
|
this.content = content;
|
||||||
|
this.side = side;
|
||||||
|
this.dialogueSettings = dialogueSettings;
|
||||||
|
this.participant = this.side == SIDES.LEFT ? this.dialogueSettings.leftParticipant : this.dialogueSettings.rightParticipant;
|
||||||
|
this.renderMessage();
|
||||||
|
}
|
||||||
|
renderMessage() {
|
||||||
|
const messageEl = this.createMessageEl();
|
||||||
|
if (this.titleShouldRender()) {
|
||||||
|
messageEl.createDiv({ cls: CLASSES.MESSAGE_TITLE, text: this.participant.title });
|
||||||
|
}
|
||||||
|
messageEl.createDiv({ cls: CLASSES.MESSAGE_CONTENT, text: this.content });
|
||||||
|
}
|
||||||
|
createMessageEl() {
|
||||||
|
var _a;
|
||||||
|
const sideClass = this.side == SIDES.LEFT ? CLASSES.MESSAGE_WRAPPER_LEFT : CLASSES.MESSAGE_WRAPPER_RIGHT;
|
||||||
|
const messageWrapperEl = this.dialogueSettings.parent.createDiv({
|
||||||
|
cls: `${CLASSES.BLOCK_WRAPPER} ${sideClass}`
|
||||||
|
});
|
||||||
|
return messageWrapperEl.createDiv({
|
||||||
|
cls: CLASSES.MESSAGE,
|
||||||
|
attr: {
|
||||||
|
style: `max-width: ${this.dialogueSettings.messageMaxWidth};`,
|
||||||
|
"data-participant-name": this.participant.title,
|
||||||
|
"data-participant-id": (_a = this.participant.enforcedId) != null ? _a : this.dialogueSettings.participants.get(this.participant.title)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
titleShouldRender() {
|
||||||
|
if (this.participant.title.length < 1)
|
||||||
|
return false;
|
||||||
|
switch (this.dialogueSettings.titleMode) {
|
||||||
|
case DialogueTitleMode.Disabled:
|
||||||
|
return false;
|
||||||
|
case DialogueTitleMode.All:
|
||||||
|
return true;
|
||||||
|
case DialogueTitleMode.First: {
|
||||||
|
if (this.participant.renderedOnce)
|
||||||
|
return false;
|
||||||
|
this.participant.renderedOnce = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// src/components/delimiter.ts
|
||||||
|
var Delimiter = class {
|
||||||
|
constructor(dialogueSettings) {
|
||||||
|
this.dialogueSettings = dialogueSettings;
|
||||||
|
this.renderDelimiter();
|
||||||
|
}
|
||||||
|
renderDelimiter() {
|
||||||
|
const delimiterWrapperEl = this.dialogueSettings.parent.createDiv({
|
||||||
|
cls: `${CLASSES.BLOCK_WRAPPER} ${CLASSES.DELIMITER_WRAPPER}`
|
||||||
|
});
|
||||||
|
const delimiterEl = delimiterWrapperEl.createDiv({ cls: CLASSES.DELIMITER });
|
||||||
|
delimiterEl.createEl("div", { cls: CLASSES.DELIMITER_DOT });
|
||||||
|
delimiterEl.createEl("div", { cls: CLASSES.DELIMITER_DOT });
|
||||||
|
delimiterEl.createEl("div", { cls: CLASSES.DELIMITER_DOT });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// src/components/comment.ts
|
||||||
|
var Comment = class {
|
||||||
|
constructor(content, dialogueSettings) {
|
||||||
|
this.content = content;
|
||||||
|
this.dialogueSettings = dialogueSettings;
|
||||||
|
this.renderComment();
|
||||||
|
}
|
||||||
|
renderComment() {
|
||||||
|
const commentEl = this.dialogueSettings.parent.createDiv({
|
||||||
|
cls: `${CLASSES.BLOCK_WRAPPER} ${CLASSES.COMMENT_WRAPPER}`
|
||||||
|
});
|
||||||
|
return commentEl.createDiv({
|
||||||
|
cls: CLASSES.COMMENT,
|
||||||
|
text: this.content,
|
||||||
|
attr: {
|
||||||
|
style: `max-width: ${this.dialogueSettings.commentMaxWidth};`
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// src/dialogue.ts
|
||||||
|
var KEYWORDS = class {
|
||||||
|
};
|
||||||
|
KEYWORDS.LEFT_PATTERN = /^l(?:eft)?(?:-(\d+))?:/i;
|
||||||
|
KEYWORDS.RIGHT_PATTERN = /^r(?:ight)?(?:-(\d+))?:/i;
|
||||||
|
KEYWORDS.TITLE_MODE = "titleMode:";
|
||||||
|
KEYWORDS.MESSAGE_MAX_WIDTH = "messageMaxWidth:";
|
||||||
|
KEYWORDS.COMMENT_MAX_WIDTH = "commentMaxWidth:";
|
||||||
|
KEYWORDS.DELIMITER = /^-|delimiter/;
|
||||||
|
KEYWORDS.COMMENT = "#";
|
||||||
|
KEYWORDS.MESSAGE_LEFT = "<";
|
||||||
|
KEYWORDS.MESSAGE_RIGHT = ">";
|
||||||
|
var DialogueRenderer = class {
|
||||||
|
constructor(src, parent, settings) {
|
||||||
|
this.src = src;
|
||||||
|
this.dialogueWrapperEl = parent.createDiv({ cls: CLASSES.DIALOGUE_WRAPPER });
|
||||||
|
this.dialogueSettings = {
|
||||||
|
parent: this.dialogueWrapperEl,
|
||||||
|
leftParticipant: {
|
||||||
|
title: settings.defaultLeftTitle,
|
||||||
|
renderedOnce: false,
|
||||||
|
enforcedId: null
|
||||||
|
},
|
||||||
|
rightParticipant: {
|
||||||
|
title: settings.defaultRightTitle,
|
||||||
|
renderedOnce: false,
|
||||||
|
enforcedId: null
|
||||||
|
},
|
||||||
|
titleMode: settings.defaultTitleMode,
|
||||||
|
messageMaxWidth: settings.defaultMessageMaxWidth,
|
||||||
|
commentMaxWidth: settings.defaultCommentMaxWidth,
|
||||||
|
participants: new Map()
|
||||||
|
};
|
||||||
|
this.renderDialogue();
|
||||||
|
}
|
||||||
|
registerParticipant(participant) {
|
||||||
|
if (!this.dialogueSettings.participants.has(participant)) {
|
||||||
|
this.dialogueSettings.participants.set(participant, this.dialogueSettings.participants.size + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getEnforcedId(pattern, line) {
|
||||||
|
let enforcedId = null;
|
||||||
|
const result = pattern.exec(line);
|
||||||
|
if (result != null && result.length > 1) {
|
||||||
|
enforcedId = result[1];
|
||||||
|
}
|
||||||
|
return enforcedId;
|
||||||
|
}
|
||||||
|
renderDialogue() {
|
||||||
|
const lines = this.src.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0);
|
||||||
|
for (const line of lines) {
|
||||||
|
if (KEYWORDS.LEFT_PATTERN.test(line)) {
|
||||||
|
this.dialogueSettings.leftParticipant.title = line.split(":").splice(1).join(":").trim();
|
||||||
|
this.dialogueSettings.leftParticipant.renderedOnce = false;
|
||||||
|
this.dialogueSettings.leftParticipant.enforcedId = this.getEnforcedId(KEYWORDS.LEFT_PATTERN, line);
|
||||||
|
} else if (KEYWORDS.RIGHT_PATTERN.test(line)) {
|
||||||
|
this.dialogueSettings.rightParticipant.title = line.split(":").splice(1).join(":").trim();
|
||||||
|
this.dialogueSettings.rightParticipant.renderedOnce = false;
|
||||||
|
this.dialogueSettings.rightParticipant.enforcedId = this.getEnforcedId(KEYWORDS.RIGHT_PATTERN, line);
|
||||||
|
} else if (line.startsWith(KEYWORDS.TITLE_MODE)) {
|
||||||
|
const modeName = line.substr(KEYWORDS.TITLE_MODE.length).trim().toLowerCase();
|
||||||
|
if (Object.values(DialogueTitleMode).some((mode) => mode == modeName)) {
|
||||||
|
this.dialogueSettings.titleMode = modeName;
|
||||||
|
}
|
||||||
|
} else if (line.startsWith(KEYWORDS.MESSAGE_MAX_WIDTH)) {
|
||||||
|
this.dialogueSettings.messageMaxWidth = line.substr(KEYWORDS.MESSAGE_MAX_WIDTH.length).trim();
|
||||||
|
} else if (line.startsWith(KEYWORDS.COMMENT_MAX_WIDTH)) {
|
||||||
|
this.dialogueSettings.commentMaxWidth = line.substr(KEYWORDS.COMMENT_MAX_WIDTH.length).trim();
|
||||||
|
} else if (KEYWORDS.DELIMITER.test(line)) {
|
||||||
|
new Delimiter(this.dialogueSettings);
|
||||||
|
} else if (line.startsWith(KEYWORDS.COMMENT)) {
|
||||||
|
const content = line.substr(KEYWORDS.COMMENT.length);
|
||||||
|
new Comment(content, this.dialogueSettings);
|
||||||
|
} else if (line.startsWith(KEYWORDS.MESSAGE_LEFT)) {
|
||||||
|
const content = line.substr(KEYWORDS.MESSAGE_LEFT.length);
|
||||||
|
this.registerParticipant(this.dialogueSettings.leftParticipant.title);
|
||||||
|
new Message(content, SIDES.LEFT, this.dialogueSettings);
|
||||||
|
} else if (line.startsWith(KEYWORDS.MESSAGE_RIGHT)) {
|
||||||
|
const content = line.substr(KEYWORDS.MESSAGE_RIGHT.length);
|
||||||
|
this.registerParticipant(this.dialogueSettings.rightParticipant.title);
|
||||||
|
new Message(content, SIDES.RIGHT, this.dialogueSettings);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// src/settings.ts
|
||||||
|
var import_obsidian = __toModule(require("obsidian"));
|
||||||
|
var DEFAULT_SETTINGS = {
|
||||||
|
defaultLeftTitle: "",
|
||||||
|
defaultRightTitle: "",
|
||||||
|
defaultTitleMode: DialogueTitleMode.First,
|
||||||
|
defaultMessageMaxWidth: "60%",
|
||||||
|
defaultCommentMaxWidth: "60%"
|
||||||
|
};
|
||||||
|
var DialogueSettingTab = class extends import_obsidian.PluginSettingTab {
|
||||||
|
constructor(app, plugin) {
|
||||||
|
super(app, plugin);
|
||||||
|
this.plugin = plugin;
|
||||||
|
}
|
||||||
|
display() {
|
||||||
|
const { containerEl } = this;
|
||||||
|
containerEl.empty();
|
||||||
|
containerEl.createEl("h2", { text: "Dialogue Settings" });
|
||||||
|
const coffeeEl = containerEl.createEl("div", {
|
||||||
|
attr: {
|
||||||
|
style: "text-align: center; margin-bottom: 10px;"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const coffeeLinkEl = coffeeEl.createEl("a", { href: "https://www.buymeacoffee.com/holubj" });
|
||||||
|
coffeeLinkEl.createEl("img", {
|
||||||
|
attr: {
|
||||||
|
src: "https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png",
|
||||||
|
alt: "Buy Me A Coffee",
|
||||||
|
style: "height: 60px; width: 217px;"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
new import_obsidian.Setting(containerEl).setName("Default left title").setDesc("Default value for left title in all dialogues.").addText((text) => text.setPlaceholder("Enter default left title").setValue(this.plugin.settings.defaultLeftTitle).onChange((value) => __async(this, null, function* () {
|
||||||
|
this.plugin.settings.defaultLeftTitle = value;
|
||||||
|
yield this.plugin.saveSettings();
|
||||||
|
})));
|
||||||
|
new import_obsidian.Setting(containerEl).setName("Default right title").setDesc("Default value for right title in all dialogues.").addText((text) => text.setPlaceholder("Enter default right title").setValue(this.plugin.settings.defaultRightTitle).onChange((value) => __async(this, null, function* () {
|
||||||
|
this.plugin.settings.defaultRightTitle = value;
|
||||||
|
yield this.plugin.saveSettings();
|
||||||
|
})));
|
||||||
|
new import_obsidian.Setting(containerEl).setName("Default title mode").setDesc("Default title mode in all dialogues.").addDropdown((cb) => {
|
||||||
|
Object.values(DialogueTitleMode).forEach((titleMode) => {
|
||||||
|
const mode = titleMode.toString();
|
||||||
|
cb.addOption(mode, mode.charAt(0).toUpperCase() + mode.slice(1));
|
||||||
|
});
|
||||||
|
cb.setValue(this.plugin.settings.defaultTitleMode).onChange((value) => __async(this, null, function* () {
|
||||||
|
this.plugin.settings.defaultTitleMode = value;
|
||||||
|
yield this.plugin.saveSettings();
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
new import_obsidian.Setting(containerEl).setName("Default max message width").setDesc("Default max message width in all dialogues.").addText((text) => text.setPlaceholder("Enter default max message width").setValue(this.plugin.settings.defaultMessageMaxWidth).onChange((value) => __async(this, null, function* () {
|
||||||
|
this.plugin.settings.defaultMessageMaxWidth = value;
|
||||||
|
yield this.plugin.saveSettings();
|
||||||
|
})));
|
||||||
|
new import_obsidian.Setting(containerEl).setName("Default max comment width").setDesc("Default max comment width in all dialogues.").addText((text) => text.setPlaceholder("Enter default max comment width").setValue(this.plugin.settings.defaultCommentMaxWidth).onChange((value) => __async(this, null, function* () {
|
||||||
|
this.plugin.settings.defaultCommentMaxWidth = value;
|
||||||
|
yield this.plugin.saveSettings();
|
||||||
|
})));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// src/main.ts
|
||||||
|
var DialoguePlugin = class extends import_obsidian2.Plugin {
|
||||||
|
onload() {
|
||||||
|
return __async(this, null, function* () {
|
||||||
|
yield this.loadSettings();
|
||||||
|
this.registerMarkdownCodeBlockProcessor(`dialogue`, (src, el, ctx) => {
|
||||||
|
new DialogueRenderer(src, el, this.settings);
|
||||||
|
});
|
||||||
|
this.addSettingTab(new DialogueSettingTab(this.app, this));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"id": "obsidian-dialogue-plugin",
|
||||||
|
"name": "Dialogue",
|
||||||
|
"version": "1.0.2",
|
||||||
|
"minAppVersion": "0.12.0",
|
||||||
|
"description": "Create dialogues in Markdown.",
|
||||||
|
"author": "Jakub Holub",
|
||||||
|
"authorUrl": "https://github.com/holubj",
|
||||||
|
"isDesktopOnly": false
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
.dialogue-plugin-wrapper {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-block-wrapper {
|
||||||
|
display: flex;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-message-wrapper-left {
|
||||||
|
justify-content: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-message-wrapper-right {
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-message {
|
||||||
|
overflow: hidden;
|
||||||
|
max-width: 60%;
|
||||||
|
background-color: var(--background-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-message-title {
|
||||||
|
padding: 5px 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-message-content {
|
||||||
|
padding: 5px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-delimiter-wrapper {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-delimiter {
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-delimiter-dot {
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
margin: 0 3px;
|
||||||
|
display: inline-block;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: var(--background-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-comment-wrapper {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-comment {
|
||||||
|
margin: 20px 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,18 +1 @@
|
|||||||
{
|
{}
|
||||||
"minimal-style@@red@@dark": "#D61515",
|
|
||||||
"minimal-style@@orange@@light": "#FAAA26",
|
|
||||||
"minimal-style@@orange@@dark": "#FAAA26",
|
|
||||||
"minimal-style@@red@@light": "#D61515",
|
|
||||||
"minimal-style@@yellow@@light": "#FDFF08",
|
|
||||||
"minimal-style@@yellow@@dark": "#FDFF08",
|
|
||||||
"minimal-style@@green@@light": "#16F232",
|
|
||||||
"minimal-style@@green@@dark": "#16F232",
|
|
||||||
"minimal-style@@cyan@@light": "#0BECDE",
|
|
||||||
"minimal-style@@cyan@@dark": "#0BECDE",
|
|
||||||
"minimal-style@@blue@@light": "#0F37F2",
|
|
||||||
"minimal-style@@blue@@dark": "#0F37F2",
|
|
||||||
"minimal-style@@purple@@light": "#950ACE",
|
|
||||||
"minimal-style@@purple@@dark": "#950ACE",
|
|
||||||
"minimal-style@@pink@@light": "#EE10C7",
|
|
||||||
"minimal-style@@pink@@dark": "#EE10C7"
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,71 +1,106 @@
|
|||||||
.tasks-count {
|
.tasks-count {
|
||||||
color: var(--text-faint);
|
color: var(--text-faint);
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pencil icon. */
|
/* Pencil icon. */
|
||||||
.tasks-edit {
|
.tasks-edit {
|
||||||
background-color: var(--text-faint);
|
background-color: var(--text-faint);
|
||||||
mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-hidden%3D%22true%22%20focusable%3D%22false%22%20width%3D%221em%22%20height%3D%221em%22%20style%3D%22-ms-transform%3A%20rotate(360deg)%3B%20-webkit-transform%3A%20rotate(360deg)%3B%20transform%3A%20rotate(360deg)%3B%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%20viewBox%3D%220%200%201536%201536%22%3E%3Cpath%20d%3D%22M363%201408l91-91l-235-235l-91%2091v107h128v128h107zm523-928q0-22-22-22q-10%200-17%207l-542%20542q-7%207-7%2017q0%2022%2022%2022q10%200%2017-7l542-542q7-7%207-17zm-54-192l416%20416l-832%20832H0v-416zm683%2096q0%2053-37%2090l-166%20166l-416-416l166-165q36-38%2090-38q53%200%2091%2038l235%20234q37%2039%2037%2091z%22%20fill%3D%22%23626262%22%2F%3E%3C%2Fsvg%3E");
|
mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-hidden%3D%22true%22%20focusable%3D%22false%22%20width%3D%221em%22%20height%3D%221em%22%20style%3D%22-ms-transform%3A%20rotate(360deg)%3B%20-webkit-transform%3A%20rotate(360deg)%3B%20transform%3A%20rotate(360deg)%3B%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%20viewBox%3D%220%200%201536%201536%22%3E%3Cpath%20d%3D%22M363%201408l91-91l-235-235l-91%2091v107h128v128h107zm523-928q0-22-22-22q-10%200-17%207l-542%20542q-7%207-7%2017q0%2022%2022%2022q10%200%2017-7l542-542q7-7%207-17zm-54-192l416%20416l-832%20832H0v-416zm683%2096q0%2053-37%2090l-166%20166l-416-416l166-165q36-38%2090-38q53%200%2091%2038l235%20234q37%2039%2037%2091z%22%20fill%3D%22%23626262%22%2F%3E%3C%2Fsvg%3E");
|
||||||
-webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-hidden%3D%22true%22%20focusable%3D%22false%22%20width%3D%221em%22%20height%3D%221em%22%20style%3D%22-ms-transform%3A%20rotate(360deg)%3B%20-webkit-transform%3A%20rotate(360deg)%3B%20transform%3A%20rotate(360deg)%3B%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%20viewBox%3D%220%200%201536%201536%22%3E%3Cpath%20d%3D%22M363%201408l91-91l-235-235l-91%2091v107h128v128h107zm523-928q0-22-22-22q-10%200-17%207l-542%20542q-7%207-7%2017q0%2022%2022%2022q10%200%2017-7l542-542q7-7%207-17zm-54-192l416%20416l-832%20832H0v-416zm683%2096q0%2053-37%2090l-166%20166l-416-416l166-165q36-38%2090-38q53%200%2091%2038l235%20234q37%2039%2037%2091z%22%20fill%3D%22%23626262%22%2F%3E%3C%2Fsvg%3E");
|
-webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-hidden%3D%22true%22%20focusable%3D%22false%22%20width%3D%221em%22%20height%3D%221em%22%20style%3D%22-ms-transform%3A%20rotate(360deg)%3B%20-webkit-transform%3A%20rotate(360deg)%3B%20transform%3A%20rotate(360deg)%3B%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%20viewBox%3D%220%200%201536%201536%22%3E%3Cpath%20d%3D%22M363%201408l91-91l-235-235l-91%2091v107h128v128h107zm523-928q0-22-22-22q-10%200-17%207l-542%20542q-7%207-7%2017q0%2022%2022%2022q10%200%2017-7l542-542q7-7%207-17zm-54-192l416%20416l-832%20832H0v-416zm683%2096q0%2053-37%2090l-166%20166l-416-416l166-165q36-38%2090-38q53%200%2091%2038l235%20234q37%2039%2037%2091z%22%20fill%3D%22%23626262%22%2F%3E%3C%2Fsvg%3E");
|
||||||
-webkit-mask-size: contain;
|
-webkit-mask-size: contain;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 1em;
|
width: 1em;
|
||||||
height: 1em;
|
height: 1em;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin-left: 0.5em;
|
margin-left: 0.5em;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Urgency score */
|
/* Urgency score */
|
||||||
.tasks-urgency {
|
.tasks-urgency {
|
||||||
font-size: var(--font-ui-smaller);
|
font-size: var(--font-ui-smaller);
|
||||||
font-family: var(--font-interface);
|
font-family: var(--font-interface);
|
||||||
padding: 2px 6px;
|
padding: 2px 6px;
|
||||||
border-radius: var(--radius-s);
|
border-radius: var(--radius-s);
|
||||||
color: var(--text-normal);
|
color: var(--text-normal);
|
||||||
background-color: var(--background-secondary);
|
background-color: var(--background-secondary);
|
||||||
margin-left: 0.5em;
|
margin-left: 0.5em;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.internal-link.internal-link-short-mode {
|
.internal-link.internal-link-short-mode {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tasks-list-text {
|
.tasks-list-text {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tasks-list-text .tooltip {
|
.tasks-list-text .tooltip {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tasks-setting-important {
|
.tasks-setting-important {
|
||||||
color: red;
|
color: red;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tasks-modal label {
|
.tasks-modal label {
|
||||||
margin: 5px 0 5px 0;
|
margin: 5px 0 5px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tasks-modal input[type=text] {
|
.tasks-modal input[type="text"] {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tasks-modal hr {
|
.tasks-modal hr {
|
||||||
margin: 10px 0 10px 0;
|
margin: 10px 0 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tasks-modal-date {
|
.tasks-modal-date {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tasks-modal label + input[type=checkbox] {
|
.tasks-modal label + input[type="checkbox"] {
|
||||||
margin-left: 0.67em;
|
margin-left: 0.67em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tasks-modal-priority {
|
||||||
|
line-height: 1.41;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tasks-modal-priority input {
|
||||||
|
margin-left: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tasks-modal-priority label {
|
||||||
|
border-radius: var(--input-radius);
|
||||||
|
padding: 2px 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tasks-modal-priority input:focus + label {
|
||||||
|
box-shadow: 0 0 0 2px var(--background-modifier-border-focus);
|
||||||
|
border-color: var(--background-modifier-border-focus);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tasks-modal-priority label > span:nth-child(2) {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tasks-modal-priority input:not(:checked) + label > span:first-child {
|
||||||
|
filter: grayscale(100%) opacity(60%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tasks-modal-priority label > span:nth-child(2)::first-letter {
|
||||||
|
text-decoration: underline;
|
||||||
|
text-underline-offset: 1pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tasks-modal-priority input:checked + label > span:nth-child(2) {
|
||||||
|
text-shadow: 0px 0px 1px var(--text-normal);
|
||||||
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"name": "AnuPpuccin",
|
||||||
|
"version": "1.1.4",
|
||||||
|
"minAppVersion": "0.16.0",
|
||||||
|
"author": "Anubis",
|
||||||
|
"authorUrl": "https://github.com/AnubisNekhet"
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "Atom",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"minAppVersion": "0.16.0",
|
||||||
|
"author": "kognise"
|
||||||
|
}
|
@ -0,0 +1,472 @@
|
|||||||
|
.theme-dark {
|
||||||
|
--background-primary: #272b34;
|
||||||
|
--background-primary-alt: #20242b;
|
||||||
|
--background-secondary: #20242b;
|
||||||
|
--background-secondary-alt: #1a1e24;
|
||||||
|
--background-accent: #000;
|
||||||
|
--background-modifier-border: #424958;
|
||||||
|
--background-modifier-form-field: rgba(0, 0, 0, 0.3);
|
||||||
|
--background-modifier-form-field-highlighted: rgba(0, 0, 0, 0.22);
|
||||||
|
--background-modifier-box-shadow: rgba(0, 0, 0, 0.3);
|
||||||
|
--background-modifier-success: #539126;
|
||||||
|
--background-modifier-error: #3d0000;
|
||||||
|
--background-modifier-error-rgb: 61, 0, 0;
|
||||||
|
--background-modifier-error-hover: #470000;
|
||||||
|
--background-modifier-cover: rgba(0, 0, 0, 0.6);
|
||||||
|
--text-accent: #61afef;
|
||||||
|
--text-accent-hover: #69bafd;
|
||||||
|
--text-normal: #dcddde;
|
||||||
|
--text-muted: #888;
|
||||||
|
--text-faint: rgb(81, 86, 99);
|
||||||
|
--text-error: #e16d76;
|
||||||
|
--text-error-hover: #c9626a;
|
||||||
|
--text-highlight-bg: rgba(255, 255, 0, 0.4);
|
||||||
|
--text-selection: rgba(0, 122, 255, 0.2);
|
||||||
|
--text-on-accent: #dcddde;
|
||||||
|
--interactive-normal: #20242b;
|
||||||
|
--interactive-hover: #353b47;
|
||||||
|
--interactive-accent: #4c78cc;
|
||||||
|
--interactive-accent-rgb: 76, 120, 204;
|
||||||
|
--interactive-accent-hover: #5082df;
|
||||||
|
--scrollbar-active-thumb-bg: rgba(255, 255, 255, 0.2);
|
||||||
|
--scrollbar-bg: rgba(255, 255, 255, 0.05);
|
||||||
|
--scrollbar-thumb-bg: rgba(255, 255, 255, 0.1);
|
||||||
|
--panel-border-color: #18191e;
|
||||||
|
--gray-1: #5C6370;
|
||||||
|
--gray-2: #abb2bf;
|
||||||
|
--red: #e06c75;
|
||||||
|
--orange: #d19a66;
|
||||||
|
--green: #98c379;
|
||||||
|
--aqua: #56b6c2;
|
||||||
|
--purple: #c678dd;
|
||||||
|
--blue: #61afef;
|
||||||
|
--yellow: #e5c07b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-light {
|
||||||
|
--background-primary: #fafafa;
|
||||||
|
--background-primary-alt: #eaeaeb;
|
||||||
|
--background-secondary: #eaeaeb;
|
||||||
|
--background-secondary-alt: #dbdbdc;
|
||||||
|
--background-accent: #fff;
|
||||||
|
--background-modifier-border: #dbdbdc;
|
||||||
|
--background-modifier-form-field: #fff;
|
||||||
|
--background-modifier-form-field-highlighted: #fff;
|
||||||
|
--background-modifier-box-shadow: rgba(0, 0, 0, 0.1);
|
||||||
|
--background-modifier-success: #A4E7C3;
|
||||||
|
--background-modifier-error: #e68787;
|
||||||
|
--background-modifier-error-rgb: 230, 135, 135;
|
||||||
|
--background-modifier-error-hover: #FF9494;
|
||||||
|
--background-modifier-cover: rgba(0, 0, 0, 0.8);
|
||||||
|
--text-accent: #1592ff;
|
||||||
|
--text-accent-hover: #2d9dff;
|
||||||
|
--text-normal: #383a42;
|
||||||
|
--text-muted: #8e8e90;
|
||||||
|
--text-faint: #999999;
|
||||||
|
--text-error: #e75545;
|
||||||
|
--text-error-hover: #f86959;
|
||||||
|
--text-highlight-bg: rgba(255, 255, 0, 0.4);
|
||||||
|
--text-selection: rgba(0, 122, 255, 0.15);
|
||||||
|
--text-on-accent: #f2f2f2;
|
||||||
|
--interactive-normal: #eaeaeb;
|
||||||
|
--interactive-hover: #dbdbdc;
|
||||||
|
--interactive-accent-rgb: 21, 146, 255;
|
||||||
|
--interactive-accent: #5871ef;
|
||||||
|
--interactive-accent-hover: #445bd1;
|
||||||
|
--scrollbar-active-thumb-bg: rgba(0, 0, 0, 0.2);
|
||||||
|
--scrollbar-bg: rgba(0, 0, 0, 0.05);
|
||||||
|
--scrollbar-thumb-bg: rgba(0, 0, 0, 0.1);
|
||||||
|
--panel-border-color: #dbdbdc;
|
||||||
|
--gray-1: #383a42;
|
||||||
|
--gray-2: #383a42;
|
||||||
|
--red: #e75545;
|
||||||
|
--green: #4ea24c;
|
||||||
|
--blue: #3d74f6;
|
||||||
|
--purple: #a625a4;
|
||||||
|
--aqua: #0084bc;
|
||||||
|
--yellow: #e35649;
|
||||||
|
--orange: #986800;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
-webkit-font-smoothing: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titlebar {
|
||||||
|
background-color: var(--background-secondary-alt);
|
||||||
|
}
|
||||||
|
|
||||||
|
.titlebar-inner {
|
||||||
|
color: var(--text-normal);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip {
|
||||||
|
background-color: var(--background-secondary-alt);
|
||||||
|
color: var(--text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip:not(.mod-right):not(.mod-left):not(.mod-top) .tooltip-arrow {
|
||||||
|
border-bottom-color: var(--background-secondary-alt) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mod-right .tooltip-arrow {
|
||||||
|
border-right-color: var(--background-secondary-alt) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mod-left .tooltip-arrow {
|
||||||
|
border-left-color: var(--background-secondary-alt) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mod-top .tooltip-arrow {
|
||||||
|
border-top-color: var(--background-secondary-alt) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown {
|
||||||
|
cursor: pointer;
|
||||||
|
background-image: url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%234c78cc%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown:hover {
|
||||||
|
background-color: var(--background-modifier-form-field);
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-result-file-title {
|
||||||
|
color: var(--blue);
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
padding-top: 0.5px;
|
||||||
|
padding-bottom: 0.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.tag, a.tag:hover {
|
||||||
|
color: var(--yellow);
|
||||||
|
background-color: var(--background-primary-alt);
|
||||||
|
padding: 2px 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-preview-view .task-list-item-checkbox {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 1px solid var(--text-muted);
|
||||||
|
border-radius: 2px;
|
||||||
|
position: relative;
|
||||||
|
width: 1.3em;
|
||||||
|
height: 1.3em;
|
||||||
|
margin: 0;
|
||||||
|
filter: none;
|
||||||
|
outline: none;
|
||||||
|
margin-right: 4px;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
cursor: pointer;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-preview-view .task-list-item-checkbox:checked {
|
||||||
|
border: none;
|
||||||
|
background-color: var(--interactive-accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-preview-view .task-list-item-checkbox:checked::before {
|
||||||
|
content: ' ';
|
||||||
|
position: absolute;
|
||||||
|
background-color: white;
|
||||||
|
left: 2px;
|
||||||
|
top: 2px;
|
||||||
|
right: 2px;
|
||||||
|
bottom: 2px;
|
||||||
|
-webkit-mask-image: url('data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 14 14\'%3E%3Cpolygon points=\'5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039\'%3E%3C/polygon%3E%3C/svg%3E');
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-preview-view .task-list-item.is-checked a {
|
||||||
|
filter: saturate(0.8) brightness(0.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-formatting-task {
|
||||||
|
font-family: var(--font-monospace);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-file, .nav-folder {
|
||||||
|
padding: 1px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-file-title, .nav-folder-title {
|
||||||
|
width: 100%;
|
||||||
|
cursor: default;
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
flex-direction: row;
|
||||||
|
--text-normal: var(--text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
body:not(.is-grabbing) .nav-file .nav-file-title:hover:not(.is-active), body:not(.is-grabbing) .nav-folder .nav-folder-title:hover:not(.is-active) {
|
||||||
|
--background-secondary-alt: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-file .is-active {
|
||||||
|
--background-secondary-alt: var(--interactive-accent);
|
||||||
|
--text-normal: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-file-title-content, .nav-folder-title-content {
|
||||||
|
text-indent: 0;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-preview-view.is-readable-line-width .markdown-preview-section, .markdown-source-view.is-readable-line-width .CodeMirror {
|
||||||
|
max-width: 900px !important;
|
||||||
|
line-height: 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
margin: 20px 0;
|
||||||
|
border-radius: 4px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
--font-monospace: 'Fira Code', 'Source Code Pro', monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
mjx-container[jax='CHTML'] {
|
||||||
|
text-align: left;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.math-block {
|
||||||
|
font-size: 1.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-s-obsidian pre.HyperMD-codeblock, .cm-s-obsidian span.cm-inline-code, .cm-s-obsidian span.cm-math:not(.cm-formatting-math-begin):not(.cm-formatting-math-end), .markdown-preview-view code {
|
||||||
|
/* fix `` tag color */
|
||||||
|
color: #98c379;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-s-obsidian span.cm-inline-code, .cm-s-obsidian span.cm-math, .cm-s-obsidian span.hmd-fold-math-placeholder {
|
||||||
|
/* fix tag size */
|
||||||
|
font-weight: 100;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-preview-view code {
|
||||||
|
vertical-align: 0;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-preview-section:not(:first-child) h1, .markdown-preview-section:not(:first-child) h2, .markdown-preview-section:not(:first-child) h3, .markdown-preview-section:not(:first-child) h4, .markdown-preview-section:not(:first-child) h5, .markdown-preview-section:not(:first-child) h6 {
|
||||||
|
margin-top: 40px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-preview-section h1, .markdown-preview-section h2, .markdown-preview-section h3, .markdown-preview-section h4, .markdown-preview-section h5, .markdown-preview-section h6 {
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6, strong, b, .view-header-title {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workspace>.workspace-split>.workspace-leaf:first-of-type:last-of-type .view-header {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-bar, .side-dock.mod-right, .side-dock.mod-left {
|
||||||
|
border-color: var(--panel-border-color);
|
||||||
|
border-width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-bar {
|
||||||
|
--bar-vertical-padding: 4px;
|
||||||
|
--bar-height: calc(22px + (var(--bar-vertical-padding) * 2));
|
||||||
|
line-height: 20px;
|
||||||
|
padding: 0 20px;
|
||||||
|
height: var(--bar-height);
|
||||||
|
max-height: var(--bar-height);
|
||||||
|
min-height: var(--bar-height);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-bar-item {
|
||||||
|
margin: auto 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-bar-item>* {
|
||||||
|
padding-top: var(--bar-vertical-padding) !important;
|
||||||
|
padding-bottom: var(--bar-vertical-padding) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.side-dock-plugin-panel-inner {
|
||||||
|
padding-left: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a, .markdown-preview-view .internal-link {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover, .markdown-preview-view .internal-link:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-dark :not(pre)>code[class*='language-'], .theme-dark pre[class*='language-'] {
|
||||||
|
background: var(--background-primary-alt);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-light :not(pre)>code[class*='language-'], .theme-light pre[class*='language-'] {
|
||||||
|
background: var(--background-primary);
|
||||||
|
box-shadow: inset 0 0 0 1px var(--background-primary-alt);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-embed:not(.hover-popover .markdown-embed), .file-embed {
|
||||||
|
margin: 0;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin: 0 !important;
|
||||||
|
margin-inline-start: 30px !important;
|
||||||
|
margin-inline-end: 30px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-embed {
|
||||||
|
border: 1px solid var(--background-modifier-border);
|
||||||
|
border-left-width: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-embed .markdown-preview-view {
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-embed-link, .file-embed-link {
|
||||||
|
left: 8px;
|
||||||
|
right: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-light .token.operator, .theme-light .token.entity, .theme-light .token.url, .theme-light .language-css .token.string, .theme-light .style .token.string {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Source: https://github.com/AGMStudio/prism-theme-one-dark */
|
||||||
|
|
||||||
|
code[class*='language-'], pre[class*='language-'] {
|
||||||
|
text-align: left !important;
|
||||||
|
white-space: pre !important;
|
||||||
|
word-spacing: normal !important;
|
||||||
|
word-break: normal !important;
|
||||||
|
word-wrap: normal !important;
|
||||||
|
line-height: 1.5 !important;
|
||||||
|
-moz-tab-size: 4 !important;
|
||||||
|
-o-tab-size: 4 !important;
|
||||||
|
tab-size: 4 !important;
|
||||||
|
-webkit-hyphens: none !important;
|
||||||
|
-moz-hyphens: none !important;
|
||||||
|
-ms-hyphens: none !important;
|
||||||
|
hyphens: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Code blocks */
|
||||||
|
|
||||||
|
pre[class*='language-'] {
|
||||||
|
padding: 1em !important;
|
||||||
|
margin: .5em 0 !important;
|
||||||
|
overflow: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Inline code */
|
||||||
|
|
||||||
|
:not(pre)>code[class*='language-'] {
|
||||||
|
padding: .1em !important;
|
||||||
|
border-radius: .3em !important;
|
||||||
|
white-space: normal !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token.comment, .token.prolog, .token.doctype, .token.cdata {
|
||||||
|
color: var(--gray-1) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token.punctuation {
|
||||||
|
color: var(--gray-2) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token.selector, .token.tag {
|
||||||
|
color: var(--red) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token.property, .token.boolean, .token.number, .token.constant, .token.symbol, .token.attr-name, .token.deleted {
|
||||||
|
color: var(--orange) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token.string, .token.char, .token.attr-value, .token.builtin, .token.inserted {
|
||||||
|
color: var(--green) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string {
|
||||||
|
color: var(--aqua) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token.atrule, .token.keyword {
|
||||||
|
color: var(--purple) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token.function, .token.macro.property {
|
||||||
|
color: var(--blue) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token.class-name {
|
||||||
|
color: var(--yellow) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token.regex, .token.important, .token.variable {
|
||||||
|
color: var(--purple) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token.important, .token.bold {
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token.italic {
|
||||||
|
font-style: italic !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token.entity {
|
||||||
|
cursor: help !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre.line-numbers {
|
||||||
|
position: relative !important;
|
||||||
|
padding-left: 3.8em !important;
|
||||||
|
counter-reset: linenumber !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre.line-numbers>code {
|
||||||
|
position: relative !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-numbers .line-numbers-rows {
|
||||||
|
position: absolute !important;
|
||||||
|
pointer-events: none !important;
|
||||||
|
top: 0 !important;
|
||||||
|
font-size: 100% !important;
|
||||||
|
left: -3.8em !important;
|
||||||
|
width: 3em !important;
|
||||||
|
/* works for line-numbers below 1000 lines */
|
||||||
|
letter-spacing: -1px !important;
|
||||||
|
border-right: 0 !important;
|
||||||
|
-webkit-user-select: none !important;
|
||||||
|
-moz-user-select: none !important;
|
||||||
|
-ms-user-select: none !important;
|
||||||
|
user-select: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-numbers-rows>span {
|
||||||
|
pointer-events: none !important;
|
||||||
|
display: block !important;
|
||||||
|
counter-increment: linenumber !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-numbers-rows>span:before {
|
||||||
|
content: counter(linenumber) !important;
|
||||||
|
color: var(--syntax-gray-1) !important;
|
||||||
|
display: block !important;
|
||||||
|
padding-right: 0.8em !important;
|
||||||
|
text-align: right !important;
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"name": "GitHub theme",
|
||||||
|
"version": "1.0.1",
|
||||||
|
"minAppVersion": "1.0.0",
|
||||||
|
"author": "@krios2146",
|
||||||
|
"authorUrl": "https://github.com/krios2146"
|
||||||
|
}
|
@ -0,0 +1,659 @@
|
|||||||
|
body {
|
||||||
|
/* Animations */
|
||||||
|
--anim-duration-none: 0;
|
||||||
|
--anim-duration-superfast: 70ms;
|
||||||
|
--anim-duration-fast: 140ms;
|
||||||
|
--anim-duration-moderate: 300ms;
|
||||||
|
--anim-duration-slow: 560ms;
|
||||||
|
--anim-motion-smooth: cubic-bezier(0.45, 0.05, 0.55, 0.95);
|
||||||
|
--anim-motion-delay: cubic-bezier(0.65, 0.05, 0.36, 1);
|
||||||
|
--anim-motion-jumpy: cubic-bezier(0.68, -0.55, 0.27, 1.55);
|
||||||
|
--anim-motion-swing: cubic-bezier(0, 0.55, 0.45, 1);
|
||||||
|
/* Blockquotes */
|
||||||
|
--blockquote-border-thickness: 2px;
|
||||||
|
--blockquote-border-color: var(--interactive-accent);
|
||||||
|
--blockquote-font-style: normal;
|
||||||
|
--blockquote-color: inherit;
|
||||||
|
--blockquote-background-color: transparent;
|
||||||
|
/* Bold */
|
||||||
|
--bold-weight: var(--font-semibold);
|
||||||
|
--bold-color: inherit;
|
||||||
|
/* Borders */
|
||||||
|
--border-width: 1px;
|
||||||
|
/* Buttons */
|
||||||
|
--button-radius: var(--input-radius);
|
||||||
|
/* Callouts */
|
||||||
|
--callout-border-width: 0px;
|
||||||
|
--callout-border-opacity: 0.25;
|
||||||
|
--callout-padding: var(--size-4-3) var(--size-4-3) var(--size-4-3) var(--size-4-6);
|
||||||
|
--callout-radius: var(--radius-s);
|
||||||
|
--callout-blend-mode: var(--highlight-mix-blend-mode);
|
||||||
|
--callout-title-padding: 0;
|
||||||
|
--callout-title-size: inherit;
|
||||||
|
--callout-content-padding: 0;
|
||||||
|
/* Checkboxes */
|
||||||
|
--checkbox-radius: var(--radius-s);
|
||||||
|
--checkbox-size: 15px;
|
||||||
|
--checkbox-marker-color: var(--background-primary);
|
||||||
|
--checkbox-color: var(--interactive-accent);
|
||||||
|
--checkbox-color-hover: var(--interactive-accent-hover);
|
||||||
|
--checkbox-border-color: var(--text-faint);
|
||||||
|
--checkbox-border-color-hover: var(--text-muted);
|
||||||
|
--checklist-done-decoration: line-through;
|
||||||
|
--checklist-done-color: var(--text-muted);
|
||||||
|
/* Code */
|
||||||
|
--code-size: var(--font-smaller);
|
||||||
|
--code-background: var(--background-primary-alt);
|
||||||
|
--code-normal: var(--text-muted);
|
||||||
|
--code-comment: var(--text-faint);
|
||||||
|
--code-function: var(--color-orange);
|
||||||
|
--code-important: var(--color-orange);
|
||||||
|
--code-keyword: var(--color-red);
|
||||||
|
--code-property: var(--color-blue);
|
||||||
|
--code-punctuation: var(--text-muted);
|
||||||
|
--code-string: var(--color-cyan);
|
||||||
|
--code-tag: var(--color-red);
|
||||||
|
--code-value: var(--color-purple);
|
||||||
|
/* Collapse icons */
|
||||||
|
--collapse-icon-color: var(--text-faint);
|
||||||
|
--collapse-icon-color-collapsed: var(--text-accent);
|
||||||
|
/* Cursor */
|
||||||
|
--cursor: default;
|
||||||
|
--cursor-link: pointer;
|
||||||
|
/* Dialogs - e.g. small modals, confirmations */
|
||||||
|
--dialog-width: 560px;
|
||||||
|
--dialog-max-width: 80vw;
|
||||||
|
--dialog-max-height: 85vh;
|
||||||
|
/* Dividers — between panes */
|
||||||
|
--divider-color: var(--background-modifier-border);
|
||||||
|
--divider-color-hover: var(--interactive-accent);
|
||||||
|
--divider-width: 1px;
|
||||||
|
--divider-width-hover: 3px;
|
||||||
|
--divider-vertical-height: calc(100% - var(--header-height));
|
||||||
|
/* Dragging */
|
||||||
|
--drag-ghost-background: rgba(0, 0, 0, 0.85);
|
||||||
|
--drag-ghost-text-color: #fff;
|
||||||
|
/* Embeds */
|
||||||
|
--embed-background: inherit;
|
||||||
|
--embed-border-left: 2px solid var(--interactive-accent);
|
||||||
|
--embed-border-right: none;
|
||||||
|
--embed-border-top: none;
|
||||||
|
--embed-border-bottom: none;
|
||||||
|
--embed-padding: 0 0 0 var(--size-4-6);
|
||||||
|
--embed-font-style: inherit;
|
||||||
|
/* Blocks */
|
||||||
|
--embed-block-shadow-hover: 0 0 0 1px var(--background-modifier-border),
|
||||||
|
inset 0 0 0 1px var(--background-modifier-border);
|
||||||
|
/* File layout */
|
||||||
|
--file-line-width: 700px;
|
||||||
|
--file-folding-offset: 24px;
|
||||||
|
--file-margins: var(--size-4-8);
|
||||||
|
--file-header-font-size: var(--font-ui-small);
|
||||||
|
--file-header-font-weight: 400;
|
||||||
|
--file-header-border: var(--border-width) solid transparent;
|
||||||
|
--file-header-justify: center;
|
||||||
|
/* Relative font sizes */
|
||||||
|
--font-smallest: 0.8em;
|
||||||
|
--font-smaller: 0.875em;
|
||||||
|
--font-small: 0.933em;
|
||||||
|
/* UI font sizes */
|
||||||
|
--font-ui-smaller: 12px;
|
||||||
|
--font-ui-small: 13px;
|
||||||
|
--font-ui-medium: 15px;
|
||||||
|
--font-ui-large: 20px;
|
||||||
|
/* Font weights */
|
||||||
|
--font-thin: 100;
|
||||||
|
--font-extralight: 200;
|
||||||
|
--font-light: 300;
|
||||||
|
--font-normal: 400;
|
||||||
|
--font-medium: 500;
|
||||||
|
--font-semibold: 600;
|
||||||
|
--font-bold: 700;
|
||||||
|
--font-extrabold: 800;
|
||||||
|
--font-black: 900;
|
||||||
|
/* Footnotes */
|
||||||
|
--footnote-size: var(--font-smaller);
|
||||||
|
/* Graphs */
|
||||||
|
--graph-controls-width: 240px;
|
||||||
|
--graph-text: var(--text-normal);
|
||||||
|
--graph-line: var(--color-base-35, var(--background-modifier-border-focus));
|
||||||
|
--graph-node: var(--text-muted);
|
||||||
|
--graph-node-unresolved: var(--text-faint);
|
||||||
|
--graph-node-focused: var(--text-accent);
|
||||||
|
--graph-node-tag: var(--color-green);
|
||||||
|
--graph-node-attachment: var(--color-yellow);
|
||||||
|
/* Headings */
|
||||||
|
--heading-formatting: var(--text-faint);
|
||||||
|
--h1-color: #7ee787;
|
||||||
|
--h2-color: #7ee787;
|
||||||
|
--h3-color: #7ee787;
|
||||||
|
--h4-color: #7ee787;
|
||||||
|
--h5-color: #7ee787;
|
||||||
|
--h6-color: #7ee787;
|
||||||
|
--h1-font: inherit;
|
||||||
|
--h2-font: inherit;
|
||||||
|
--h3-font: inherit;
|
||||||
|
--h4-font: inherit;
|
||||||
|
--h5-font: inherit;
|
||||||
|
--h6-font: inherit;
|
||||||
|
--h1-line-height: 1.2;
|
||||||
|
--h2-line-height: 1.2;
|
||||||
|
--h3-line-height: 1.3;
|
||||||
|
--h4-line-height: 1.4;
|
||||||
|
--h5-line-height: var(--line-height-normal);
|
||||||
|
--h6-line-height: var(--line-height-normal);
|
||||||
|
--h1-size: 2em;
|
||||||
|
--h2-size: 1.6em;
|
||||||
|
--h3-size: 1.37em;
|
||||||
|
--h4-size: 1.25em;
|
||||||
|
--h5-size: 1.12em;
|
||||||
|
--h6-size: 1.12em;
|
||||||
|
--h1-style: normal;
|
||||||
|
--h2-style: normal;
|
||||||
|
--h3-style: normal;
|
||||||
|
--h4-style: normal;
|
||||||
|
--h5-style: normal;
|
||||||
|
--h6-style: normal;
|
||||||
|
--h1-variant: normal;
|
||||||
|
--h2-variant: normal;
|
||||||
|
--h3-variant: normal;
|
||||||
|
--h4-variant: normal;
|
||||||
|
--h5-variant: normal;
|
||||||
|
--h6-variant: normal;
|
||||||
|
--h1-weight: 700;
|
||||||
|
--h2-weight: 600;
|
||||||
|
--h3-weight: 600;
|
||||||
|
--h4-weight: 600;
|
||||||
|
--h5-weight: 600;
|
||||||
|
--h6-weight: 600;
|
||||||
|
/* View header */
|
||||||
|
--header-height: 40px;
|
||||||
|
/* Horizontal rules */
|
||||||
|
--hr-color: var(--background-modifier-border);
|
||||||
|
--hr-thickness: 2px;
|
||||||
|
/* Icons */
|
||||||
|
--icon-size: var(--icon-m);
|
||||||
|
--icon-stroke: var(--icon-m-stroke-width);
|
||||||
|
--icon-xs: 14px;
|
||||||
|
--icon-s: 16px;
|
||||||
|
--icon-m: 18px;
|
||||||
|
--icon-l: 18px;
|
||||||
|
--icon-xs-stroke-width: 2px;
|
||||||
|
--icon-s-stroke-width: 2px;
|
||||||
|
--icon-m-stroke-width: 1.75px;
|
||||||
|
--icon-l-stroke-width: 1.75px;
|
||||||
|
--icon-color: var(--text-muted);
|
||||||
|
--icon-color-hover: var(--text-muted);
|
||||||
|
--icon-color-active: var(--text-accent);
|
||||||
|
--icon-color-focused: var(--text-normal);
|
||||||
|
--icon-opacity: 0.85;
|
||||||
|
--icon-opacity-hover: 1;
|
||||||
|
--icon-opacity-active: 1;
|
||||||
|
--clickable-icon-radius: var(--radius-s);
|
||||||
|
/* Indentation guide */
|
||||||
|
--indentation-guide-width: 1px;
|
||||||
|
--indentation-guide-color: rgba(var(--mono-rgb-100), 0.12);
|
||||||
|
--indentation-guide-color-active: rgba(var(--mono-rgb-100), 0.3);
|
||||||
|
/* Inline title */
|
||||||
|
--inline-title-color: var(--h1-color);
|
||||||
|
--inline-title-font: var(--h1-font);
|
||||||
|
--inline-title-line-height: var(--h1-line-height);
|
||||||
|
--inline-title-size: var(--h1-size);
|
||||||
|
--inline-title-style: var(--h1-style);
|
||||||
|
--inline-title-variant: var(--h1-variant);
|
||||||
|
--inline-title-weight: var(--h1-weight);
|
||||||
|
/* Inputs */
|
||||||
|
--input-height: 30px;
|
||||||
|
--input-radius: 5px;
|
||||||
|
--input-font-weight: var(--font-normal);
|
||||||
|
--input-border-width: 1px;
|
||||||
|
/* Italic */
|
||||||
|
--italic-color: inherit;
|
||||||
|
/* Z-index */
|
||||||
|
--layer-cover: 5;
|
||||||
|
--layer-sidedock: 10;
|
||||||
|
--layer-status-bar: 15;
|
||||||
|
--layer-popover: 30;
|
||||||
|
--layer-slides: 45;
|
||||||
|
--layer-modal: 50;
|
||||||
|
--layer-notice: 60;
|
||||||
|
--layer-menu: 65;
|
||||||
|
--layer-tooltip: 70;
|
||||||
|
--layer-dragged-item: 80;
|
||||||
|
/* Line heights */
|
||||||
|
--line-height-normal: 1.5;
|
||||||
|
--line-height-tight: 1.3;
|
||||||
|
/* Links */
|
||||||
|
--link-color: var(--text-accent);
|
||||||
|
--link-color-hover: var(--text-accent-hover);
|
||||||
|
--link-decoration: none;
|
||||||
|
--link-decoration-hover: underline;
|
||||||
|
--link-decoration-thickness: auto;
|
||||||
|
--link-external-color: var(--text-accent);
|
||||||
|
--link-external-color-hover: var(--text-accent-hover);
|
||||||
|
--link-external-decoration: none;
|
||||||
|
--link-external-decoration-hover: underline;
|
||||||
|
--link-external-filter: none;
|
||||||
|
--link-unresolved-color: var(--text-accent);
|
||||||
|
--link-unresolved-opacity: 0.7;
|
||||||
|
--link-unresolved-filter: none;
|
||||||
|
--link-unresolved-decoration-style: solid;
|
||||||
|
--link-unresolved-decoration-color: hsla(var(--interactive-accent-hsl), 0.3);
|
||||||
|
/* Lists */
|
||||||
|
--list-indent: 2em;
|
||||||
|
--list-spacing: 0.075em;
|
||||||
|
--list-marker-color: var(--text-faint);
|
||||||
|
--list-marker-color-hover: var(--text-muted);
|
||||||
|
--list-marker-color-collapsed: var(--text-accent);
|
||||||
|
--list-bullet-border: none;
|
||||||
|
--list-bullet-radius: 50%;
|
||||||
|
--list-bullet-size: 5px;
|
||||||
|
--list-bullet-transform: none;
|
||||||
|
/* File navigator */
|
||||||
|
--nav-item-size: var(--font-ui-small);
|
||||||
|
--nav-item-color: var(--text-muted);
|
||||||
|
--nav-item-color-hover: var(--text-normal);
|
||||||
|
--nav-item-color-active: var(--text-normal);
|
||||||
|
--nav-item-color-selected: var(--text-normal);
|
||||||
|
--nav-item-color-highlighted: var(--text-accent-hover);
|
||||||
|
--nav-item-background-hover: var(--background-modifier-hover);
|
||||||
|
--nav-item-background-active: var(--background-modifier-hover);
|
||||||
|
--nav-item-background-selected: hsla(var(--color-accent-hsl), 0.2);
|
||||||
|
--nav-item-padding: var(--size-4-1) var(--size-4-2);
|
||||||
|
--nav-item-weight: inherit;
|
||||||
|
--nav-item-weight-hover: inherit;
|
||||||
|
--nav-item-weight-active: inherit;
|
||||||
|
--nav-item-white-space: nowrap;
|
||||||
|
--nav-indentation-guide-width: var(--indentation-guide-width);
|
||||||
|
--nav-indentation-guide-color: var(--indentation-guide-color);
|
||||||
|
--nav-collapse-icon-color: var(--collapse-icon-color);
|
||||||
|
--nav-collapse-icon-color-collapsed: var(--text-faint);
|
||||||
|
/* Modals - e.g. settings, community themes, community plugins */
|
||||||
|
--modal-background: var(--background-primary);
|
||||||
|
--modal-width: 90vw;
|
||||||
|
--modal-height: 85vh;
|
||||||
|
--modal-max-width: 1100px;
|
||||||
|
--modal-max-height: 1000px;
|
||||||
|
--modal-max-width-narrow: 800px;
|
||||||
|
--modal-border-width: var(--border-width);
|
||||||
|
--modal-border-color: var(--color-base-30, var(--background-modifier-border-focus));
|
||||||
|
--modal-radius: var(--radius-l);
|
||||||
|
--modal-community-sidebar-width: 280px;
|
||||||
|
/* Popovers - file previews */
|
||||||
|
--popover-width: 450px;
|
||||||
|
--popover-height: 400px;
|
||||||
|
--popover-max-height: 70vh;
|
||||||
|
--popover-pdf-width: 600px;
|
||||||
|
--popover-pdf-height: 800px;
|
||||||
|
--popover-font-size: var(--font-text-size);
|
||||||
|
/* Prompts - e.g. quick switcher, command palette */
|
||||||
|
--prompt-width: 700px;
|
||||||
|
--prompt-max-width: 80vw;
|
||||||
|
--prompt-max-height: 70vh;
|
||||||
|
--prompt-border-width: var(--border-width);
|
||||||
|
--prompt-border-color: var(--color-base-40, var(--background-modifier-border-focus));
|
||||||
|
/* Radiuses */
|
||||||
|
--radius-s: 4px;
|
||||||
|
--radius-m: 8px;
|
||||||
|
--radius-l: 10px;
|
||||||
|
--radius-xl: 16px;
|
||||||
|
/* Ribbon */
|
||||||
|
--ribbon-background: var(--background-secondary);
|
||||||
|
--ribbon-background-collapsed: var(--background-primary);
|
||||||
|
--ribbon-width: 44px;
|
||||||
|
--ribbon-padding: var(--size-4-2) var(--size-4-1) var(--size-4-3);
|
||||||
|
/* Scrollbars */
|
||||||
|
--scrollbar-active-thumb-bg: rgba(var(--mono-rgb-100), 0.2);
|
||||||
|
--scrollbar-bg: rgba(var(--mono-rgb-100), 0.05);
|
||||||
|
--scrollbar-thumb-bg: rgba(var(--mono-rgb-100), 0.1);
|
||||||
|
/* Search */
|
||||||
|
--search-clear-button-color: var(--text-muted);
|
||||||
|
--search-clear-button-size: 13px;
|
||||||
|
--search-icon-color: var(--text-muted);
|
||||||
|
--search-icon-size: 18px;
|
||||||
|
--search-result-background: var(--background-primary);
|
||||||
|
/* Layout sizing - for padding and margins */
|
||||||
|
--size-2-1: 2px;
|
||||||
|
--size-2-2: 4px;
|
||||||
|
--size-2-3: 6px;
|
||||||
|
--size-4-1: 4px;
|
||||||
|
--size-4-2: 8px;
|
||||||
|
--size-4-3: 12px;
|
||||||
|
--size-4-4: 16px;
|
||||||
|
--size-4-5: 20px;
|
||||||
|
--size-4-6: 24px;
|
||||||
|
--size-4-8: 32px;
|
||||||
|
--size-4-9: 36px;
|
||||||
|
--size-4-12: 48px;
|
||||||
|
--size-4-16: 64px;
|
||||||
|
--size-4-18: 72px;
|
||||||
|
/* Sidebar */
|
||||||
|
--sidebar-markdown-font-size: calc(var(--font-text-size) * 0.9);
|
||||||
|
--sidebar-tab-text-display: none;
|
||||||
|
/* Sliders */
|
||||||
|
--slider-thumb-border-width: 1px;
|
||||||
|
--slider-thumb-border-color: var(--background-modifier-border-hover);
|
||||||
|
--slider-thumb-height: 18px;
|
||||||
|
--slider-thumb-width: 18px;
|
||||||
|
--slider-thumb-y: -6px;
|
||||||
|
--slider-thumb-radius: 50%;
|
||||||
|
--slider-s-thumb-size: 15px;
|
||||||
|
--slider-s-thumb-position: -5px;
|
||||||
|
--slider-track-background: var(--background-modifier-border);
|
||||||
|
--slider-track-height: 3px;
|
||||||
|
/* Status bar */
|
||||||
|
--status-bar-background: var(--background-secondary);
|
||||||
|
--status-bar-border-color: var(--divider-color);
|
||||||
|
--status-bar-border-width: 1px 0 0 1px;
|
||||||
|
--status-bar-font-size: var(--font-ui-smaller);
|
||||||
|
--status-bar-text-color: var(--text-muted);
|
||||||
|
--status-bar-position: fixed;
|
||||||
|
--status-bar-radius: var(--radius-m) 0 0 0;
|
||||||
|
/* Swatch for color inputs */
|
||||||
|
--swatch-radius: 14px;
|
||||||
|
--swatch-height: 24px;
|
||||||
|
--swatch-width: 24px;
|
||||||
|
--swatch-shadow: inset 0 0 0 1px rgba(var(--mono-rgb-100), 0.15);
|
||||||
|
/* Tabs */
|
||||||
|
--tab-background-active: var(--background-primary);
|
||||||
|
--tab-text-color: var(--text-faint);
|
||||||
|
--tab-text-color-focused: var(--text-muted);
|
||||||
|
--tab-text-color-focused-active: var(--text-normal);
|
||||||
|
--tab-font-size: var(--font-ui-small);
|
||||||
|
--tab-font-weight: inherit;
|
||||||
|
--tab-container-background: var(--background-secondary);
|
||||||
|
--tab-divider-color: var(--background-modifier-border-hover);
|
||||||
|
--tab-outline-color: var(--divider-color);
|
||||||
|
--tab-outline-width: 1px;
|
||||||
|
--tab-curve: 6px;
|
||||||
|
--tab-radius: var(--radius-s);
|
||||||
|
--tab-radius-active: 6px 6px 0 0;
|
||||||
|
--tab-width: 200px;
|
||||||
|
--tab-max-width: 320px;
|
||||||
|
/* Stacked tabs */
|
||||||
|
--tab-stacked-pane-width: 700px;
|
||||||
|
--tab-stacked-header-width: var(--header-height);
|
||||||
|
--tab-stacked-font-size: var(--font-ui-small);
|
||||||
|
--tab-stacked-font-weight: 400;
|
||||||
|
--tab-stacked-text-align: left;
|
||||||
|
--tab-stacked-text-transform: rotate(0deg);
|
||||||
|
--tab-stacked-text-writing-mode: vertical-lr;
|
||||||
|
--tab-stacked-shadow: -8px 0 8px 0 rgba(0, 0, 0, 0.05);
|
||||||
|
/* Tables */
|
||||||
|
--table-background: transparent;
|
||||||
|
--table-border-width: 1px;
|
||||||
|
--table-border-color: var(--background-modifier-border);
|
||||||
|
--table-white-space: normal;
|
||||||
|
--table-header-background: var(--table-background);
|
||||||
|
--table-header-background-hover: inherit;
|
||||||
|
--table-header-border-width: var(--table-border-width);
|
||||||
|
--table-header-border-color: var(--table-border-color);
|
||||||
|
--table-header-font: inherit;
|
||||||
|
--table-header-size: var(--font-smaller);
|
||||||
|
--table-header-weight: var(--font-normal);
|
||||||
|
--table-header-color: var(--text-muted);
|
||||||
|
--table-text-size: inherit;
|
||||||
|
--table-text-color: inherit;
|
||||||
|
--table-column-max-width: none;
|
||||||
|
--table-column-alt-background: var(--table-background);
|
||||||
|
--table-column-first-border-width: var(--table-border-width);
|
||||||
|
--table-column-last-border-width: var(--table-border-width);
|
||||||
|
--table-row-background-hover: var(--table-background);
|
||||||
|
--table-row-alt-background: var(--table-background);
|
||||||
|
--table-row-last-border-width: var(--table-border-width);
|
||||||
|
/* Tags */
|
||||||
|
--tag-size: var(--font-smaller);
|
||||||
|
--tag-color: var(--text-accent);
|
||||||
|
--tag-color-hover: var(--text-accent);
|
||||||
|
--tag-decoration: none;
|
||||||
|
--tag-decoration-hover: none;
|
||||||
|
--tag-background: hsla(var(--interactive-accent-hsl), 0.1);
|
||||||
|
--tag-background-hover: hsla(var(--interactive-accent-hsl), 0.2);
|
||||||
|
--tag-border-color: hsla(var(--interactive-accent-hsl), 0.15);
|
||||||
|
--tag-border-color-hover: hsla(var(--interactive-accent-hsl), 0.15);
|
||||||
|
--tag-border-width: 0px;
|
||||||
|
--tag-padding-x: 0.65em;
|
||||||
|
--tag-padding-y: 0.25em;
|
||||||
|
--tag-radius: 2em;
|
||||||
|
/* Window frame */
|
||||||
|
--titlebar-background: var(--background-secondary);
|
||||||
|
--titlebar-background-focused: var(--background-secondary-alt);
|
||||||
|
--titlebar-border-width: 0px;
|
||||||
|
--titlebar-border-color: var(--background-modifier-border);
|
||||||
|
--titlebar-text-color: var(--text-muted);
|
||||||
|
--titlebar-text-color-focused: var(--text-normal);
|
||||||
|
--titlebar-text-color-highlighted: var(--text-accent-hover);
|
||||||
|
--titlebar-text-weight: var(--font-bold);
|
||||||
|
/* Toggles */
|
||||||
|
--toggle-border-width: 2px;
|
||||||
|
--toggle-width: 40px;
|
||||||
|
--toggle-radius: 18px;
|
||||||
|
--toggle-thumb-color: white;
|
||||||
|
--toggle-thumb-radius: 18px;
|
||||||
|
--toggle-thumb-height: 18px;
|
||||||
|
--toggle-thumb-width: 18px;
|
||||||
|
--toggle-s-border-width: 2px;
|
||||||
|
--toggle-s-width: 34px;
|
||||||
|
--toggle-s-thumb-height: 15px;
|
||||||
|
--toggle-s-thumb-width: 15px;
|
||||||
|
/* Vault name */
|
||||||
|
--vault-name-font-size: var(--font-ui-small);
|
||||||
|
--vault-name-font-weight: var(--font-medium);
|
||||||
|
--vault-name-color: var(--text-normal);
|
||||||
|
/* Workspace */
|
||||||
|
--workspace-background-translucent: rgba(var(--mono-rgb-0), 0.6);
|
||||||
|
/* Color mappings ------------------------ */
|
||||||
|
/* Accent HSL values */
|
||||||
|
--accent-h: 212;
|
||||||
|
--accent-s: 100%;
|
||||||
|
--accent-l: 67%;
|
||||||
|
/* Backgrounds */
|
||||||
|
--background-primary: var(--color-base-00);
|
||||||
|
--background-primary-alt: var(--color-base-10);
|
||||||
|
--background-secondary: var(--color-base-20);
|
||||||
|
--background-modifier-hover: rgba(var(--mono-rgb-100), 0.12);
|
||||||
|
--background-modifier-active-hover: hsla(var(--interactive-accent-hsl), 0.15);
|
||||||
|
--background-modifier-border: var(--color-base-30);
|
||||||
|
--background-modifier-border-hover: var(--color-base-30);
|
||||||
|
--background-modifier-border-focus: var(--color-accent);
|
||||||
|
--background-modifier-error-rgb: var(--color-red-rgb);
|
||||||
|
--background-modifier-error: var(--color-red);
|
||||||
|
--background-modifier-error-hover: var(--color-red);
|
||||||
|
--background-modifier-success-rgb: var(--color-green-rgb);
|
||||||
|
--background-modifier-success: var(--color-green);
|
||||||
|
--background-modifier-message: rgba(0, 0, 0, 0.9);
|
||||||
|
/* Inputs */
|
||||||
|
--background-modifier-form-field: var(--color-base-00);
|
||||||
|
/* Text */
|
||||||
|
--text-normal: var(--color-base-100);
|
||||||
|
--text-muted: var(--color-base-70);
|
||||||
|
--text-faint: var(--color-base-50);
|
||||||
|
--text-on-accent: white;
|
||||||
|
--text-error: var(--color-red);
|
||||||
|
--text-success: var(--color-green);
|
||||||
|
--text-selection: hsla(var(--color-accent-hsl), 0.2);
|
||||||
|
--text-accent: var(--color-accent);
|
||||||
|
--text-accent-hover: var(--color-accent-2);
|
||||||
|
--interactive-normal: var(--color-base-00);
|
||||||
|
--interactive-hover: var(--color-base-10);
|
||||||
|
--interactive-accent-hsl: var(--color-accent-hsl);
|
||||||
|
--interactive-accent: var(--color-accent-1);
|
||||||
|
--interactive-accent-hover: var(--color-accent-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-dark {
|
||||||
|
color-scheme: dark;
|
||||||
|
--highlight-mix-blend-mode: lighten;
|
||||||
|
--mono-rgb-0: 0, 0, 0;
|
||||||
|
--mono-rgb-100: 177, 186, 196;
|
||||||
|
--color-red-rgb: 248, 81, 73;
|
||||||
|
--color-red: #F47067;
|
||||||
|
--color-green-rgb: 126, 231, 135;
|
||||||
|
--color-green: #7ee787;
|
||||||
|
--color-orange: #FFA657;
|
||||||
|
--color-yellow: #d29922;
|
||||||
|
--color-cyan: #A5D6FF;
|
||||||
|
--color-blue: #6CB6FF;
|
||||||
|
--color-purple: #D2A8FF;
|
||||||
|
--color-pink: #f778ba;
|
||||||
|
--color-base-00: #0d1117;
|
||||||
|
--color-base-10: #161b22;
|
||||||
|
--color-base-20: #161b22;
|
||||||
|
--color-base-25: #010409;
|
||||||
|
--color-base-30: #30363d;
|
||||||
|
--color-base-35: #21262d;
|
||||||
|
--color-base-40: #30363d;
|
||||||
|
--color-base-50: #6e7681;
|
||||||
|
--color-base-60: #999;
|
||||||
|
--color-base-70: #8b949e;
|
||||||
|
--color-base-100: #c9d1d9;
|
||||||
|
--color-accent-hsl: var(--accent-h), var(--accent-s), var(--accent-l);
|
||||||
|
--color-accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
|
||||||
|
--color-accent-1: hsl(var(--accent-h), var(--accent-s), calc(var(--accent-l) - 3.8%));
|
||||||
|
--color-accent-2: hsl(var(--accent-h), var(--accent-s), calc(var(--accent-l) + 3.8%));
|
||||||
|
--background-modifier-form-field: var(--color-base-25);
|
||||||
|
--background-secondary-alt: var(--color-base-25);
|
||||||
|
--interactive-normal: var(--color-base-35);
|
||||||
|
--interactive-hover: var(--color-base-40);
|
||||||
|
--background-modifier-box-shadow: rgba(0, 0, 0, 0.3);
|
||||||
|
--background-modifier-cover: rgba(10, 10, 10, 0.4);
|
||||||
|
--text-highlight-bg: rgba(255, 208, 0, 0.4);
|
||||||
|
--text-highlight-bg-active: rgba(255, 128, 0, 0.4);
|
||||||
|
--text-selection: hsla(var(--interactive-accent-hsl), 0.4);
|
||||||
|
--input-shadow: none;
|
||||||
|
--input-shadow-hover: none;
|
||||||
|
--shadow-s: none;
|
||||||
|
--shadow-l: none;
|
||||||
|
}
|
||||||
|
.is-mobile.theme-dark {
|
||||||
|
--color-base-00: #0d1117;
|
||||||
|
--color-base-10: #161b22;
|
||||||
|
--color-base-20: #161b22;
|
||||||
|
--tag-background: hsla(var(--interactive-accent-hsl), 0.2);
|
||||||
|
--modal-background: var(--background-secondary);
|
||||||
|
--search-result-background: var(--background-secondary);
|
||||||
|
--background-modifier-form-field: var(--background-modifier-border);
|
||||||
|
--background-modifier-cover: rgba(0, 0, 0, 0.5);
|
||||||
|
--background-modifier-hover: rgba(var(--mono-rgb-100), 0.15);
|
||||||
|
--settings-home-background: var(--background-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tables */
|
||||||
|
.markdown-rendered th {
|
||||||
|
color: var(--text-normal);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.markdown-rendered td,
|
||||||
|
.markdown-rendered th {
|
||||||
|
padding: var(--size-2-3) var(--size-4-3);
|
||||||
|
}
|
||||||
|
.markdown-rendered tbody tr:nth-child(2n) {
|
||||||
|
background-color: var(--background-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Buttons */
|
||||||
|
button {
|
||||||
|
border: 1px solid #f0f6fc1a;
|
||||||
|
transition: 80ms cubic-bezier(0.33, 1, 0.68, 1);
|
||||||
|
}
|
||||||
|
.theme-dark .dropdown {
|
||||||
|
border: 1px solid #f0f6fc1a;
|
||||||
|
}
|
||||||
|
.theme-dark .dropdown:hover {
|
||||||
|
border: 1px solid var(--color-base-70);
|
||||||
|
}
|
||||||
|
button:hover {
|
||||||
|
border: 1px solid var(--color-base-70);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
button.mod-cta {
|
||||||
|
background-color: #238636;
|
||||||
|
color: var(--text-on-accent);
|
||||||
|
}
|
||||||
|
button.mod-cta:hover {
|
||||||
|
border-color: #f0f6fc1a;
|
||||||
|
background-color: #2ea043;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Kanban */
|
||||||
|
.kanban-plugin {
|
||||||
|
background-color: var(--background-primary);
|
||||||
|
}
|
||||||
|
.kanban-plugin__lane {
|
||||||
|
background-color: var(--background-secondary-alt);
|
||||||
|
border: 1px solid var(--color-base-35);
|
||||||
|
}
|
||||||
|
.kanban-plugin__lane-title {
|
||||||
|
flex-grow: 0;
|
||||||
|
width: fit-content;
|
||||||
|
}
|
||||||
|
.kanban-plugin__item-content-wrapper,
|
||||||
|
.kanban-plugin__item-title-wrapper {
|
||||||
|
background: var(--background-primary-alt);
|
||||||
|
}
|
||||||
|
.kanban-plugin__icon>svg {
|
||||||
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
|
.kanban-plugin__lane-settings-button-wrapper {
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
div.kanban-plugin__lane-title-count {
|
||||||
|
background-color: var(--color-base-35);
|
||||||
|
border-radius: 1em;
|
||||||
|
padding: 2px 5px;
|
||||||
|
}
|
||||||
|
.kanban-plugin__item button.kanban-plugin__item-prefix-button,
|
||||||
|
.kanban-plugin__item button.kanban-plugin__item-postfix-button,
|
||||||
|
.kanban-plugin__lane button.kanban-plugin__lane-settings-button {
|
||||||
|
padding: 0 5px;
|
||||||
|
height: 24px;
|
||||||
|
}
|
||||||
|
.kanban-plugin__item button.kanban-plugin__item-prefix-button:hover,
|
||||||
|
.kanban-plugin__item button.kanban-plugin__item-postfix-button:hover,
|
||||||
|
.kanban-plugin__lane button.kanban-plugin__lane-settings-button:hover {
|
||||||
|
background-color: var(--color-base-30);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
button.kanban-plugin__new-item-button {
|
||||||
|
border: none;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
.kanban-plugin__new-item-button:hover {
|
||||||
|
color: var(--text-normal);
|
||||||
|
background-color: inherit;
|
||||||
|
}
|
||||||
|
.kanban-plugin__lane-items {
|
||||||
|
padding: 8px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* fix: input borders */
|
||||||
|
textarea:active,
|
||||||
|
input[type='text']:active,
|
||||||
|
input[type='search']:active,
|
||||||
|
input[type='email']:active,
|
||||||
|
input[type='password']:active,
|
||||||
|
input[type='number']:active,
|
||||||
|
textarea:focus,
|
||||||
|
input[type='text']:focus,
|
||||||
|
input[type='search']:focus,
|
||||||
|
input[type='email']:focus,
|
||||||
|
input[type='password']:focus,
|
||||||
|
input[type='number']:focus,
|
||||||
|
textarea:focus-visible,
|
||||||
|
input[type='text']:focus-visible,
|
||||||
|
input[type='search']:focus-visible,
|
||||||
|
input[type='email']:focus-visible,
|
||||||
|
input[type='password']:focus-visible,
|
||||||
|
input[type='number']:focus-visible,
|
||||||
|
select:focus, .dropdown:focus {
|
||||||
|
box-shadow: 0 0 0 1px var(--background-modifier-border-focus);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* inline code block */
|
||||||
|
.markdown-rendered :not(pre) > code {
|
||||||
|
background-color: #6e768166;
|
||||||
|
padding: 0.2em 0.4em;
|
||||||
|
border-radius: 6px;
|
||||||
|
color: var(--color-base-100);
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "Primary",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"minAppVersion": "0.16.0",
|
||||||
|
"author": "Cecilia May"
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,114 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
title: "🗒 Daily Note"
|
||||||
|
allDay: true
|
||||||
|
date: 2022-10-28
|
||||||
|
Date: 2022-10-28
|
||||||
|
DocType: Note
|
||||||
|
Hierarchy:
|
||||||
|
TimeStamp:
|
||||||
|
location:
|
||||||
|
CollapseMetaTable: true
|
||||||
|
Sleep: 8
|
||||||
|
Happiness: 90
|
||||||
|
Gratefulness: 90
|
||||||
|
Stress: 25
|
||||||
|
FrontHeadBar: 5
|
||||||
|
EarHeadBar: 30
|
||||||
|
BackHeadBar: 20
|
||||||
|
Water: 1.25
|
||||||
|
Coffee: 4
|
||||||
|
Steps: 15832
|
||||||
|
Ski:
|
||||||
|
Riding:
|
||||||
|
Racket:
|
||||||
|
Football:
|
||||||
|
Swim:
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
%% Parent:: [[@Life Admin]] %%
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[[2022-10-27|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2022-10-29|🗓 Next >>]]
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
```button
|
||||||
|
name Record today's health
|
||||||
|
type command
|
||||||
|
action MetaEdit: Run MetaEdit
|
||||||
|
id EditMetaData
|
||||||
|
```
|
||||||
|
^button-2022-10-28Edit
|
||||||
|
|
||||||
|
```button
|
||||||
|
name Save
|
||||||
|
type command
|
||||||
|
action Save current file
|
||||||
|
id Save
|
||||||
|
```
|
||||||
|
^button-2022-10-28NSave
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
# 2022-10-28
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
> [!summary]+
|
||||||
|
> Daily note for 2022-10-28
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
```toc
|
||||||
|
style: number
|
||||||
|
```
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
### 📝 Memos
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
This section does serve for quick memos.
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
|
||||||
|
%% --- %%
|
||||||
|
 
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
### 🗒 Notes
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
Loret ipsum
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
### :link: Linked activity
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
```dataview
|
||||||
|
Table from [[2022-10-28]]
|
||||||
|
```
|
||||||
|
|
||||||
|
 
|
||||||
|
 
|
@ -0,0 +1,115 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
title: "🗒 Daily Note"
|
||||||
|
allDay: true
|
||||||
|
date: 2022-10-29
|
||||||
|
Date: 2022-10-29
|
||||||
|
DocType: Note
|
||||||
|
Hierarchy:
|
||||||
|
TimeStamp:
|
||||||
|
location:
|
||||||
|
CollapseMetaTable: true
|
||||||
|
Sleep: 8
|
||||||
|
Happiness: 90
|
||||||
|
Gratefulness: 90
|
||||||
|
Stress: 25
|
||||||
|
FrontHeadBar: 5
|
||||||
|
EarHeadBar: 30
|
||||||
|
BackHeadBar: 20
|
||||||
|
Water: 2.55
|
||||||
|
Coffee: 3
|
||||||
|
Steps: 13757
|
||||||
|
Ski:
|
||||||
|
Riding:
|
||||||
|
Racket:
|
||||||
|
Football:
|
||||||
|
Swim:
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
%% Parent:: [[@Life Admin]] %%
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[[2022-10-28|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2022-10-30|🗓 Next >>]]
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
```button
|
||||||
|
name Record today's health
|
||||||
|
type command
|
||||||
|
action MetaEdit: Run MetaEdit
|
||||||
|
id EditMetaData
|
||||||
|
```
|
||||||
|
^button-2022-10-29Edit
|
||||||
|
|
||||||
|
```button
|
||||||
|
name Save
|
||||||
|
type command
|
||||||
|
action Save current file
|
||||||
|
id Save
|
||||||
|
```
|
||||||
|
^button-2022-10-29NSave
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
# 2022-10-29
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
> [!summary]+
|
||||||
|
> Daily note for 2022-10-29
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
```toc
|
||||||
|
style: number
|
||||||
|
```
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
### 📝 Memos
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
This section does serve for quick memos.
|
||||||
|
|
||||||
|
 
|
||||||
|
- 19:37 [[2022-10-29|today]], [[Crispy Salmon with Bulgur]]
|
||||||
|
|
||||||
|
|
||||||
|
%% --- %%
|
||||||
|
 
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
### 🗒 Notes
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
Loret ipsum
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
### :link: Linked activity
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
```dataview
|
||||||
|
Table from [[2022-10-29]]
|
||||||
|
```
|
||||||
|
|
||||||
|
 
|
||||||
|
 
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,94 @@
|
|||||||
|
---
|
||||||
|
type: "movie"
|
||||||
|
subType: null
|
||||||
|
title: "Hail, Caesar!"
|
||||||
|
englishTitle: "Hail, Caesar!"
|
||||||
|
year: "2016"
|
||||||
|
dataSource: "OMDbAPI"
|
||||||
|
url: "https://www.imdb.com/title/tt0475290/"
|
||||||
|
id: "tt0475290"
|
||||||
|
genres:
|
||||||
|
- "Comedy"
|
||||||
|
- "Drama"
|
||||||
|
- "Mystery"
|
||||||
|
producer: "Ethan Coen, Joel Coen"
|
||||||
|
duration: "106 min"
|
||||||
|
onlineRating: 6.3
|
||||||
|
image: "https://m.media-amazon.com/images/M/MV5BOTI1M2FlMzItY2VjYS00Y2VkLWI5OTQtMzA0MWMyNmQzZmQ0XkEyXkFqcGdeQXVyMTMxODk2OTU@._V1_SX300.jpg"
|
||||||
|
released: true
|
||||||
|
premiere: "05/02/2016"
|
||||||
|
watched: true
|
||||||
|
lastWatched: "2022/10/27"
|
||||||
|
personalRating: 6
|
||||||
|
tags: "mediaDB/tv/movie"
|
||||||
|
CollapseMetaTable: true
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Parent:: [[@Cinematheque]]
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
```dataviewjs
|
||||||
|
dv.paragraph(`> [!${dv.current().watched ? 'SUCCESS' : 'WARNING'}] ${dv.current().watched ? 'last watched on ' + dv.current().lastWatched : 'not yet watched'}`)
|
||||||
|
```
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
# `$= dv.current().title`
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
`$= dv.current().watched ? '**Rating**: ' + dv.current().personalRating + ' out of 10' : ''`
|
||||||
|
|
||||||
|
```toc
|
||||||
|
```
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
### Details
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
**Genres**:
|
||||||
|
`$= dv.current().genres.length === 0 ? ' - none' : dv.list(dv.current().genres)`
|
||||||
|
|
||||||
|
`$= !dv.current().released ? '**Not released** The movie is not yet released.' : ''`
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
```dataview
|
||||||
|
list without id
|
||||||
|
"<table><tbody><tr><td><a class=heading>Type</a></td>"
|
||||||
|
+
|
||||||
|
"<td><span style='color: var(--footnote);'>" + this.type + "</span></td></tr>"
|
||||||
|
+
|
||||||
|
"<tr><td><a class=heading>Online Rating</a></td>"
|
||||||
|
+
|
||||||
|
"<td><span style='color: var(--footnote);'>" + this.onlineRating + "</span></td></tr>"
|
||||||
|
+
|
||||||
|
"<tr><td><a class=heading>Duration</a></td>"
|
||||||
|
+
|
||||||
|
"<td><span style='color: var(--footnote);'>" + this.duration + "</span></td></tr>"
|
||||||
|
+
|
||||||
|
"<tr><td><a class=heading>Premiered</a></td>"
|
||||||
|
+
|
||||||
|
"<td><span style='color: var(--footnote);'>" + this.premiere + "</span></td></tr>"
|
||||||
|
+
|
||||||
|
"<tr><td><a class=heading>Producer</a></td>"
|
||||||
|
+
|
||||||
|
"<td><span style='color: var(--footnote);'>" + this.producer + "</span></td></tr></tbody></table>"
|
||||||
|
FROM "03.04 Cinematheque/Hail Caesar! (2016)"
|
||||||
|
```
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
### Poster
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
`$= '![Image|360](' + dv.current().image + ')'`
|
Loading…
Reference in new issue