Skip to content

Commit 8a717ab

Browse files
authored
fix: headers should use webp and remove the overlay (for accessibility and load)
2 parents 81b5750 + e2580a5 commit 8a717ab

File tree

112 files changed

+75
-126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+75
-126
lines changed

_includes/page__hero.html

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
{% capture overlay_img_path %}{{ page.header.overlay_image | relative_url }}{% endcapture %}
22

3-
{% if page.header.overlay_filter contains "gradient" %}
4-
{% capture overlay_filter %}{{ page.header.overlay_filter }}{% endcapture %}
5-
{% elsif page.header.overlay_filter contains "rgba" %}
6-
{% capture overlay_filter %}{{ page.header.overlay_filter }}{% endcapture %}
7-
{% capture overlay_filter %}linear-gradient({{ overlay_filter }}, {{ overlay_filter }}){% endcapture %}
8-
{% elsif page.header.overlay_filter %}
9-
{% capture overlay_filter %}rgba(0, 0, 0, {{ page.header.overlay_filter }}){% endcapture %}
10-
{% capture overlay_filter %}linear-gradient({{ overlay_filter }}, {{ overlay_filter }}){% endcapture %}
11-
{% endif %}
12-
133
{% if page.header.image_description %}
144
{% assign image_description = page.header.image_description %}
155
{% else %}
166
{% assign image_description = page.title %}
177
{% endif %}
188

199
{% assign image_description = image_description | markdownify | strip_html | strip_newlines | escape_once %}
20-
10+
<!-- Add support for webp and remove overlay filter -->
2111
<div class="page__hero{% if page.header.overlay_color or page.header.overlay_image %}--overlay{% endif %}"
22-
style="{% if page.header.overlay_color %}background-color: {{ page.header.overlay_color | default: 'transparent' }};{% endif %} {% if overlay_img_path %}background-image: {% if overlay_filter %}{{ overlay_filter }}, {% endif %}url('{{ overlay_img_path }}');{% endif %}"
23-
>
12+
style="
13+
{% if page.header.overlay_color %}
14+
background-color: {{ page.header.overlay_color | default: '#33205c' }};
15+
{% endif %}
16+
{% if overlay_img_path %}
17+
background-image: image-set(
18+
url('{{ overlay_img_path | replace: '.png', '.webp' }}') 1x,
19+
url('{{ overlay_img_path }}') type('image/png') 2x
20+
);
21+
{% endif %}
22+
">
2423
{% if page.header.overlay_color or page.header.overlay_image %}
2524
<div class="wrapper">
2625
<h1 id="page-title" class="page__title" itemprop="headline">

_pages/about-peer-review.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ layout: splash
33
permalink: /about-peer-review/
44
title: "pyOpenSci Makes Python Software Better and Easier to Find Through Peer Review"
55
header:
6-
overlay_image: images/header.png
7-
overlay_filter: 0.8
6+
overlay_image: images/headers/pyos-peer-review-header.png
87
intro:
98
- excerpt: "Our open peer review process makes scientific software better and easier to discover. [Check out our accepted packages.](https://www.pyopensci.org/python-packages.html)"
109
benefits_scientists:
@@ -16,7 +15,7 @@ benefits_scientists:
1615
btn_label: Learn more about scientific Python community partnerships
1716
btn_class: btn--primary
1817
benefits_maintainers:
19-
- image_path: images/landing-pages/pyopensci-supports-maintainers.png
18+
- image_path: images/landing-pages/peer-review-supports-maintainers.png
2019
alt: "A pencil sketch of a round table with people sitting around it from different backgrounds working on laptops and also writing together."
2120
excerpt: "The pyOpenSci peer review process multiplies shared knowledge, making it easier for Pythonistas of all levels to accomplish challenging tasks, such as navigating the Python packaging ecosystem, with relative ease. And our diverse community supports scientific package maintainers in their efforts to develop and build robust software."
2221
title: "Peer review benefits open source maintainers"

_pages/contributors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: "The pyOpenSci Team & Contributors"
55
excerpt: "pyOpenSci is a diverse community of people interested in building a community of practice around scientific software written in Python."
66
classes:
77
header:
8-
overlay_image: images/header.png
8+
overlay_image: images/headers/pyopensci-learn-header.png
99
overlay_filter: 0.6
1010
redirect_from:
1111
- /contributors.html

_pages/events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ classes: wide
55
title: "pyOpenSci Events"
66
excerpt: "pyOpenSci holds events that support scientists developing open science skills."
77
header:
8-
overlay_image: images/headers/scipy-2024-workshop.png
8+
overlay_image: images/headers/pyopensci-learn-header.png
99
overlay_filter: rgba(20, 13, 36, 0.8)
1010
author_profile: false
1111
---

_pages/home.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
layout: splash
33
title: "Welcome to pyOpenSci"
4-
excerpt: "We make it easier for scientists to create, find, maintain and contribute to reusable code and software."
4+
excerpt: "We make it easier for scientists to create, find, maintain, and contribute to reusable code and software."
55
author_profile: false
66
published: true
77
site-map: true
88
permalink: /
99
header:
10-
overlay_image: /images/people/header-mentored-sprints-smaller.png
10+
overlay_image: /images/headers/pyopensci-sprints.png
1111
overlay_filter: 0.7
1212
actions:
1313
- label: "Submit a Package"

_pages/how-to-submit-package.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
layout: single
33
title: "How to submit a Python package to pyOpenSci for review"
44
header:
5-
overlay_image: images/header.png
6-
overlay_filter: 0.8
5+
overlay_image: images/headers/pyos-peer-review-header.png
76
author_profile: false
87
published: true
98
site-map: true

_pages/packaging-resources.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ permalink: /python-packaging-science.html
55
title: "Python packaging resources for scientists"
66
excerpt: "We make the Python package ecosystem easier to navigate through peer review and packaging resources."
77
header:
8-
overlay_image: images/header.png
8+
overlay_image: images/headers/pyopensci-software.png
99
overlay_filter: 0.8
1010
intro:
1111
- excerpt: "There are many tools and approaches that can be used to create a Python package. We build resources that help you both understand the tool ecosystem and also learn how to create a Python package using modern best practices."

_pages/partners.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ permalink: /partners.html
44
title: "pyOpenSci Community Partners: affiliated package review"
55
classes: flowing
66
header:
7-
overlay_image: images/header.png
8-
overlay_filter: 0.6
7+
overlay_image: images/headers/pyos-peer-review-header.png
98
intro:
109
- excerpt: "More here on community partners."
1110
scientists:

_pages/python-packages.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ permalink: /python-packages.html
44
title: "pyOpenSci Open Peer Review & Accepted Packages"
55
classes:
66
header:
7-
overlay_image: images/header.png
8-
overlay_filter: 0.6
7+
overlay_image: images/headers/pyopensci-software.png
98
intro:
109
- excerpt: "The Python packages below have
1110
been accepted into the pyOpenSci ecosystem through our [open software peer review process](/about-peer-review/)."

_posts/2019-10-25-welcome-to-pyopensci.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ excerpt: "pyOpenSci is a community organization devoted to the development of ro
55
author: "Leah Wasser"
66
permalink: blog/welcome-to-pyopensci/
77
header:
8-
overlay_filter: 0.6
9-
overlay_color: "#333"
8+
overlay_color: "#33205c"
109
categories:
1110
- updates
1211
- blog-post

0 commit comments

Comments
 (0)