forked from cory/tildefriends
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
This commit is contained in:
parent
c78753f3ff
commit
08989f54d9
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "tildefriends-app",
|
"type": "tildefriends-app",
|
||||||
"emoji": "📝",
|
"emoji": "📝",
|
||||||
"previous": "&rLiFGbB2BQlnzfLQeQcwsIHLd4tirP/boXwbSVcqtrs=.sha256"
|
"previous": "&SkX7Tmt1TEAPoyIPTv8qrxIrAcxTUicFEKkVtuU9CSo=.sha256"
|
||||||
}
|
}
|
@ -72,8 +72,7 @@ class TfWikiDocElement extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
thumbnail(md) {
|
thumbnail(md) {
|
||||||
//let m = md ? md.match(/\!\[image:[^\]]+]\((\&.{44}\.sha256)\)/) : undefined;
|
let m = md ? md.match(/\!\[image:[^\]]+\]\((\&.{44}\.sha256)\).*/) : undefined;
|
||||||
let m = md ? md.match(/.*\((\&.{44}\.sha256)\).*/) : undefined;
|
|
||||||
console.log('thumb', m);
|
console.log('thumb', m);
|
||||||
return m ? m[1] : undefined;
|
return m ? m[1] : undefined;
|
||||||
}
|
}
|
||||||
@ -225,6 +224,12 @@ class TfWikiDocElement extends LitElement {
|
|||||||
let self = this;
|
let self = this;
|
||||||
let thumbnail_ref = this.thumbnail(this.blob);
|
let thumbnail_ref = this.thumbnail(this.blob);
|
||||||
return html`
|
return html`
|
||||||
|
<style>
|
||||||
|
a:link { color: #268bd2 }
|
||||||
|
a:visited { color: #6c71c4 }
|
||||||
|
a:hover { color: #859900 }
|
||||||
|
a:active { color: #2aa198 }
|
||||||
|
</style>
|
||||||
<div style="display: inline-flex; flex-direction: row">
|
<div style="display: inline-flex; flex-direction: row">
|
||||||
<button ?disabled=${!this.whoami || this.is_editing} @click=${() => self.is_editing = true}>Edit</button>
|
<button ?disabled=${!this.whoami || this.is_editing} @click=${() => self.is_editing = true}>Edit</button>
|
||||||
<button ?disabled=${this.blob == this.blob_original} @click=${this.on_save_draft}>Save Draft</button>
|
<button ?disabled=${this.blob == this.blob_original} @click=${this.on_save_draft}>Save Draft</button>
|
||||||
|
Loading…
Reference in New Issue
Block a user