chore(wiki): the button
class is now optional for input elements
This commit is contained in:
parent
1d5cdf9607
commit
e361c3f975
@ -68,7 +68,7 @@ class TfCollectionElement extends LitElement {
|
|||||||
return html`
|
return html`
|
||||||
<link rel="stylesheet" href="tildefriends.css"/>
|
<link rel="stylesheet" href="tildefriends.css"/>
|
||||||
<span class="inline-flex-row">
|
<span class="inline-flex-row">
|
||||||
<select class="button" @change=${this.on_selected} id="select" value=${this.selected_id}>
|
<select @change=${this.on_selected} id="select" value=${this.selected_id}>
|
||||||
<option value="" ?selected=${this.selected_id === ''} disabled hidden>(select ${this.category})</option>
|
<option value="" ?selected=${this.selected_id === ''} disabled hidden>(select ${this.category})</option>
|
||||||
${Object.values(this.collection ?? {}).sort((x, y) => x.name.localeCompare(y.name)).map(x => html`<option value=${x.id} ?selected=${this.selected_id === x.id}>${x.name}</option>`)}
|
${Object.values(this.collection ?? {}).sort((x, y) => x.name.localeCompare(y.name)).map(x => html`<option value=${x.id} ?selected=${this.selected_id === x.id}>${x.name}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
|
@ -27,7 +27,7 @@ class TfIdentityPickerElement extends LitElement {
|
|||||||
render() {
|
render() {
|
||||||
return html`
|
return html`
|
||||||
<link rel="stylesheet" href="tildefriends.css"/>
|
<link rel="stylesheet" href="tildefriends.css"/>
|
||||||
<select @change=${this.changed} class="button" style="max-width: 100%">
|
<select @change=${this.changed} style="max-width: 100%">
|
||||||
${(this.ids ?? []).map(id => html`<option ?selected=${id == this.selected} value=${id}>${id}</option>`)}
|
${(this.ids ?? []).map(id => html`<option ?selected=${id == this.selected} value=${id}>${id}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
`;
|
`;
|
||||||
|
@ -262,12 +262,13 @@ class TfWikiDocElement extends LitElement {
|
|||||||
<div ?hidden=${!this.value?.private} style="color: #800">🔒 document is private</div>
|
<div ?hidden=${!this.value?.private} style="color: #800">🔒 document is private</div>
|
||||||
<div class="flex-column" ${this.value?.private ? 'border-top: 4px solid #800' : ''}">
|
<div class="flex-column" ${this.value?.private ? 'border-top: 4px solid #800' : ''}">
|
||||||
<textarea
|
<textarea
|
||||||
|
rows="25"
|
||||||
?hidden=${!this.is_editing}
|
?hidden=${!this.is_editing}
|
||||||
id="editor-text-area"
|
id="editor-text-area"
|
||||||
@input=${this.on_edit}
|
@input=${this.on_edit}
|
||||||
@paste=${this.paste}
|
@paste=${this.paste}
|
||||||
.value=${this.blob ?? ''}></textarea>
|
.value=${this.blob ?? ''}></textarea>
|
||||||
<div style="flex: 1 1">
|
<div style="flex: 1 1; margin-top: 16px">
|
||||||
<div ?hidden=${!this.is_editing} class="box">
|
<div ?hidden=${!this.is_editing} class="box">
|
||||||
Summary
|
Summary
|
||||||
<img ?hidden=${!thumbnail_ref} style="max-width: 128px; max-height: 128px; float: right" src="/${thumbnail_ref}/view">
|
<img ?hidden=${!thumbnail_ref} style="max-width: 128px; max-height: 128px; float: right" src="/${thumbnail_ref}/view">
|
||||||
|
@ -17,7 +17,11 @@ body {
|
|||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
button, .button {
|
button,
|
||||||
|
.button,
|
||||||
|
input[type=button],
|
||||||
|
input[type=submit],
|
||||||
|
select {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
@ -25,32 +29,32 @@ button, .button {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 4px;
|
margin: 4px;
|
||||||
}
|
|
||||||
|
|
||||||
button:hover, .button:hover {
|
&.red {
|
||||||
filter: brightness(0.75);
|
|
||||||
}
|
|
||||||
|
|
||||||
button.red, .button.red {
|
|
||||||
background-color: #bd1e24;
|
background-color: #bd1e24;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
button.green, .button.green {
|
&.green {
|
||||||
background-color: #18922d;
|
background-color: #18922d;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
button.blue, .button.blue {
|
&.blue {
|
||||||
background-color: #0067a7;
|
background-color: #0067a7;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
button.yellow, .button.yellow {
|
&.yellow {
|
||||||
background-color: #ee9600;
|
background-color: #ee9600;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
filter: brightness(0.75);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
a:link {
|
a:link {
|
||||||
color: #268bd2;
|
color: #268bd2;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user