diff --git a/extensions/gallery/script.py b/extensions/gallery/script.py index fbf23bc9..c17d69ee 100644 --- a/extensions/gallery/script.py +++ b/extensions/gallery/script.py @@ -2,19 +2,29 @@ from pathlib import Path import gradio as gr +from modules.chat import load_character from modules.html_generator import get_image_cache +from modules.shared import gradio, settings -def generate_html(): +def generate_css(): css = """ - .character-gallery { + .character-gallery > .gallery { margin: 1rem 0; - display: grid; + display: grid !important; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); grid-column-gap: 0.4rem; grid-row-gap: 1.2rem; } + .character-gallery > .label { + display: none !important; + } + + .character-gallery button.gallery-item { + display: contents; + } + .character-container { cursor: pointer; text-align: center; @@ -45,14 +55,16 @@ def generate_html(): overflow-wrap: anywhere; } """ + return css - container_html = f'