Featherless: More specifity for selectors

4bdaca5f8e22f337b7d39d7c4db5ab28eacd968f

Cohee <18619528+Cohee1207@users.noreply.github.com>

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