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

Overview Page on Mobile #1167

Merged
merged 2 commits into from
Nov 20, 2024
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
2 changes: 1 addition & 1 deletion docs/learn/developer-content.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"cardContent": [
{
"linkText": "Learn how to develop with Universal Profiles",
"linkPath": "../learn/universal-profile/getting-started"
"linkPath": "#building-dapps-with-universal-profiles"
},
{
"linkText": "Explore code examples in our playground repository",
Expand Down
13 changes: 7 additions & 6 deletions docs/learn/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,24 @@ When building dApps on LUKSO, you are interacting with [Universal Profiles 🆙]

<div style={{
display: 'flex',
margin: '5rem 0 5rem 0',
gap: "1rem"
flexDirection: 'column',
margin: '3rem 0',
gap: "1rem",
}}>

<div style={{ width: '32%' }}>
<div style={{ width: '100%' }}>

<CallToActionButton
icon="material-symbols:counter-1"
color="white"
target="_blank"
link="/install-up-browser-extension"
text="Install the Universal Profile Browser Extension 🧩"
text="Install the UP Browser Extension🧩"
mustafademiray marked this conversation as resolved.
Show resolved Hide resolved
/>

</div>

<div style={{ width: '36%' }}>
<div style={{ width: '100%' }}>

<CallToActionButton
icon="material-symbols:counter-2"
Expand All @@ -49,7 +50,7 @@ When building dApps on LUKSO, you are interacting with [Universal Profiles 🆙]

</div>

<div style={{ width: '28%' }}>
<div style={{ width: '100%' }}>

<CallToActionButton
icon="material-symbols:counter-3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
background-color: var(--color-cta-background-blue);
border-radius: 40px;
padding: 10px 20px;
width: auto;
max-width: 500px;
margin-bottom: 30px;

Expand All @@ -34,4 +35,12 @@
a:hover {
color: white !important;
}

.iconWrapper {
display: flex;
align-items: center;
justify-content: center;
margin: 0px 20px 0px 0px;
height: 100%;
}
}
21 changes: 16 additions & 5 deletions src/components/CallToActionButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,26 @@ export default function CallToActionButton({
return (
<div className={styles.ctaContainer}>
<a
style={{ backgroundColor: bgColor, display: 'flex' }}
style={{
backgroundColor: bgColor,
display: 'flex',
alignItems: 'center',
}}
className={styles.ctaButton}
href={link}
target={target}
>
<Icon
icon={icon}
style={{ width: '1.75em', height: '1.75em', marginRight: '0.5em' }}
/>
<span className={styles.iconWrapper}>
<Icon
icon={icon}
style={{
minWidth: '24px',
width: '24px',
height: '24px',
flexShrink: 0,
}}
/>
</span>
<strong style={{ color: color }}>{text}</strong>
</a>
</div>
Expand Down
31 changes: 28 additions & 3 deletions src/components/CardWithImage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,37 @@ type Props = {

export default function CardWithImage({ CardData }: Props) {
return (
<div className="cardwithimage" style={{ marginBottom: '5rem' }}>
<div
className="cardwithimage"
style={{
marginBottom: '5rem',
display: 'flex',
flexWrap: 'wrap',
gap: '1rem',
justifyContent: 'center',
}}
>
{CardData.map((item, index) => (
<Card sx={{ width: '48%' }} key={index}>
<Card
sx={{
width: {
xs: '100%', // full width on mobile
Copy link
Member

Choose a reason for hiding this comment

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

that's super clean! 🫡

sm: '85%', // slightly smaller on tablet
md: '48%', // original width on desktop
},
maxWidth: '600px', // prevent cards from getting too wide
}}
key={index}
>
{item.image && (
<CardMedia
sx={{ height: 140 }}
sx={{
height: {
xs: 200, // taller on mobile
sm: 180,
md: 140, // original height on desktop
},
}}
image={item.image}
title={item.imageTitle}
/>
Expand Down
1 change: 0 additions & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ function Index() {
text="🏁 Getting Started 🏁"
link="/learn/getting-started"
color="white"
icon="material-symbols:keyboard-double-arrow-right"
/>

<div style={{ marginTop: '3em' }}>
Expand Down