Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource card UI update #374

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
max-width: var(--bt-list-card-container);
gap: var(--bt-size-16);
margin: var(--bt-size-0) auto;
overflow-x: hidden;

&__tag {
cursor: pointer;
}
}
}
13 changes: 8 additions & 5 deletions ui/src/components/ComponentInjector/ListSearchResults/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import style from "./ListSearchResults.module.scss";
import { Row } from "antd";
import { Search, Text, getCategories } from "components/General";
import { List, ListProps } from "components/ComponentInjector";
import { API_ERROR, API_NO_DATA } from "data/constants";
Expand Down Expand Up @@ -58,11 +59,13 @@ const ListSearchResults = <T,>({
categoryQuery={categoryQuery}
onSearchCriteriaChange={onSearchCriteriaChange}
/>
<List
items={list}
itemComponent={itemComponent}
isLoading={isLoading}
/>
<Row gutter={[24, 24]}>
<List
items={list}
itemComponent={itemComponent}
isLoading={isLoading}
/>
</Row>
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
.resource {
display: grid;
box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
transition: all .3s;
min-height: 160px;
border: 1px solid rgba(0,0,0,.05);
border-radius: 8px;
background-color: #fff;

&:hover {
box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.18);
transform: translate3d(0px, -4px, 0px);
}

&_space {
display: grid;
grid-template-columns: var(--bt-grid-template-1) var(
--bt-grid-template-1
) var(--bt-grid-template-1) auto;
grid-template-columns:
var(--bt-grid-template-1) var(--bt-grid-template-1)
var(--bt-grid-template-1) auto;
}

&__avatar {
Expand All @@ -16,11 +26,6 @@
width: var(--bt-size-50);
}

&__container {
display: flex;
justify-content: space-between;
align-items: center;
}

@media screen and (max-width: 550px) {
width: var(--bt-size-percent-100);
Expand Down
10 changes: 5 additions & 5 deletions ui/src/components/InjectedComponent/ListItems/Resource/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Avatar, Card, Skeleton, Space, Tag, Typography } from "antd";
import { Avatar, Card, Skeleton, Space, Tag, Typography,Col } from "antd";
import style from "./Resource.module.scss";
import { Clipboard } from "components/ComponentInjector";
import { ClipboardButton } from "components/InjectedComponent";
import { ListItemProps } from "components/ComponentInjector";

const { Title } = Typography;
Expand Down Expand Up @@ -29,6 +27,7 @@ const Resource: React.FC<ListItemProps<ResourceType>> = ({
const { name, category, url } = resource || {};

return (
<Col className="gutter-row" xs={24} md={12} xl={8}>
<Card
className={style.resource}
key={name}
Expand All @@ -47,13 +46,14 @@ const Resource: React.FC<ListItemProps<ResourceType>> = ({
</Space>
</Space>

<Clipboard
{/* <Clipboard
text={url}
clipboardComponent={ClipboardButton}
/>
/> */}
</Space>
</Skeleton>
</Card>
</Col>
);
};

Expand Down
10 changes: 2 additions & 8 deletions ui/src/styles/antd-overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,10 @@ h5 {
border-inline-end: none !important;
}

.ant-menu-submenu {
/* can we do better? */
padding-left: 20px !important;
padding-right: 20px !important;
.ant-layout{
background-image: linear-gradient(to top, #e6e9f0 0%, #eef1f5 100%);
}

.ant-menu-item {
/* can we do better? */
padding-left: 32px !important;
}

.ant-input-textarea-affix-wrapper.ant-input-affix-wrapper > textarea.ant-input,
.ant-layout-content,
Expand Down
2 changes: 1 addition & 1 deletion ui/src/styles/sizes.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:where(html) {
--bt-list-card-container: 600px;
--bt-list-card-container: 1024px;
--bt-converter-width: 800px;
--bt-card-height: 279px;

Expand Down
Loading