Ajout de l'illustration sur la page d'accueil
This commit is contained in:
parent
461fc446ff
commit
e8a76dae05
4 changed files with 130 additions and 30 deletions
|
|
@ -111,5 +111,9 @@
|
||||||
"carousel.goToSlide": {
|
"carousel.goToSlide": {
|
||||||
"message": "Go to slide {index}",
|
"message": "Go to slide {index}",
|
||||||
"description": "Go to slide button aria-label"
|
"description": "Go to slide button aria-label"
|
||||||
|
},
|
||||||
|
"homepage.illustrationCredit": {
|
||||||
|
"message": "Illustration by {artistLink}",
|
||||||
|
"description": "The credit for the homepage illustration"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,61 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.heroContainer {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.heroContent {
|
||||||
|
flex: 1;
|
||||||
|
text-align: left;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.heroIllustration {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
max-width: 400px;
|
||||||
|
animation: heroAnimation 1s ease-out forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.heroIllustration img {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.illustrationCredit {
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.illustrationCredit a {
|
||||||
|
color: black;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.illustrationCredit a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes heroAnimation {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(-20px) rotate(-5deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0) rotate(0deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.buttons {
|
.buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: flex-start;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
|
|
@ -33,4 +84,22 @@
|
||||||
.heroBanner {
|
.heroBanner {
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.heroContainer {
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.heroContent {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.heroIllustration {
|
||||||
|
order: -1;
|
||||||
|
max-width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.buttons {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,35 +15,62 @@ function HomepageHeader() {
|
||||||
return (
|
return (
|
||||||
<header className={clsx('hero hero--primary', styles.heroBanner)}>
|
<header className={clsx('hero hero--primary', styles.heroBanner)}>
|
||||||
<div className="container">
|
<div className="container">
|
||||||
<Heading as="h1" className="hero__title">
|
<div className={styles.heroContainer}>
|
||||||
{siteConfig.title}
|
<div className={styles.heroContent}>
|
||||||
</Heading>
|
<Heading as="h1" className="hero__title">
|
||||||
<p className="hero__subtitle">
|
{siteConfig.title}
|
||||||
<Translate
|
</Heading>
|
||||||
id="homepage.tagline"
|
<p className="hero__subtitle">
|
||||||
description="The homepage tagline">
|
<Translate
|
||||||
Recherches et réflexions sur les défis techniques
|
id="homepage.tagline"
|
||||||
</Translate>
|
description="The homepage tagline">
|
||||||
</p>
|
Recherches et réflexions sur les défis techniques
|
||||||
<div className={styles.buttons}>
|
</Translate>
|
||||||
<Link
|
</p>
|
||||||
className="button button--secondary button--lg"
|
<div className={styles.buttons}>
|
||||||
to="/docs/projets-openclassrooms">
|
<Link
|
||||||
<Translate
|
className="button button--secondary button--lg"
|
||||||
id="homepage.discoverDocs"
|
to="/docs/projets-openclassrooms">
|
||||||
description="The homepage button to discover the documentation">
|
<Translate
|
||||||
Découvrir la documentation
|
id="homepage.discoverDocs"
|
||||||
</Translate>
|
description="The homepage button to discover the documentation">
|
||||||
</Link>
|
Découvrir la documentation
|
||||||
<Link
|
</Translate>
|
||||||
className="button button--secondary button--lg margin-left--md"
|
</Link>
|
||||||
to="/blog">
|
<Link
|
||||||
<Translate
|
className="button button--secondary button--lg margin-left--md"
|
||||||
id="homepage.readBlog"
|
to="/blog">
|
||||||
description="The homepage button to read the blog">
|
<Translate
|
||||||
Lire le blog
|
id="homepage.readBlog"
|
||||||
</Translate>
|
description="The homepage button to read the blog">
|
||||||
</Link>
|
Lire le blog
|
||||||
|
</Translate>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className={styles.heroIllustration}>
|
||||||
|
<img
|
||||||
|
src="/img/illustration_vache.png"
|
||||||
|
alt="TellServ Tech Blog Illustration"
|
||||||
|
/>
|
||||||
|
<div className={styles.illustrationCredit}>
|
||||||
|
<Translate
|
||||||
|
id="homepage.illustrationCredit"
|
||||||
|
description="The credit for the homepage illustration"
|
||||||
|
values={{
|
||||||
|
artistLink: (
|
||||||
|
<a
|
||||||
|
href="https://vassile.fr"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer">
|
||||||
|
Vassile
|
||||||
|
</a>
|
||||||
|
),
|
||||||
|
}}>
|
||||||
|
{'Illustration par {artistLink}'}
|
||||||
|
</Translate>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
||||||
BIN
static/img/illustration_vache.png
Normal file
BIN
static/img/illustration_vache.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
Loading…
Add table
Add a link
Reference in a new issue