-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
.examplesPage { | ||
padding: 20px; | ||
text-align: center; | ||
} | ||
|
||
.heading { | ||
font-size: 2.5rem; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.examplesGrid { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 20px; | ||
justify-content: center; | ||
} | ||
|
||
.exampleBox { | ||
width: 300px; | ||
border: 1px solid #ddd; | ||
border-radius: 8px; | ||
padding: 16px; | ||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | ||
transition: transform 0.3s ease; | ||
} | ||
|
||
.exampleBox:hover { | ||
transform: translateY(-10px); | ||
} | ||
|
||
.image { | ||
width: 100%; | ||
height: auto; | ||
border-radius: 4px; | ||
} | ||
|
||
.title { | ||
font-size: 1.5rem; | ||
margin: 16px 0; | ||
} | ||
|
||
.description { | ||
font-size: 1rem; | ||
color: #555; | ||
margin-bottom: 16px; | ||
} | ||
|
||
.buttons { | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
|
||
.demoButton, | ||
.downloadButton { | ||
padding: 10px 20px; | ||
border: none; | ||
border-radius: 4px; | ||
cursor: pointer; | ||
transition: background-color 0.3s ease; | ||
} | ||
|
||
.demoButton { | ||
background-color: #007bff; | ||
color: #fff; | ||
} | ||
|
||
.demoButton:hover { | ||
background-color: #0056b3; | ||
} | ||
|
||
.downloadButton { | ||
background-color: #28a745; | ||
color: #fff; | ||
} | ||
|
||
.downloadButton:hover { | ||
background-color: #218838; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import React from 'react'; | ||
Check failure on line 1 in src/pages/Examples/Examples.tsx GitHub Actions / Build
Check failure on line 1 in src/pages/Examples/Examples.tsx GitHub Actions / Build
Check failure on line 1 in src/pages/Examples/Examples.tsx GitHub Actions / Build
Check failure on line 1 in src/pages/Examples/Examples.tsx GitHub Actions / Build
Check failure on line 1 in src/pages/Examples/Examples.tsx GitHub Actions / Build
Check failure on line 1 in src/pages/Examples/Examples.tsx GitHub Actions / Build
|
||
import styles from './Examples.module.css'; | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
const Example = ({ title, description, demoLink, downloadLink, imageUrl }) => ( | ||
<div className={styles.exampleBox}> | ||
<img src={imageUrl} alt={`${title} screenshot`} className={styles.image} /> | ||
<h2 className={styles.title}>{title}</h2> | ||
<p className={styles.description}>{description}</p> | ||
<div className={styles.buttons}> | ||
<button onClick={() => window.location.href = demoLink} className={styles.demoButton}>Show Demo</button> | ||
<button onClick={() => window.location.href = downloadLink} className={styles.downloadButton}>Download</button> | ||
</div> | ||
</div> | ||
); | ||
|
||
const Examples = () => { | ||
const navigate = useNavigate(); | ||
|
||
const examples = [ | ||
{ | ||
title: 'Template 1', | ||
description: 'A modern and responsive template for businesses.', | ||
demoLink: '/examples/template1', | ||
downloadLink: '/downloads/template1.zip', | ||
imageUrl: 'https://via.placeholder.com/400x300', | ||
}, | ||
{ | ||
title: 'Template 2', | ||
description: 'A clean and minimalist template for portfolios.', | ||
demoLink: '/examples/template2', | ||
downloadLink: '/downloads/template2.zip', | ||
imageUrl: 'https://via.placeholder.com/400x300', | ||
}, | ||
{ | ||
title: 'Template 3', | ||
description: 'A vibrant and dynamic template for startups.', | ||
demoLink: '/examples/template3', | ||
downloadLink: '/downloads/template3.zip', | ||
imageUrl: 'https://via.placeholder.com/400x300', | ||
}, | ||
{ | ||
title: 'Template 4', | ||
description: 'A professional template for corporate websites.', | ||
demoLink: '/examples/template4', | ||
downloadLink: '/downloads/template4.zip', | ||
imageUrl: 'https://via.placeholder.com/400x300', | ||
}, | ||
{ | ||
title: 'Template 5', | ||
description: 'An elegant template for blogs and magazines.', | ||
demoLink: '/examples/template5', | ||
downloadLink: '/downloads/template5.zip', | ||
imageUrl: 'https://via.placeholder.com/400x300', | ||
}, | ||
]; | ||
|
||
return ( | ||
<div className={styles.examplesPage}> | ||
<h1 className={styles.heading}>Examples</h1> | ||
<div className={styles.examplesGrid}> | ||
{examples.map((example, index) => ( | ||
<Example | ||
key={index} | ||
title={example.title} | ||
description={example.description} | ||
demoLink={example.demoLink} | ||
downloadLink={example.downloadLink} | ||
imageUrl={example.imageUrl} | ||
/> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Examples; |