Skip to content

Commit

Permalink
Home page Hero Image fix (#604)
Browse files Browse the repository at this point in the history
* Home page Hero Image fix

* Change to use vh method instead of padding

* Update AR version
  • Loading branch information
tunetheweb authored Dec 31, 2019
1 parent 0a5524d commit 05c0bb2
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 17 deletions.
32 changes: 23 additions & 9 deletions src/static/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,31 @@ p {
font-family: 'Poppins', sans-serif;
}

.intro-image {
.intro-image-wrapper {
grid-area: image;
display: none;
width:100%;
}

.intro-image-2019 {
.intro-image {
background-image: url(/static/images/home-hero.png);
background-size: cover;
height: 67.5vw;
width: 86vw;
}

.intro-image-2019-wrapper {
grid-area: image;
width:100%;
}

.intro-image-2019 {
background-image: url(/static/images/home-hero-2019.png);
background-size: cover;
max-height: 470px;
max-width: 100%;
height: auto;
margin-bottom: -90px;
max-width: 458px;
height: 41vw;
width: 40vw;
}

.intro .btn {
Expand Down Expand Up @@ -345,13 +359,13 @@ p {
font-weight: bold;
}

.intro-image {
.intro-image-wrapper {
display: block;
max-width: 100%;
margin-top: 80px;
margin-right: -46px;
}
.intro-image-2019 {
.intro-image-2019-wrapper {
display: none;
}

Expand Down Expand Up @@ -490,14 +504,14 @@ p {
font-weight: bold;
}

.intro-image {
.intro-image-wrapper {
display: block;
max-width: 100%;
margin-top: 60px;
margin-right: -46px;
}

.intro-image-2019 {
.intro-image-2019-wrapper {
display: none;
}

Expand Down
8 changes: 6 additions & 2 deletions src/templates/ar/2019/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ <h2>
Start exploring
</a>
</div>
<img class="intro-image-2019" src="/static/images/home-hero-2019.png" alt="The Web Almanac 2019 edition" />
<img class="intro-image" src="/static/images/home-hero.png" alt="The Web Almanac 2019 edition" />
<div class="intro-image-2019-wrapper">
<div class="intro-image-2019"></div>
</div>
<div class="intro-image-wrapper">
<div class="intro-image"></div>
</div>
</div>
{% endif %}
</header>
Expand Down
8 changes: 6 additions & 2 deletions src/templates/en/2019/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ <h2>
Start exploring
</a>
</div>
<img class="intro-image-2019" src="/static/images/home-hero-2019.png" alt="The Web Almanac 2019 edition" />
<img class="intro-image" src="/static/images/home-hero.png" alt="The Web Almanac 2019 edition" />
<div class="intro-image-2019-wrapper">
<div class="intro-image-2019"></div>
</div>
<div class="intro-image-wrapper">
<div class="intro-image"></div>
</div>
</div>
{% endif %}
</header>
Expand Down
8 changes: 6 additions & 2 deletions src/templates/es/2019/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ <h2>
Empieza a explorar
</a>
</div>
<img class="intro-image-2019" src="/static/images/home-hero-2019.png" alt="Web Almanac edición 2019" />
<img class="intro-image" src="/static/images/home-hero.png" alt="Web Almanac edición 2019" />
<div class="intro-image-2019-wrapper">
<div class="intro-image-2019"></div>
</div>
<div class="intro-image-wrapper">
<div class="intro-image"></div>
</div>
</div>
{% endif %}
</header>
Expand Down
8 changes: 6 additions & 2 deletions src/templates/fr/2019/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ <h2>
Commencer l’exploration
</a>
</div>
<img class="intro-image-2019" src="/static/images/home-hero-2019.png" alt="Édition 2019 du Web Almanac" />
<img class="intro-image" src="/static/images/home-hero.png" alt="Web Almanac" />
<div class="intro-image-2019-wrapper">
<div class="intro-image-2019"></div>
</div>
<div class="intro-image-wrapper">
<div class="intro-image"></div>
</div>
</div>
{% endif %}
</header>
Expand Down

0 comments on commit 05c0bb2

Please sign in to comment.