style(wiki): use core.js

This commit is contained in:
2024-02-22 13:03:21 +01:00
parent 12c7515ee8
commit 53f9547cc5
6 changed files with 149 additions and 15 deletions

View File

@ -233,13 +233,14 @@ class TfWikiDocElement extends LitElement {
let self = this;
let thumbnail_ref = this.thumbnail(this.blob);
return html`
<link rel="stylesheet" href="core.css"/>
<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 class="inline-flex-row">
<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 && !this.value?.draft} @click=${this.on_publish}>Publish</button>
@ -248,7 +249,7 @@ class TfWikiDocElement extends LitElement {
<button ?disabled=${!this.is_editing} @click=${this.on_blog_publish}>Publish Blog</button>
</div>
<div ?hidden=${!this.value?.private} style="color: #800">🔒 document is private</div>
<div style="display: flex; flex-direction: row; ${this.value?.private ? 'border-top: 4px solid #800' : ''}">
<div class="flex-row" ${this.value?.private ? 'border-top: 4px solid #800' : ''}">
<textarea
?hidden=${!this.is_editing}
style="flex: 1 1; min-height: 10em; ${this.value?.private ? 'border: 4px solid #800' : ''}"