Commit fabc0a46 authored by Olga  Brani's avatar Olga Brani

Merge branch 'feature-style' into develop

parents b944b7ec 4887bb49
Pipeline #3289 passed with stages
in 2 minutes and 17 seconds
......@@ -6,28 +6,24 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import useBaseUrl from '@docusaurus/useBaseUrl';
import styles from './styles.module.css';
const features = [
{
title: <>Horizon 2020</>,
imageUrl: 'images/EU-flag.jpg',
description: (
<>
Funded by the European Commission, as part of the Horizon 2020 Research
and Innovation Programme.
</>
),
},
];
function CustomFeature() {
const flagUrl = useBaseUrl('images/EU-flag.jpg');
const logoUrl = useBaseUrl('images/eSSIF-Lab logo.png');
const title = 'Horizon 2020';
const description =
' Funded by the European Commission, as part of the Horizon 2020 Research and Innovation Programme.';
function Feature({imageUrl, title, description}) {
const imgUrl = useBaseUrl(imageUrl);
return (
<div className={classnames('col col--4', styles.feature)}>
{imgUrl && (
<div className="text--center">
<img className={styles.featureImage} src={imgUrl} alt={title} />
</div>
)}
<div
className={classnames(
'col col--6 col--offset-3',
styles.feature,
styles.centered,
)}>
<div className={styles.featuredImages}>
<img src={flagUrl} alt="Horizon 2020" />
<img src={logoUrl} alt="eSSIF Lab logo" />
</div>
<h3>{title}</h3>
<p>{description}</p>
</div>
......@@ -58,17 +54,13 @@ function Home() {
</div>
</header>
<main>
{features && features.length && (
<section className={styles.features}>
<div className="container">
<div className="row">
{features.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
<section className={styles.features}>
<div className="container">
<div className="row">
<CustomFeature />
</div>
</section>
)}
</div>
</section>
</main>
</Layout>
);
......
......@@ -33,3 +33,13 @@
height: 200px;
width: 200px;
}
.featuredImages img {
height: 60px;
display: inline-block;
margin: 24px 5px 12px;
}
.centered {
text-align: center;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment