Featherless: More specifity for selectors
| @@ -2261,33 +2261,32 @@ | ||
| 2261 | 2261 | For privacy reasons, your API key will be hidden after you reload the page. |
| 2262 | 2262 | </div> |
| 2263 | 2263 | <hr> |
| 2264 | 2264 | <h4 data-i18n="Featherless Model Selection">Featherless Model Selection</h4> |
| 2265 | 2265 | <div id="Model-management-block" class="flex-container wide100p flexGap10"> |
| 2266 | 2266 | <div class="flex1 overflowHidden wide100p"> |
| 2267 | 2267 | <div class="flex-container marginBot10 alignitemscenter"> |
| 2268 | 2268 | <input id="model_search_barfeatherless_model_search_bar" class="text_pole width100p flex1 margin0" type="search" data-i18n="[placeholder]Search..." placeholder="Search..."> |
| 2269 | 2269 | <select id="model_sort_orderfeatherless_model_sort_order" class="margin0 text_pole"> |
| 2270 | 2270 | <option value="search" data-i18n="Search" hidden>A-Z</option> |
| 2271 | 2271 | <option value="asc">A-Z</option> |
| 2272 | 2272 | <option value="desc">Z-A</option> |
| 2273 | 2273 | <option value="date_asc">Date Asc</option> |
| 2274 | 2274 | <option value="date_desc">Date Desc</option> |
| 2275 | 2275 | </select> |
| 2276 | 2276 | <select id="category_selectionfeatherless_category_selection" class="text_pole"> |
| 2277 | 2277 | <option value="" disabled selected data-i18n="category">category</option> |
| 2278 | 2278 | <!-- <option value="Favorite" data-i18n="Top">Favorite</option> --> |
| 2279 | 2279 | <option value="Top" data-i18n="Top">Top</option> |
| 2280 | 2280 | <option value="New" data-i18n="New">New</option> |
| 2281 | 2281 | <option value="All" data-i18n="All">All</option> |
| 2282 | 2282 | </select> |
| 2283 | 2283 | <select id="class_selectionfeatherless_class_selection" class="text_pole"> |
| 2284 | 2284 | <option value="" selected data-i18n="class">All Classes</option> |
| 2285 | 2285 | </select> |
| 2286 | 2286 | <div id="model_pagination_containerfeatherless_model_pagination_container" class="flex1"></div> |
| 2287 | 2287 | <i id="model_grid_togglefeatherless_model_grid_toggle" class="fa-solid fa-table-cells-large menu_button" data-i18n="[title]Toggle grid view" title="Toggle grid view"></i> |
| 2288 | 2288 | </div> |
| 2289 | 2289 | <div id="model_card_blockfeatherless_model_card_block" data-i18n="[no_desc_text]No model description" no_desc_text="[No description]"></div> |
| 2290 | - | |
| 2291 | 2290 | </div> |
| 2292 | 2291 | </div> |
| 2293 | 2292 | <!-- Do not remove. Needed for the /model command to function --> |
| @@ -268,13 +268,13 @@ export async function loadAphroditeModels(data) { | ||
| 268 | 268 | |
| 269 | 269 | let featherlessCurrentPage = 1; |
| 270 | 270 | export async function loadFeatherlessModels(data) { |
| 271 | 271 | const searchBar = document.getElementById('model_search_barfeatherless_model_search_bar'); |
| 272 | 272 | const modelCardBlock = document.getElementById('model_card_blockfeatherless_model_card_block'); |
| 273 | 273 | const paginationContainer = $('#model_pagination_containerfeatherless_model_pagination_container'); |
| 274 | 274 | const sortOrderSelect = document.getElementById('model_sort_orderfeatherless_model_sort_order'); |
| 275 | 275 | const classSelect = document.getElementById('class_selectionfeatherless_class_selection'); |
| 276 | 276 | const categoriesSelect = document.getElementById('category_selectionfeatherless_category_selection'); |
| 277 | 277 | const storageKey = 'Models_PerPageFeatherlessModels_PerPage'; |
| 278 | 278 | |
| 279 | 279 | // Store the original models data for search and filtering |
| 280 | 280 | let originalModels = []; |
| @@ -506,10 +506,10 @@ let featherlessIsGridView = false; // Default state set to grid view | ||
| 506 | 506 | |
| 507 | 507 | // Ensure the correct initial view is applied when the page loads |
| 508 | 508 | document.addEventListener('DOMContentLoaded', function () { |
| 509 | 509 | const modelCardBlock = document.getElementById('model_card_blockfeatherless_model_card_block'); |
| 510 | 510 | modelCardBlock.classList.add('list-view'); |
| 511 | 511 | |
| 512 | 512 | const toggleButton = document.getElementById('model_grid_togglefeatherless_model_grid_toggle'); |
| 513 | 513 | toggleButton.addEventListener('click', function () { |
| 514 | 514 | // Toggle between grid and list view |
| 515 | 515 | if (featherlessIsGridView) { |
| @@ -5564,6 +5564,10 @@ body:not(.movingUI) .drawer-content.maximized { | ||
| 5564 | 5564 | transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out, border 0.2s ease-in-out; |
| 5565 | 5565 | } |
| 5566 | 5566 | |
| 5567 | +.model-card .details-container { | |
| 5568 | + text-align: right; | |
| 5569 | +} | |
| 5570 | + | |
| 5567 | 5571 | .model-card:hover { |
| 5568 | 5572 | transform: scale(1.01); |
| 5569 | 5573 | background-color: #444; |
| @@ -5604,7 +5608,11 @@ body:not(.movingUI) .drawer-content.maximized { | ||
| 5604 | 5608 | margin-bottom: 5px; |
| 5605 | 5609 | } |
| 5606 | 5610 | |
| 5607 | 5611 | #model_card_blockfeatherless_model_pagination_container .gridpaginationjs-viewnav { |
| 5612 | + min-width: max-content; | |
| 5613 | +} | |
| 5614 | + | |
| 5615 | +#featherless_model_card_block.grid-view { | |
| 5608 | 5616 | grid-template-columns: repeat(2, 1fr); |
| 5609 | 5617 | display: flex; |
| 5610 | 5618 | flex-wrap: wrap; |
| @@ -5613,31 +5621,31 @@ body:not(.movingUI) .drawer-content.maximized { | ||
| 5613 | 5621 | } |
| 5614 | 5622 | |
| 5615 | 5623 | /* Grid-view card */ |
| 5616 | 5624 | #model_card_blockfeatherless_model_card_block.grid-view .model-card { |
| 5617 | 5625 | flex-direction: column; |
| 5618 | 5626 | flex: 1 1 calc(50% - 30px); |
| 5619 | 5627 | } |
| 5620 | 5628 | |
| 5621 | 5629 | #model_search_barfeatherless_model_search_bar { |
| 5622 | 5630 | width: 15ch; |
| 5623 | 5631 | flex-grow: 0; |
| 5624 | 5632 | align-self: center; |
| 5625 | 5633 | } |
| 5626 | 5634 | |
| 5627 | 5635 | #model_sort_orderfeatherless_model_sort_order { |
| 5628 | 5636 | width: auto; |
| 5629 | 5637 | flex-shrink: 0; |
| 5630 | 5638 | align-self: center; |
| 5631 | 5639 | } |
| 5632 | 5640 | |
| 5633 | 5641 | #model_grid_togglefeatherless_model_grid_toggle { |
| 5634 | 5642 | flex-shrink: 0; |
| 5635 | 5643 | width: auto; |
| 5636 | 5644 | cursor: pointer; |
| 5637 | 5645 | } |
| 5638 | 5646 | |
| 5639 | 5647 | #category_selectionfeatherless_category_selection, |
| 5640 | 5648 | #class_selectionfeatherless_class_selection { |
| 5641 | 5649 | display: flex; |
| 5642 | 5650 | width: auto; |
| 5643 | 5651 | align-self: center; |
| @@ -5654,7 +5662,7 @@ body:not(.movingUI) .drawer-content.maximized { | ||
| 5654 | 5662 | text-align: left; |
| 5655 | 5663 | } |
| 5656 | 5664 | |
| 5657 | 5665 | #model_search_barfeatherless_model_search_bar { |
| 5658 | 5666 | width: 100%; |
| 5659 | 5667 | } |
| 5660 | 5668 | |