mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
fix cards previews
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
<div class='actions'>
|
||||
<div class='additional'>
|
||||
<ul>
|
||||
<li><a href="#" title="replace preview image with currently selected in gallery" onclick={save_card_preview}>Replace preview</a></li>
|
||||
<li><a href="#" title="replace preview description with currently selected in gallery" onclick={save_card_description}>Replace description</a></li>
|
||||
<li><a href="#" title="replace preview image with current selection" onclick={save_card_preview}>Replace preview</a></li>
|
||||
<li><a href="#" title="replace preview description with current selection" onclick={save_card_description}>Replace description</a></li>
|
||||
<li><a href="#" title="read description" onclick={read_card_description}>Read description</a></li>
|
||||
</ul>
|
||||
<span style="display:none" class='search_term'>{search_term}</span>
|
||||
|
||||
@@ -1,165 +1,36 @@
|
||||
|
||||
/* general gradio fixes */
|
||||
|
||||
:root, .dark{
|
||||
--checkbox-label-gap: 0.25em 0.1em;
|
||||
--section-header-text-size: 12pt;
|
||||
--block-background-fill: transparent;
|
||||
}
|
||||
|
||||
.block.padded:not(.gradio-accordion) {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
div.gradio-container{
|
||||
max-width: unset !important;
|
||||
}
|
||||
|
||||
.hidden{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.compact{
|
||||
background: transparent !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
div.form{
|
||||
border-width: 0;
|
||||
box-shadow: none;
|
||||
background: transparent;
|
||||
overflow: visible;
|
||||
gap: 0.5em;
|
||||
}
|
||||
|
||||
.block.gradio-dropdown,
|
||||
.block.gradio-slider,
|
||||
.block.gradio-checkbox,
|
||||
.block.gradio-textbox,
|
||||
.block.gradio-radio,
|
||||
.block.gradio-checkboxgroup,
|
||||
.block.gradio-number,
|
||||
.block.gradio-colorpicker
|
||||
{
|
||||
border-width: 0 !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.gap.compact{
|
||||
padding: 0;
|
||||
gap: 0.2em 0;
|
||||
}
|
||||
|
||||
div.compact{
|
||||
gap: 1em;
|
||||
}
|
||||
|
||||
.gradio-dropdown label span:not(.has-info),
|
||||
.gradio-textbox label span:not(.has-info),
|
||||
.gradio-number label span:not(.has-info)
|
||||
{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.gradio-dropdown ul.options{
|
||||
z-index: 3000;
|
||||
min-width: fit-content;
|
||||
max-width: inherit;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.gradio-dropdown ul.options li.item {
|
||||
padding: 0.05em 0;
|
||||
}
|
||||
|
||||
.gradio-dropdown ul.options li.item:not(:has(.hide)) {
|
||||
background-color: var(--neutral-100);
|
||||
}
|
||||
|
||||
.dark .gradio-dropdown ul.options li.item:not(:has(.hide)) {
|
||||
background-color: var(--neutral-900);
|
||||
}
|
||||
|
||||
.gradio-dropdown div.wrap.wrap.wrap.wrap{
|
||||
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.gradio-dropdown:not(.multiselect) .wrap-inner.wrap-inner.wrap-inner{
|
||||
flex-wrap: unset;
|
||||
}
|
||||
|
||||
.gradio-dropdown .single-select{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.gradio-dropdown .token-remove.remove-all.remove-all{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.gradio-dropdown.multiselect .token-remove.remove-all.remove-all{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.gradio-slider input[type="number"]{
|
||||
width: 6em;
|
||||
}
|
||||
|
||||
.block.gradio-checkbox {
|
||||
margin: 0.75em 1.5em 0 0;
|
||||
}
|
||||
|
||||
.gradio-html div.wrap{
|
||||
height: 100%;
|
||||
}
|
||||
div.gradio-html.min{
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.block.gradio-gallery{
|
||||
background: var(--input-background-fill);
|
||||
}
|
||||
|
||||
.gradio-container .prose a, .gradio-container .prose a:visited{
|
||||
color: unset;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
:root, .dark{ --checkbox-label-gap: 0.25em 0.1em; --section-header-text-size: 12pt; --block-background-fill: transparent;}
|
||||
.block.padded:not(.gradio-accordion) { padding: 0 !important; }
|
||||
div.gradio-container{ max-width: unset !important; }
|
||||
.hidden{ display: none; }
|
||||
.compact{ background: transparent !important; padding: 0 !important; }
|
||||
div.form{ border-width: 0; box-shadow: none; background: transparent; overflow: visible; gap: 0.5em; }
|
||||
.block.gradio-dropdown, .block.gradio-slider, .block.gradio-checkbox, .block.gradio-textbox, .block.gradio-radio, .block.gradio-checkboxgroup, .block.gradio-number, .block.gradio-colorpicker { border-width: 0 !important; box-shadow: none !important;}
|
||||
.gap.compact{ padding: 0; gap: 0.2em 0; }
|
||||
div.compact{ gap: 1em; }
|
||||
.gradio-dropdown label span:not(.has-info), .gradio-textbox label span:not(.has-info), .gradio-number label span:not(.has-info) { margin-bottom: 0; }
|
||||
.gradio-dropdown ul.options{ z-index: 3000; min-width: fit-content; max-width: inherit; white-space: nowrap; }
|
||||
.gradio-dropdown ul.options li.item { padding: 0.05em 0; }
|
||||
.gradio-dropdown ul.options li.item:not(:has(.hide)) { background-color: var(--neutral-100); }
|
||||
.dark .gradio-dropdown ul.options li.item:not(:has(.hide)) { background-color: var(--neutral-900); }
|
||||
.gradio-dropdown div.wrap.wrap.wrap.wrap{ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
|
||||
.gradio-dropdown:not(.multiselect) .wrap-inner.wrap-inner.wrap-inner{ flex-wrap: unset; }
|
||||
.gradio-dropdown .single-select{ white-space: nowrap; overflow: hidden; }
|
||||
.gradio-dropdown .token-remove.remove-all.remove-all{ display: none; }
|
||||
.gradio-dropdown.multiselect .token-remove.remove-all.remove-all{ display: flex; }
|
||||
.gradio-slider input[type="number"]{ width: 6em; }
|
||||
.block.gradio-checkbox { margin: 0.75em 1.5em 0 0; }
|
||||
.gradio-html div.wrap{ height: 100%; }
|
||||
div.gradio-html.min{ min-height: 0; }
|
||||
.block.gradio-gallery{ background: var(--input-background-fill); }
|
||||
.gradio-container .prose a, .gradio-container .prose a:visited{ color: unset; text-decoration: none; }
|
||||
|
||||
/* general styled components */
|
||||
|
||||
.gradio-button.tool{
|
||||
max-width: 2.2em;
|
||||
min-width: 2.2em !important;
|
||||
height: 2.4em;
|
||||
align-self: end;
|
||||
line-height: 1em;
|
||||
border-radius: 0.5em;
|
||||
}
|
||||
|
||||
.gradio-button.secondary-down{
|
||||
background: var(--button-secondary-background-fill);
|
||||
color: var(--button-secondary-text-color);
|
||||
}
|
||||
.gradio-button.secondary-down, .gradio-button.secondary-down:hover{
|
||||
box-shadow: 1px 1px 1px rgba(0,0,0,0.25) inset, 0px 0px 3px rgba(0,0,0,0.15) inset;
|
||||
}
|
||||
.gradio-button.secondary-down:hover{
|
||||
background: var(--button-secondary-background-fill-hover);
|
||||
color: var(--button-secondary-text-color-hover);
|
||||
}
|
||||
|
||||
.checkboxes-row{
|
||||
margin-bottom: 0.5em;
|
||||
margin-left: 0em;
|
||||
}
|
||||
.checkboxes-row > div{
|
||||
flex: 0;
|
||||
white-space: nowrap;
|
||||
min-width: auto;
|
||||
}
|
||||
|
||||
.gradio-button.tool{ max-width: 2.2em; min-width: 2.2em !important; height: 2.4em; align-self: end; line-height: 1em; border-radius: 0.5em; }
|
||||
.gradio-button.secondary-down{ background: var(--button-secondary-background-fill); color: var(--button-secondary-text-color); }
|
||||
.gradio-button.secondary-down, .gradio-button.secondary-down:hover{ box-shadow: 1px 1px 1px rgba(0,0,0,0.25) inset, 0px 0px 3px rgba(0,0,0,0.15) inset; }
|
||||
.gradio-button.secondary-down:hover{ background: var(--button-secondary-background-fill-hover); color: var(--button-secondary-text-color-hover); }
|
||||
.checkboxes-row{ margin-bottom: 0.5em; margin-left: 0em; }
|
||||
.checkboxes-row > div{ flex: 0; white-space: nowrap; min-width: auto; }
|
||||
button.custom-button{
|
||||
border-radius: var(--button-large-radius);
|
||||
padding: var(--button-large-padding);
|
||||
@@ -176,9 +47,7 @@ button.custom-button{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
/* txt2img/img2img specific */
|
||||
|
||||
.block.token-counter{
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
@@ -201,13 +70,8 @@ button.custom-button{
|
||||
border: 2px solid rgba(255,0,0,0.4) !important;
|
||||
}
|
||||
|
||||
.block.token-counter div{
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.block.token-counter span{
|
||||
padding: 0.1em 0.75em;
|
||||
}
|
||||
.block.token-counter div{ display: inline; }
|
||||
.block.token-counter span{ padding: 0.1em 0.75em; }
|
||||
|
||||
[id$=_subseed_show]{
|
||||
min-width: auto !important;
|
||||
@@ -642,42 +506,14 @@ footer {
|
||||
}
|
||||
|
||||
/* extra networks UI */
|
||||
|
||||
.extra-networks > div > [id *= '_extra_']{
|
||||
margin: 0.3em;
|
||||
}
|
||||
|
||||
.extra-network-subdirs{
|
||||
padding: 0.2em 0.35em;
|
||||
}
|
||||
|
||||
.extra-network-subdirs button{
|
||||
margin: 0 0.15em;
|
||||
}
|
||||
.extra-networks .tab-nav .search{
|
||||
display: inline-block;
|
||||
max-width: 16em;
|
||||
margin: 0.3em;
|
||||
align-self: center;
|
||||
width: 16em;
|
||||
}
|
||||
|
||||
#txt2img_extra_view, #img2img_extra_view {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.extra-network-cards .nocards, .extra-network-thumbs .nocards{
|
||||
margin: 1.25em 0.5em 0.5em 0.5em;
|
||||
}
|
||||
|
||||
.extra-network-cards .nocards h1, .extra-network-thumbs .nocards h1{
|
||||
font-size: 1.5em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.extra-network-cards .nocards li, .extra-network-thumbs .nocards li{
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
.extra-networks > div > [id *= '_extra_']{ margin: 0.3em; }
|
||||
.extra-network-subdirs{ padding: 0.2em 0.35em; }
|
||||
.extra-network-subdirs button{ margin: 0 0.15em; }
|
||||
.extra-networks .tab-nav .search{ display: inline-block; max-width: 16em; margin: 0.3em; align-self: center; width: 16em; }
|
||||
#txt2img_extra_view, #img2img_extra_view { width: auto; }
|
||||
.extra-network-cards .nocards, .extra-network-thumbs .nocards{ margin: 1.25em 0.5em 0.5em 0.5em; }
|
||||
.extra-network-cards .nocards h1, .extra-network-thumbs .nocards h1{ font-size: 1.5em; margin-bottom: 1em; }
|
||||
.extra-network-cards .nocards li, .extra-network-thumbs .nocards li{ margin-left: 0.5em; }
|
||||
|
||||
.extra-network-cards .card .metadata-button, .extra-network-thumbs .card .metadata-button{
|
||||
display: none;
|
||||
@@ -689,19 +525,9 @@ footer {
|
||||
font-size: 22pt;
|
||||
width: 1.5em;
|
||||
}
|
||||
.extra-network-cards .card:hover .metadata-button, .extra-network-thumbs .card:hover .metadata-button{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.extra-network-cards .card .metadata-button:hover, .extra-network-thumbs .card .metadata-button:hover{
|
||||
color: red;
|
||||
}
|
||||
|
||||
.extra-network-thumbs {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
.extra-network-cards .card:hover .metadata-button, .extra-network-thumbs .card:hover .metadata-button{ display: inline-block; }
|
||||
.extra-network-thumbs { display: flex; flex-flow: row wrap; gap: 10px; }
|
||||
.extra-network-cards .card .additional a:hover, .extra-network-thumbs .card .additional a:hover { color: darkorange }
|
||||
|
||||
.extra-network-thumbs .card {
|
||||
display: inline-block;
|
||||
@@ -714,15 +540,8 @@ footer {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.extra-network-thumbs .card .additional, .extra-network-thumbs .card .additional {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.extra-network-thumbs .card:hover .additional a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.extra-network-cards .card .additional, .extra-network-thumbs .card .additional { white-space: nowrap; overflow: hidden; }
|
||||
.extra-network-thumbs .card:hover .additional a { display: inline-block; }
|
||||
.extra-network-thumbs .actions .name {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
@@ -736,11 +555,7 @@ footer {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.extra-network-thumbs .card:hover .actions .name {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.extra-network-thumbs .card:hover .actions .name { white-space: normal; word-break: break-all; }
|
||||
.extra-network-cards .card{
|
||||
display: inline-block;
|
||||
margin: 0.5em;
|
||||
@@ -756,13 +571,8 @@ footer {
|
||||
background-image: url('./file=html/card-no-preview.png')
|
||||
}
|
||||
|
||||
.extra-network-cards .card:hover{
|
||||
box-shadow: 0 0 2px 0.3em rgba(0, 128, 255, 0.35);
|
||||
}
|
||||
|
||||
.extra-network-cards .card .actions .additional{
|
||||
display: none;
|
||||
}
|
||||
.extra-network-cards .card:hover { box-shadow: 0 0 2px 0.3em rgba(0, 128, 255, 0.35); }
|
||||
.extra-network-cards .card .actions .additional, .extra-network-thumbs .card .actions .additional{ display: none; }
|
||||
|
||||
.extra-network-cards .card .actions{
|
||||
position: absolute;
|
||||
@@ -775,58 +585,13 @@ footer {
|
||||
text-shadow: 0 0 0.2em black;
|
||||
}
|
||||
|
||||
.extra-network-cards .card .actions *{
|
||||
color: white;
|
||||
}
|
||||
|
||||
.extra-network-cards .card .actions:hover{
|
||||
box-shadow: 0 0 0.75em 0.75em rgba(0,0,0,0.5) !important;
|
||||
}
|
||||
|
||||
.extra-network-cards .card .actions .name{
|
||||
font-size: 1.7em;
|
||||
font-weight: bold;
|
||||
line-break: anywhere;
|
||||
}
|
||||
|
||||
.extra-network-cards .card .actions .description {
|
||||
display: block;
|
||||
max-height: 3em;
|
||||
white-space: pre-wrap;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.extra-network-cards .card .actions .description:hover {
|
||||
max-height: none;
|
||||
}
|
||||
|
||||
.extra-network-cards .card .actions:hover .additional{
|
||||
display: block;
|
||||
}
|
||||
|
||||
.extra-network-cards .card ul{
|
||||
margin: 0.25em 0 0.75em 0.25em;
|
||||
cursor: unset;
|
||||
}
|
||||
|
||||
.extra-network-cards .card ul a{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.extra-network-cards .card ul a:hover{
|
||||
color: red;
|
||||
}
|
||||
|
||||
.theme-preview {
|
||||
display: none;
|
||||
position: fixed;
|
||||
border: 4px solid var(--neutral-600);
|
||||
box-shadow: 2px 2px 2px 2px var(--neutral-700);
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
max-width: 75vw;
|
||||
z-index: 999;
|
||||
}
|
||||
.extra-network-cards .card .actions *{ color: white; }
|
||||
.extra-network-cards .card .actions:hover { box-shadow: 0 0 0.75em 0.75em rgba(0,0,0,0.5) !important; }
|
||||
.extra-network-cards .card .actions .name { font-size: 1.7em; font-weight: bold; line-break: anywhere; }
|
||||
.extra-network-cards .card .actions .description { display: block; max-height: 3em; white-space: pre-wrap; line-height: 1.1; }
|
||||
.extra-network-cards .card .actions .description:hover { max-height: none; }
|
||||
.extra-network-cards .card .actions:hover .additional, .extra-network-thumbs .card:hover .additional{ display: block; }
|
||||
.extra-network-cards .card ul{ margin: 0.25em 0 0.75em 0.25em; cursor: unset; }
|
||||
.extra-network-cards .card ul a{ cursor: pointer; }
|
||||
.extra-network-cards .card ul a:hover{ color: red; }
|
||||
.theme-preview { display: none; position: fixed; border: 4px solid var(--neutral-600); box-shadow: 2px 2px 2px 2px var(--neutral-700); top: 0; bottom: 0; left: 0; right: 0; margin: auto; max-width: 75vw; z-index: 999; }
|
||||
|
||||
Reference in New Issue
Block a user