diff --git a/.eleventy.js b/.eleventy.js index 4040be94..604f32c0 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -29,6 +29,68 @@ function transformImage(src, cls, alt, sizes, widths = ["500", "700", "auto"]) { return metadata; } +function getAnchorLink(filePath, linkTitle) { + const {attributes, innerHTML} = getAnchorAttributes(filePath, linkTitle); + return ` `${key}="${attributes[key]}"`).join(" ")}>${innerHTML}`; +} + +function getAnchorAttributes(filePath, linkTitle) { + let fileName = filePath.replaceAll("&", "&"); + let header = ""; + let headerLinkPath = ""; + if (filePath.includes("#")) { + [fileName, header] = filePath.split("#"); + headerLinkPath = `#${headerToId(header)}`; + } + + let noteIcon = process.env.NOTE_ICON_DEFAULT; + const title = linkTitle ? linkTitle : fileName; + let permalink = `/notes/${slugify(filePath)}`; + let deadLink = false; + try { + const startPath = "./src/site/notes/"; + const fullPath = fileName.endsWith(".md") + ? `${startPath}${fileName}` + : `${startPath}${fileName}.md`; + const file = fs.readFileSync(fullPath, "utf8"); + const frontMatter = matter(file); + if (frontMatter.data.permalink) { + permalink = frontMatter.data.permalink; + } + if ( + frontMatter.data.tags && + frontMatter.data.tags.indexOf("gardenEntry") != -1 + ) { + permalink = "/"; + } + if (frontMatter.data.noteIcon) { + noteIcon = frontMatter.data.noteIcon; + } + } catch { + deadLink = true; + } + + if (deadLink) { + return { + attributes: { + "class": "internal-link is-unresolved", + "href": "/404", + "target": "", + }, + innerHTML: title, + } + } + return { + attributes: { + "class": "internal-link", + "target": "", + "data-note-icon": noteIcon, + "href": `${permalink}${headerLinkPath}`, + }, + innerHTML: title, + } +} + const tagRegex = /(^|\s|\>)(#[^\s!@#$%^&*()=+\.,\[{\]};:'"?><]+)(?!([^<]*>))/g; module.exports = function (eleventyConfig) { @@ -99,25 +161,25 @@ module.exports = function (eleventyConfig) { let icon; let color; let nbLinesToSkip = 0 - for (let i = 0; i<4; i++) { + for (let i = 0; i < 4; i++) { if (parts[i] && parts[i].trim()) { let line = parts[i] && parts[i].trim().toLowerCase() if (line.startsWith("title:")) { titleLine = line.substring(6); - nbLinesToSkip ++; + nbLinesToSkip++; } else if (line.startsWith("icon:")) { icon = line.substring(5); - nbLinesToSkip ++; + nbLinesToSkip++; } else if (line.startsWith("collapse:")) { collapsible = true collapse = line.substring(9); if (collapse && collapse.trim().toLowerCase() == 'open') { collapsed = false } - nbLinesToSkip ++; + nbLinesToSkip++; } else if (line.startsWith("color:")) { color = line.substring(6); - nbLinesToSkip ++; + nbLinesToSkip++; } } } @@ -127,18 +189,17 @@ module.exports = function (eleventyConfig) { ` : ""; const titleDiv = titleLine - ? `
${titleLine}
${foldDiv}
` - : ""; + ? `
${titleLine}
${foldDiv}
` + : ""; let collapseClasses = titleLine && collapsible ? 'is-collapsible' : '' if (collapsible && collapsed) { collapseClasses += " is-collapsed" } - let res = `
${titleDiv}\n
${md.render( - parts.slice(nbLinesToSkip).join("\n") - )}
`; + let res = `
${titleDiv}\n
${md.render( + parts.slice(nbLinesToSkip).join("\n") + )}
`; return res } @@ -153,7 +214,21 @@ module.exports = function (eleventyConfig) { }; md.renderer.rules.image = (tokens, idx, options, env, self) => { const imageName = tokens[idx].content; - const [fileName, width] = imageName.split("|"); + //"image.png|metadata?|width" + const [fileName, ...widthAndMetaData] = imageName.split("|"); + const lastValue = widthAndMetaData[widthAndMetaData.length - 1]; + const lastValueIsNumber = !isNaN(lastValue); + const width = lastValueIsNumber ? lastValue : null; + + let metaData = ""; + if (widthAndMetaData.length > 1) { + metaData = widthAndMetaData.slice(0, widthAndMetaData.length - 1).join(" "); + } + + if (!lastValueIsNumber) { + metaData += ` ${lastValue}`; + } + if (width) { const widthIndex = tokens[idx].attrIndex("width"); const widthAttr = `${width}px`; @@ -199,7 +274,6 @@ module.exports = function (eleventyConfig) { return date && date.toISOString(); }); - eleventyConfig.addFilter("link", function (str) { return ( str && @@ -210,46 +284,7 @@ module.exports = function (eleventyConfig) { } const [fileLink, linkTitle] = p1.split("|"); - let fileName = fileLink.replaceAll("&", "&"); - let header = ""; - let headerLinkPath = ""; - if (fileLink.includes("#")) { - [fileName, header] = fileLink.split("#"); - headerLinkPath = `#${headerToId(header)}`; - } - - let permalink = `/notes/${slugify(fileName)}`; - let noteIcon = process.env.NOTE_ICON_DEFAULT; - const title = linkTitle ? linkTitle : fileName; - let deadLink = false; - - try { - const startPath = "./src/site/notes/"; - const fullPath = fileName.endsWith(".md") - ? `${startPath}${fileName}` - : `${startPath}${fileName}.md`; - const file = fs.readFileSync(fullPath, "utf8"); - const frontMatter = matter(file); - if (frontMatter.data.permalink) { - permalink = frontMatter.data.permalink; - } - if ( - frontMatter.data.tags && - frontMatter.data.tags.indexOf("gardenEntry") != -1 - ) { - permalink = "/"; - } - if (frontMatter.data.noteIcon) { - noteIcon = frontMatter.data.noteIcon; - } - } catch { - deadLink = true; - } - - if(deadLink){ - return `${title}`; - } - return `${title}`; + return getAnchorLink(fileLink, linkTitle); }) ); }); @@ -289,6 +324,21 @@ module.exports = function (eleventyConfig) { ); }); + eleventyConfig.addTransform("dataview-js-links", function (str) { + const parsed = parse(str); + for (const dataViewJsLink of parsed.querySelectorAll("a[data-href].internal-link")) { + const notePath = dataViewJsLink.getAttribute("data-href"); + const title = dataViewJsLink.innerHTML; + const {attributes, innerHTML} = getAnchorAttributes(notePath, title); + for (const key in attributes) { + dataViewJsLink.setAttribute(key, attributes[key]); + } + dataViewJsLink.innerHTML = innerHTML; + } + + return str && parsed.innerHTML; + }); + eleventyConfig.addTransform("callout-block", function (str) { const parsed = parse(str); @@ -302,28 +352,30 @@ module.exports = function (eleventyConfig) { let titleDiv = ""; let calloutType = ""; + let calloutMetaData = ""; let isCollapsable; let isCollapsed; - const calloutMeta = /\[!([\w-]*)\](\+|\-){0,1}(\s?.*)/; + const calloutMeta = /\[!([\w-]*)\|?(\s?.*)\](\+|\-){0,1}(\s?.*)/; if (!content.match(calloutMeta)) { continue; } content = content.replace( calloutMeta, - function (metaInfoMatch, callout, collapse, title) { + function (metaInfoMatch, callout, metaData, collapse, title) { isCollapsable = Boolean(collapse); isCollapsed = collapse === "-"; const titleText = title.replace(/(<\/{0,1}\w+>)/, "") ? title : `${callout.charAt(0).toUpperCase()}${callout - .substring(1) - .toLowerCase()}`; + .substring(1) + .toLowerCase()}`; const fold = isCollapsable ? `
` : ``; calloutType = callout; + calloutMetaData = metaData; titleDiv = `
${titleText}
${fold}
`; return ""; } @@ -334,6 +386,7 @@ module.exports = function (eleventyConfig) { blockquote.classList.add(isCollapsable ? "is-collapsible" : ""); blockquote.classList.add(isCollapsed ? "is-collapsed" : ""); blockquote.setAttribute("data-callout", calloutType.toLowerCase()); + calloutMetaData && blockquote.setAttribute("data-callout-metadata", calloutMetaData); blockquote.innerHTML = `${titleDiv}\n
${content}
`; } }; @@ -344,8 +397,8 @@ module.exports = function (eleventyConfig) { }); function fillPictureSourceSets(src, cls, alt, meta, width, imageTag) { - imageTag.tagName = "picture"; - let html = ` ` - if (meta.webp && meta.webp[1] && meta.webp[1].url) { - html += `` - } - if (meta.jpeg && meta.jpeg[1] && meta.jpeg[1].url) { - html += `` - } - html += `${alt}`; - imageTag.innerHTML = html; - } - + imageTag.innerHTML = html; + } + eleventyConfig.addTransform("picture", function (str) { + if(process.env.USE_FULL_RESOLUTION_IMAGES === "true"){ + return str; + } const parsed = parse(str); for (const imageTag of parsed.querySelectorAll(".cm-s-obsidian img")) { const src = imageTag.getAttribute("src"); @@ -458,7 +514,7 @@ module.exports = function (eleventyConfig) { ul: true, tags: ["h1", "h2", "h3", "h4", "h5", "h6"], }); - + eleventyConfig.addFilter("dateToZulu", function (date) { if (!date) return ""; @@ -477,7 +533,7 @@ module.exports = function (eleventyConfig) { return variable; }); - eleventyConfig.addPlugin(pluginRss, { + eleventyConfig.addPlugin(pluginRss, { posthtmlRenderOptions: { closingSingleTag: "slash", singleTags: ["link"], @@ -494,7 +550,7 @@ module.exports = function (eleventyConfig) { }, templateFormats: ["njk", "md", "11ty.js"], htmlTemplateEngine: "njk", - markdownTemplateEngine: "njk", + markdownTemplateEngine: false, passthroughFileCopy: true, }; }; diff --git a/package-lock.json b/package-lock.json index fac4d094..268e4a03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1252,11 +1252,14 @@ } }, "node_modules/dotenv": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", - "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", + "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" } }, "node_modules/eastasianwidth": { @@ -1813,15 +1816,15 @@ "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" }, "node_modules/glob": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.2.6.tgz", - "integrity": "sha512-U/rnDpXJGF414QQQZv5uVsabTVxMSwzS5CH0p3DRCIV6ownl4f7PzGnkGmvlum2wB+9RlJWJZ6ACU1INnBqiPA==", + "version": "10.3.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.3.tgz", + "integrity": "sha512-92vPiMb/iqpmEgsOoIDvTjc50wf9CCCvMzsi6W0JLPeUKE8TWP1a73PgqSrqy7iAZxaSD1YdzU7QZR5LF51MJw==", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^2.0.3", "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2", - "path-scurry": "^1.7.0" + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" }, "bin": { "glob": "dist/cjs/src/bin.js" @@ -2707,9 +2710,9 @@ "dev": true }, "node_modules/lru-cache": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.1.1.tgz", - "integrity": "sha512-65/Jky17UwSb0BuB9V+MyDpsOtXKmYwzhyl+cOa9XUiI4uV2Ouy/2voFP3+al0BjZbJgMBD8FojMpAf+Z+qn4A==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.0.tgz", + "integrity": "sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==", "engines": { "node": "14 || >=16.14" } @@ -2991,9 +2994,9 @@ } }, "node_modules/minipass": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-6.0.2.tgz", - "integrity": "sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.1.tgz", + "integrity": "sha512-NQ8MCKimInjVlaIqx51RKJJB7mINVkLTJbsZKmto4UAAOC/CWXES8PGaOgoBZyqoUsUA/U3DToGK7GJkkHbjJw==", "engines": { "node": ">=16 || 14 >=14.17" } @@ -3174,9 +3177,9 @@ } }, "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "bin": { "semver": "bin/semver" } @@ -3311,9 +3314,9 @@ } }, "node_modules/npm-run-all/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "bin": { "semver": "bin/semver" } @@ -3571,12 +3574,12 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-scurry": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.9.2.tgz", - "integrity": "sha512-qSDLy2aGFPm8i4rsbHd4MNyTcrzHFsLQykrtbuGRknZZCBBVXSv2tSCDN2Cg6Rt/GFRw8GoW9y9Ecw5rIPG1sg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", "dependencies": { - "lru-cache": "^9.1.1", - "minipass": "^5.0.0 || ^6.0.2" + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -4338,9 +4341,9 @@ } }, "node_modules/sass": { - "version": "1.62.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.62.1.tgz", - "integrity": "sha512-NHpxIzN29MXvWiuswfc1W3I0N8SXBd8UR26WntmDlRYf0bSADnwnOjsyMZ3lMezSlArD33Vs3YFhp7dWvL770A==", + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.65.1.tgz", + "integrity": "sha512-9DINwtHmA41SEd36eVPQ9BJKpn7eKDQmUHmpI0y5Zv2Rcorrh0zS+cFrt050hdNbmmCNKTW3hV5mWfuegNRsEA==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -4367,9 +4370,9 @@ } }, "node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, diff --git a/src/site/404.njk b/src/site/404.njk index 467b7fd1..b8f5f216 100644 --- a/src/site/404.njk +++ b/src/site/404.njk @@ -1,6 +1,6 @@ - + Nothing here diff --git a/src/site/_data/meta.js b/src/site/_data/meta.js index d36143b8..9df754a0 100644 --- a/src/site/_data/meta.js +++ b/src/site/_data/meta.js @@ -1,7 +1,4 @@ require("dotenv").config(); -const axios = require("axios"); -const fs = require("fs"); -const crypto = require("crypto"); const { globSync } = require("glob"); module.exports = async (data) => { @@ -22,6 +19,7 @@ module.exports = async (data) => { }; const styleSettingsCss = process.env.STYLE_SETTINGS_CSS || ""; + const styleSettingsBodyClasses = process.env.STYLE_SETTINGS_BODY_CLASSES || ""; if (process.env.NOTE_ICON_TITLE && process.env.NOTE_ICON_TITLE == "true") { bodyClasses.push("title-note-icon"); @@ -48,9 +46,12 @@ module.exports = async (data) => { bodyClasses.push("backlinks-note-icon"); noteIconsSettings.backlinks = true; } - if(styleSettingsCss){ + if (styleSettingsCss) { bodyClasses.push("css-settings-manager"); } + if (styleSettingsBodyClasses) { + bodyClasses.push(styleSettingsBodyClasses); + } let timestampSettings = { timestampFormat: process.env.TIMESTAMP_FORMAT || "MMM dd, yyyy h:mm a", @@ -66,6 +67,7 @@ module.exports = async (data) => { timestampSettings, baseTheme: process.env.BASE_THEME || "dark", siteName: process.env.SITE_NAME_HEADER || "Digital Garden", + mainLanguage: process.env.SITE_MAIN_LANGUAGE || "en", siteBaseUrl: baseUrl, styleSettingsCss, buildDate: new Date(), diff --git a/src/site/_includes/layouts/index.njk b/src/site/_includes/layouts/index.njk index 6935b02a..7a6c58ed 100644 --- a/src/site/_includes/layouts/index.njk +++ b/src/site/_includes/layouts/index.njk @@ -1,5 +1,5 @@ - + {% if title %}{{ title }}{% else %}{{ page.fileSlug }}{% endif %} {%include "components/pageheader.njk"%} diff --git a/src/site/_includes/layouts/note.njk b/src/site/_includes/layouts/note.njk index fc2a254d..eb9e70a7 100644 --- a/src/site/_includes/layouts/note.njk +++ b/src/site/_includes/layouts/note.njk @@ -2,7 +2,7 @@ permalink: "notes/{{ page.fileSlug | slugify }}/" --- - + {% if title %}{{ title }}{% else %}{{ page.fileSlug }}{% endif %} {%include "components/pageheader.njk"%} diff --git a/src/site/notes/notes.json b/src/site/notes/notes.json index dd1976e7..bd4a5983 100644 --- a/src/site/notes/notes.json +++ b/src/site/notes/notes.json @@ -1,4 +1,4 @@ { "tags": "note", - "templateEngineOverride": "njk,md" -} \ No newline at end of file + "templateEngineOverride": "md" +} diff --git a/src/site/styles/digital-garden-base.scss b/src/site/styles/digital-garden-base.scss index d32fca8b..2cf1f179 100644 --- a/src/site/styles/digital-garden-base.scss +++ b/src/site/styles/digital-garden-base.scss @@ -13,6 +13,10 @@ body { --graph-muted: var(--text-muted); } +img { + max-width: 100%; +} + .content { max-width: 700px; margin: auto; @@ -751,3 +755,146 @@ body.backlinks-note-icon .backlink[data-note-icon="3"]::before { overflow-x: auto; } } + +/* == Dataview specific styling == */ +.is-live-preview .block-language-dataviewjs > p, .is-live-preview .block-language-dataviewjs > span { + line-height: 1.0; +} + +/*****************/ +/** Table Views **/ +/*****************/ + +/* List View Default Styling; rendered internally as a table. */ +.table-view-table { + width: 100%; +} + +.table-view-table > thead > tr, .table-view-table > tbody > tr { + margin-top: 1em; + margin-bottom: 1em; + text-align: left; +} + +.table-view-table > tbody > tr:hover { + background-color: var(--text-selection) !important; +} + +.table-view-table > thead > tr > th { + font-weight: 700; + font-size: larger; + border-top: none; + border-left: none; + border-right: none; + border-bottom: solid; + + max-width: 100%; +} + +.table-view-table > tbody > tr > td { + text-align: left; + border: none; + font-weight: 400; + max-width: 100%; +} + +.table-view-table ul, .table-view-table ol { + margin-block-start: 0.2em !important; + margin-block-end: 0.2em !important; +} + +/** Rendered value styling for any view. */ +.dataview-result-list-root-ul { + padding: 0em !important; + margin: 0em !important; +} + +.dataview-result-list-ul { + margin-block-start: 0.2em !important; + margin-block-end: 0.2em !important; +} + +/** Generic grouping styling. */ +.dataview.result-group { + padding-left: 8px; +} + +/*******************/ +/** Inline Fields **/ +/*******************/ + +.dataview.inline-field-key { + padding-left: 8px; + padding-right: 8px; + font-family: var(--font-monospace); + background-color: var(--background-primary-alt); + color: var(--text-nav-selected); +} + +.dataview.inline-field-value { + padding-left: 8px; + padding-right: 8px; + font-family: var(--font-monospace); + background-color: var(--background-secondary-alt); + color: var(--text-nav-selected); +} + +.dataview.inline-field-standalone-value { + padding-left: 8px; + padding-right: 8px; + font-family: var(--font-monospace); + background-color: var(--background-secondary-alt); + color: var(--text-nav-selected); +} + +/***************/ +/** Task View **/ +/***************/ + +.dataview.task-list-item, .dataview.task-list-basic-item { + margin-top: 3px; + margin-bottom: 3px; + transition: 0.4s; +} + +.dataview.task-list-item:hover, .dataview.task-list-basic-item:hover { + background-color: var(--text-selection); + box-shadow: -40px 0 0 var(--text-selection); + cursor: pointer; +} + +/*****************/ +/** Error Views **/ +/*****************/ + +div.dataview-error-box { + width: 100%; + min-height: 150px; + display: flex; + align-items: center; + justify-content: center; + border: 4px dashed var(--background-secondary); +} + +.dataview-error-message { + color: var(--text-muted); + text-align: center; +} + +/*************************/ +/** Additional Metadata **/ +/*************************/ + +.dataview.small-text { + font-size: smaller; + color: var(--text-muted); + margin-left: 3px; +} + +.dataview.small-text::before { + content: "("; +} + +.dataview.small-text::after { + content: ")"; +} \ No newline at end of file diff --git a/src/site/styles/obsidian-base.scss b/src/site/styles/obsidian-base.scss index 0db61299..3091c06c 100644 --- a/src/site/styles/obsidian-base.scss +++ b/src/site/styles/obsidian-base.scss @@ -5829,7 +5829,7 @@ body { .callout[data-callout="question"], .callout[data-callout="help"], .callout[data-callout="faq"] { - --callout-color: 100, 221, 23; + --callout-color: 224, 172, 0; --callout-icon: help-circle; } .callout[data-callout="warning"],