Add outfit gallery and AI-powered creation for characters and outfits
- Add outfit gallery with CRUD operations (create, read, update, delete) - Add AI-powered profile generation for both characters and outfits - Add toggle to switch between AI generation and manual creation - Auto-generate filenames from names with incrementing for duplicates - Add 'full_body' and 'bottom' fields to wardrobe structure - Update all character and outfit JSON files with new wardrobe fields - Reorganize data into data/characters and data/clothing directories - Update README with new features and JSON structure documentation
This commit is contained in:
41
templates/outfits/index.html
Normal file
41
templates/outfits/index.html
Normal file
@@ -0,0 +1,41 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h2>Outfit Gallery</h2>
|
||||
<div class="d-flex">
|
||||
<a href="{{ url_for('create_outfit') }}" class="btn btn-success me-2">Create New Outfit</a>
|
||||
<form action="{{ url_for('rescan_outfits') }}" method="post">
|
||||
<button type="submit" class="btn btn-outline-primary">Rescan Outfit Files</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 g-4">
|
||||
{% for outfit in outfits %}
|
||||
<div class="col" id="card-{{ outfit.slug }}">
|
||||
<div class="card h-100 character-card" onclick="window.location.href='/outfit/{{ outfit.slug }}'">
|
||||
<div class="img-container">
|
||||
{% if outfit.image_path %}
|
||||
<img id="img-{{ outfit.slug }}" src="{{ url_for('static', filename='uploads/' + outfit.image_path) }}" alt="{{ outfit.name }}">
|
||||
<span id="no-img-{{ outfit.slug }}" class="text-muted d-none">No Image</span>
|
||||
{% else %}
|
||||
<img id="img-{{ outfit.slug }}" src="" alt="{{ outfit.name }}" class="d-none">
|
||||
<span id="no-img-{{ outfit.slug }}" class="text-muted">No Image</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title text-center">{{ outfit.name }}</h5>
|
||||
<p class="card-text small text-center text-muted">{{ outfit.data.tags | join(', ') }}</p>
|
||||
</div>
|
||||
{% if outfit.data.lora.lora_name %}
|
||||
{% set lora_name = outfit.data.lora.lora_name.split('/')[-1].replace('.safetensors', '') %}
|
||||
<div class="card-footer text-center p-1">
|
||||
<small class="text-muted" title="{{ outfit.data.lora.lora_name }}">{{ lora_name }}</small>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user