From 08989f54d95b9ad779c339f18719632e5fcde14e Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 3 Jan 2024 23:24:24 +0000 Subject: [PATCH] Wiki link colors, and determine the thumbnail better. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4730 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- apps/wiki.json | 2 +- apps/wiki/tf-wiki-doc.js | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/wiki.json b/apps/wiki.json index 4bbe0ef3..d23db6f3 100644 --- a/apps/wiki.json +++ b/apps/wiki.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "📝", - "previous": "&rLiFGbB2BQlnzfLQeQcwsIHLd4tirP/boXwbSVcqtrs=.sha256" + "previous": "&SkX7Tmt1TEAPoyIPTv8qrxIrAcxTUicFEKkVtuU9CSo=.sha256" } \ No newline at end of file diff --git a/apps/wiki/tf-wiki-doc.js b/apps/wiki/tf-wiki-doc.js index e69e7172..40ed53be 100644 --- a/apps/wiki/tf-wiki-doc.js +++ b/apps/wiki/tf-wiki-doc.js @@ -72,8 +72,7 @@ class TfWikiDocElement extends LitElement { } thumbnail(md) { - //let m = md ? md.match(/\!\[image:[^\]]+]\((\&.{44}\.sha256)\)/) : undefined; - let m = md ? md.match(/.*\((\&.{44}\.sha256)\).*/) : undefined; + let m = md ? md.match(/\!\[image:[^\]]+\]\((\&.{44}\.sha256)\).*/) : undefined; console.log('thumb', m); return m ? m[1] : undefined; } @@ -225,6 +224,12 @@ class TfWikiDocElement extends LitElement { let self = this; let thumbnail_ref = this.thumbnail(this.blob); return html` +