Skip to content

Commit

Permalink
fix hero
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienReuiller committed Jun 12, 2024
1 parent 87e97cc commit ba5ec40
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% load static wagtailimages_tags %}
{% if page.header_image or page.header_color_class %}
{% image page.header_image fill-1200x350 as bg_img %}
{% image page.header_image original as bg_img %}
<div class="cmsfr-hero{% if page.header_large %} cmsfr-hero-large{% endif %}{% if page.header_darken %} cmsfr-hero-dark{% endif %}"
style="{% if page.header_image %}background-image: {% if page.header_darken %}linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),{% endif %}url({{ bg_img.url }});
{% elif page.header_color_class %}background-color: var(--background-alt-{{ page.header_color_class }});
Expand Down
13 changes: 4 additions & 9 deletions static/css/style.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@

.hero {
background-repeat: no-repeat;
background-position: center; }

@media (max-width: 64em) {
.hero {
background-size: 0; } }

.vh {
position: absolute !important;
clip: rect(1px, 1px, 1px, 1px);
Expand All @@ -22,6 +13,10 @@
background-position: center;
background-repeat: no-repeat; }

@media (max-width: 64em) {
.cmsfr-hero {
background-size: 0; } }

.cmsfr-hero-large {
display: flex;
justify-content: center;
Expand Down
12 changes: 5 additions & 7 deletions static/css/style.sass
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
.hero
background-repeat: no-repeat
background-position: center

@media (max-width:64em)
.hero
background-size: 0

.vh
position: absolute !important
Expand All @@ -22,6 +15,11 @@
background-position: center
background-repeat: no-repeat

@media (max-width:64em)
.cmsfr-hero
background-size: 0


.cmsfr-hero-large
display: flex
justify-content: center
Expand Down

0 comments on commit ba5ec40

Please sign in to comment.