-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more integration icons to the website (#134)
Signed-off-by: B-Step62 <[email protected]>
- Loading branch information
Showing
19 changed files
with
621 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React, { useState } from "react"; | ||
import styles from "./styles.module.css"; | ||
|
||
const ExpandableGrid = ({ items, defaultVisibleCount, renderItem }) => { | ||
const [isExpanded, setIsExpanded] = useState(false); | ||
|
||
const visibleItems = isExpanded ? items : items.slice(0, defaultVisibleCount); | ||
|
||
return ( | ||
<> | ||
<div | ||
className={`${styles.grid} ${!isExpanded ? styles.fadeOverlay : ""}`} | ||
> | ||
{visibleItems.map((item, index) => ( | ||
<div key={index} className={styles.gridItem}> | ||
{renderItem(item, index)} | ||
</div> | ||
))} | ||
</div> | ||
{items.length > defaultVisibleCount && ( | ||
<div className={styles.buttonContainer}> | ||
<button | ||
onClick={() => setIsExpanded(!isExpanded)} | ||
className={styles.toggleButton} | ||
> | ||
{isExpanded ? "See Less ∧" : "See All ∨"} | ||
</button> | ||
</div> | ||
)} | ||
</> | ||
); | ||
}; | ||
|
||
export default ExpandableGrid; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
.grid { | ||
display: grid; | ||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); | ||
gap: 24px; | ||
position: relative; | ||
} | ||
|
||
.grid.fadeOverlay { | ||
position: relative; | ||
} | ||
|
||
.grid.fadeOverlay::after { | ||
content: ""; | ||
position: absolute; | ||
bottom: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 4rem; | ||
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #0c1519); | ||
pointer-events: none; /* Allow click-through */ | ||
z-index: 1; | ||
} | ||
|
||
.buttonContainer { | ||
margin-top: 3rem; | ||
text-align: center; | ||
} | ||
|
||
.toggleButton { | ||
padding: 8px 16px; | ||
font-size: 16px; | ||
cursor: pointer; | ||
border: none; | ||
background-color: transparent; | ||
color: inherit; | ||
transition: color 0.3s; | ||
display: inline-flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.toggleButton:active { | ||
transform: scale(0.98); | ||
} | ||
|
||
.toggleButton:hover { | ||
color: var(--ifm-color-success); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const MOBILE_LAYOUT_BREAKPOINT = 996; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.