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

Improve /companies page #3552

Merged
merged 1 commit into from
Feb 12, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/components/Card/Card.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@
box-shadow: 0 2px 8px 2px rgba(104, 112, 118, 7%),
0 2px 4px -1px rgba(104, 112, 118, 4%);
}

.isHoverable:hover {
transition: box-shadow var(--easing-medium);
box-shadow: 0 12px 20px 6px rgba(104, 112, 118, 8%);
}
17 changes: 7 additions & 10 deletions app/components/Card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,19 @@ import type { HTMLAttributes } from 'react';

type Props = {
className?: string;

/** Small */
tight?: boolean;

/** Shadow */
shadow?: boolean;

/** Hidden overflow */
overflow?: boolean;
Comment on lines -7 to -15
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you need to comment on the prop name, you've chosen a bad name.

hideOverflow?: boolean;
isHoverable?: boolean;
} & HTMLAttributes<HTMLDivElement>;

function Card({
children,
className,
tight = false,
shadow = true,
overflow = false,
hideOverflow = false,
isHoverable = false,
...htmlAttributes
}: Props) {
return (
Expand All @@ -29,10 +25,11 @@ function Card({
className,
styles.card,
tight && styles.tight,
shadow && styles.shadow
shadow && styles.shadow,
isHoverable && styles.isHoverable
)}
style={{
overflow: overflow && 'hidden',
overflow: hideOverflow && 'hidden',
}}
{...htmlAttributes}
>
Expand Down
45 changes: 10 additions & 35 deletions app/routes/company/components/CompaniesPage.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,10 @@
.companyItem {
width: 220px;
height: 220px;
padding-bottom: 10px;
margin-bottom: 15px;
margin-left: 8px;
color: var(--color-black);
box-shadow: 5px 2px 5px #ede7e7;
border-radius: 2px;
padding: 0;
word-wrap: break-word;
}

html[data-theme='dark'] .companyItem {
box-shadow: 5px 2px 5px
rgba(var(--rgb-min), var(--rgb-min), var(--rgb-min), 10%);
}

.companyItemContent {
justify-content: space-between;
flex-direction: column;
Expand All @@ -52,32 +42,22 @@ html[data-theme='dark'] .companyItem {
height: 100%;
}

.companyItemTitle {
color: var(--lego-font-color);
font-weight: 700;
text-overflow: ellipsis;
overflow: hidden;
line-height: 25px;
height: 46px;
}

.companyItemTitle > * {
padding-bottom: 10px;
}

.iconLink {
color: var(--lego-link-color);
display: flex;
justify-content: center;
}

.companyInfo {
background-color: var(--additive-background);
color: var(--secondary-font-color);
font-style: italic;
justify-content: space-between;
padding: 0 30px;
border-top: 2px solid var(--lego-red-color);
padding-top: 20px;
font-weight: 600;
padding: 3px 50px;
padding-top: 15px;
}

.interestingCount {
color: var(--lego-red-color);
}

.companyLogoContainer {
Expand Down Expand Up @@ -121,12 +101,7 @@ html[data-theme='dark'] .companyItem {
}

.iconInfoPlacement {
flex-flow: row;
display: flex;
align-content: stretch;
justify-content: center;
margin-top: 38px;
margin-bottom: 39px;
margin: 38px 0;
}

.infoText {
Expand Down