| 5481 | | 5481 | |
| 5482 | #user_avatar_block { | 5482 | #user_avatar_block { |
| 5483 | display: flex; | 5483 | display: flex; |
| 5484 | flex-wrap: wrap; /* Ensures cards go to the next row if there's not enough space */ | 5484 | flex-wrap: wrap; |
| 5485 | gap: 10px; /* Adds space between cards */ | 5485 | gap: 10px; |
| 5486 | } | 5486 | } |
| 5487 | | 5487 | |
| 5488 | /* Main structure for the model cards */ | 5488 | /* Main structure for the model cards */ |
| 5489 | .model-card { | 5489 | .model-card { |
| 5490 | display: flex; | 5490 | display: flex; |
| 5491 | justify-content: space-between; /* Align the title and details across the card */ | 5491 | justify-content: space-between; |
| 5492 | align-items: center; /* Center align the items vertically */ | 5492 | align-items: center; |
| 5493 | padding: 15px; /* Padding around the content */ | 5493 | padding: 15px; |
| 5494 | border: 1px solid #333; /* Border for the card */ | 5494 | border: 1px solid #333; |
| 5495 | border-radius: 8px; /* Rounded corners for the card */ | 5495 | border-radius: 8px; |
| 5496 | background-color: #222; /* Card background color */ | 5496 | background-color: #222; |
| 5497 | color: #fff; /* Text color */ | 5497 | color: #fff; |
| 5498 | margin: 7px; /* Space between cards */ | 5498 | margin: 7px; |
| 5499 | width: calc(100% - 7px); /* Full width minus margin */ | 5499 | width: calc(100% - 7px); |
| 5500 | box-sizing: border-box; /* Include padding and border in the width */ | 5500 | box-sizing: border-box; |
| 5501 | transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out, border 0.2s ease-in-out; | 5501 | transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out, border 0.2s ease-in-out; |
| 5502 | } | 5502 | } |
| 5503 | | 5503 | |
| 5504 | .model-card:hover { | 5504 | .model-card:hover { |
| 5505 | transform: scale(1.02); /* Grow the card slightly on hover */ | 5505 | transform: scale(1.02); |
| 5506 | background-color: #444; /* Highlight background on hover */ | 5506 | background-color: #444; |
| 5507 | transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out; /* Smooth transition */ | 5507 | transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out; /* Smooth transition */ |
| 5508 | } | 5508 | } |
| 5509 | | 5509 | |
| 5510 | /* Highlight the selected model card */ | | |
| 5511 | .model-card.selected { | 5510 | .model-card.selected { |
| 5512 | border: 2px solid var(--okGreen70a); /* Add a blue border to indicate selection */ | 5511 | border: 2px solid var(--okGreen70a); |
| 5513 | background-color: var(--okGreen70a); /* Slightly darker background for selected state */ | 5512 | background-color: var(--okGreen70a); |
| 5514 | } | 5513 | } |
| 5515 | | 5514 | |
| 5516 | /* Model title information */ | | |
| 5517 | .model-info { | 5515 | .model-info { |
| 5518 | flex: 1; /* Take up the remaining space */ | 5516 | flex: 1; |
| 5519 | white-space: nowrap; | 5517 | white-space: nowrap; |
| 5520 | overflow: hidden; | 5518 | overflow: hidden; |
| 5521 | text-overflow: ellipsis; /* Ellipsis for overflow text */ | 5519 | text-overflow: ellipsis; |
| 5522 | } | 5520 | } |
| 5523 | | 5521 | |
| 5524 | .model-title { | 5522 | .model-title { |
| 5525 | font-size: 16px; | 5523 | font-size: --mainFontSize; |
| 5526 | font-weight: bold; /* Bold text for the model title */ | 5524 | font-weight: bold; |
| 5527 | overflow: hidden; | 5525 | overflow: hidden; |
| 5528 | } | 5526 | } |
| 5529 | | 5527 | |
| 5530 | /* Model details section */ | | |
| 5531 | .model-details { | 5528 | .model-details { |
| 5532 | display: flex; | 5529 | display: flex; |
| 5533 | flex-direction: column; /* Stack class and context length vertically */ | 5530 | flex-direction: column; |
| 5534 | align-items: flex-end; /* Align details to the end (right) */ | 5531 | align-items: flex-end; |
| 5535 | text-align: right; /* Right-aligned text for class and context length */ | 5532 | text-align: right; |
| 5536 | min-width: 120px; /* Minimum width to prevent excessive squeezing */ | 5533 | min-width: 120px; |
| 5537 | } | 5534 | } |
| 5538 | | 5535 | |
| 5539 | .model-class, .model-context-length { | 5536 | .model-class, .model-context-length { |
| 5540 | font-size: 14px; /* Smaller font size for details */ | 5537 | font-size: calc(--mainFontSize - 3); |
| 5541 | } | 5538 | } |
| 5542 | | 5539 | |
| 5543 | .model-class { | 5540 | .model-class { |
| 5544 | margin-bottom: 5px; /* Space between class and context length */ | 5541 | margin-bottom: 5px; |
| 5545 | } | 5542 | } |
| 5546 | | 5543 | |
| 5547 | /* Grid-view layout for the card container */ | | |
| 5548 | #model_card_block.grid-view { | 5544 | #model_card_block.grid-view { |
| 5549 | /* grid-row: 1 / span 2; Span two rows */ | | |
| 5550 | grid-template-columns: repeat(2, 1fr); | 5545 | grid-template-columns: repeat(2, 1fr); |
| 5551 | display: flex; | 5546 | display: flex; |
| 5552 | flex-wrap: wrap; /* Cards wrap onto new lines when necessary */ | 5547 | flex-wrap: wrap; |
| 5553 | gap: 5px; /* Space between grid items */ | 5548 | gap: 5px; |
| 5554 | justify-content: flex-start; /* Align cards to the left */ | 5549 | justify-content: flex-start; |
| 5555 | } | 5550 | } |
| 5556 | | 5551 | |
| 5557 | /* Grid-view card */ | 5552 | /* Grid-view card */ |
| 5558 | #model_card_block.grid-view .model-card { | 5553 | #model_card_block.grid-view .model-card { |
| 5559 | flex-direction: column; /* Stack title, class, and context length vertically for grid */ | 5554 | flex-direction: column; |
| 5560 | flex: 1 1 calc(50% - 30px); /* 3 cards per row with spacing */ | 5555 | flex: 1 1 calc(50% - 30px); |
| 5561 | /* margin-bottom: 10px; */ | | |
| 5562 | } | 5556 | } |
| 5563 | | 5557 | |
| 5564 | /* Ensure the search bar takes most of the width */ | | |
| 5565 | #model_search_bar { | 5558 | #model_search_bar { |
| 5566 | width: 15ch; | 5559 | width: 15ch; |
| 5567 | flex-grow: 0; | 5560 | flex-grow: 0; |
| 5568 | /* min-width: 10ch; */ | | |
| 5569 | align-self: center; | 5561 | align-self: center; |
| 5570 | } | 5562 | } |
| 5571 | | 5563 | |
| 5572 | /* Sort dropdown should be auto-sized based on its content */ | | |
| 5573 | #model_sort_order { | 5564 | #model_sort_order { |
| 5574 | width: auto; | 5565 | width: auto; |
| 5575 | flex-shrink: 0; | 5566 | flex-shrink: 0; |
| 5576 | align-self: center; | 5567 | align-self: center; |
| 5577 | } | 5568 | } |
| 5578 | | 5569 | |
| 5579 | /* Grid toggle button */ | | |
| 5580 | #model_grid_toggle { | 5570 | #model_grid_toggle { |
| 5581 | flex-shrink: 0; | 5571 | flex-shrink: 0; |
| 5582 | width: auto; /* Keep default button size */ | 5572 | width: auto; |
| 5583 | cursor: pointer; | 5573 | cursor: pointer; |
| 5584 | } | 5574 | } |
| 5585 | | 5575 | |