mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-08 09:12:29 +08:00
client: Use single column layout for promoted attributes
This commit is contained in:
parent
18b0907841
commit
fcebb43410
@ -18,32 +18,35 @@ const TPL = `
|
|||||||
}
|
}
|
||||||
|
|
||||||
.promoted-attributes-container {
|
.promoted-attributes-container {
|
||||||
margin: auto;
|
margin: 0 1.5em;
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
flex-shrink: 0;
|
|
||||||
flex-grow: 0;
|
|
||||||
justify-content: space-evenly;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
display: table;
|
||||||
}
|
}
|
||||||
|
|
||||||
.promoted-attribute-cell {
|
.promoted-attribute-cell {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
|
display: table-row;
|
||||||
|
}
|
||||||
|
.promoted-attribute-cell > * {
|
||||||
|
display: table-cell;
|
||||||
|
padding: 1px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.promoted-attribute-cell div.input-group {
|
.promoted-attribute-cell div.input-group {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
.promoted-attribute-cell strong {
|
.promoted-attribute-cell strong {
|
||||||
word-break:keep-all;
|
word-break:keep-all;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.promoted-attribute-cell input[type="checkbox"] {
|
.promoted-attribute-cell input[type="checkbox"] {
|
||||||
height: 1.5em;
|
height: 1.5em;
|
||||||
|
flex-grow: 0;
|
||||||
|
width: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@ -211,9 +214,6 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget {
|
|||||||
}
|
}
|
||||||
else if (definition.labelType === 'boolean') {
|
else if (definition.labelType === 'boolean') {
|
||||||
$input.prop("type", "checkbox");
|
$input.prop("type", "checkbox");
|
||||||
// hack, without this the checkbox is invisible
|
|
||||||
// we should be using a different bootstrap structure for checkboxes
|
|
||||||
$input.css('width', '80px');
|
|
||||||
|
|
||||||
if (valueAttr.value === "true") {
|
if (valueAttr.value === "true") {
|
||||||
$input.prop("checked", "checked");
|
$input.prop("checked", "checked");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user