🌐 AI搜索 & 代理 主页
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix large table overflow
  • Loading branch information
levkk committed May 9, 2024
commit 7c592d3b2b516a80706f980d71fd64166f9fc5bf
33 changes: 29 additions & 4 deletions pgml-dashboard/src/components/pages/demo/template.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% use crate::components::tables::small::*; %>
<% use crate::components::tables::{small as small_table, large as large_table}; %>
<% use crate::components::headings::{Green, Blue, Gray}; %>
<% use crate::components::inputs::text::EditableHeader; %>
<% use crate::components::inputs::text::{Input, search::{Search, search::SearchOptions}}; %>
Expand All @@ -12,17 +12,42 @@

<div class="container" data-controller="pages-demo">
<div class="py-5">
<%+ Table::new(&["Model", "Performance", "Cost"], &[
Row::new(&[
<%+ small_table::Table::new(&["Model", "Performance", "Cost"], &[
small_table::Row::new(&[
"intfloat/e5-small".into(),
"5ms/embedding".into(),
"$0.0000000001/embedding".into(),
]).into(),
Row::new(&[
small_table::Row::new(&[
"intfloat/e5-large".into(),
"10ms/embedding".into(),
"$0.0000000002/embedding".into(),
]).into(),
small_table::Row::new(&[
"intfloat/e5-large-with-overflow-intfloat/e5-large-with-overflow-intfloat/e5-large-with-overflow".into(),
"10ms/embedding".into(),
"$0.0000000002/embedding-intfloat/e5-large-with-overflow-intfloat/e5-large-with-overflow".into(),
]).into(),
]) %>
</div>

<div class="py-5">
<%+ large_table::Table::new(&["Model", "Performance", "Cost"], &[
large_table::Row::new(&[
"intfloat/e5-small".into(),
"5ms/embedding".into(),
"$0.0000000001/embedding".into(),
]).into(),
large_table::Row::new(&[
"intfloat/e5-large".into(),
"10ms/embedding".into(),
"$0.0000000002/embedding".into(),
]).into(),
large_table::Row::new(&[
"intfloat/e5-large-with-overflow-intfloat/e5-large-with-overflow-intfloat/e5-large-with-overflow".into(),
"10ms/embedding".into(),
"$0.0000000002/embedding-intfloat/e5-large-with-overflow-intfloat/e5-large-with-overflow".into(),
]).into(),
]) %>
</div>

Expand Down
4 changes: 2 additions & 2 deletions pgml-dashboard/src/components/tables/large/table/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ table.table.table-lg {
background: #{$gray-800};
text-transform: uppercase;
font-size: 0.75rem;
padding: 16px 0;
padding: 16px 12px 16px 0;

&:first-of-type {
padding-left: 67px;
Expand Down Expand Up @@ -42,7 +42,7 @@ table.table.table-lg {
td {
background: #{$gray-600};
vertical-align: middle;
padding: 20px 0;
padding: 20px 12px 20px 0;

&:first-of-type {
padding-left: 67px;
Expand Down