Skip to content

Commit 86ba83e

Browse files
authored
enh: webp added to figure examples (#692)
1 parent b312911 commit 86ba83e

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

_posts/2019-10-26-pyos-min-mistakes-theme.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: single
33
title: "pyOS Website Theme Docs"
44
excerpt: "pyOpenSci minimal mistakes theme documentation."
5-
author: "Leah Wasser"
5+
author: "pyopensci"
66
permalink: docs/pyos-website/
77
header:
88
overlay_color: "#33205c"
@@ -75,43 +75,57 @@ Position images with the following classes.
7575
### Figure -- align center
7676

7777
<figure class="align-center">
78+
<picture>
79+
<source srcset="/images/pyopensci-general/pyopensci-timeline2019-2024.webp" type="image/webp">
7880
<img src="/images/pyopensci-general/pyopensci-timeline2019-2024.png" alt="A timeline showing the growth of pyOpenSci from 2019 to 2024." style="width: 50%;">
7981
<figcaption>Growth of pyOpenSci from 2019 to 2024. Growth of pyOpenSci from 2019 to 2024. Growth of pyOpenSci from 2019 to 2024. Growth of pyOpenSci from 2019 to 2024. </figcaption>
82+
</picture>
8083
</figure>
8184

8285
The image above happens to be **centered**.
8386

8487
```html
8588
<figure class="align-center">
89+
<picture>
90+
<source srcset="/images/pyopensci-general/pyopensci-timeline2019-2024.webp" type="image/webp">
8691
<img src="/images/pyopensci-general/pyopensci-timeline2019-2024.png" alt="A timeline showing the growth of pyOpenSci from 2019 to 2024.">
8792
<figcaption>Growth of pyOpenSci from 2019 to 2024</figcaption>
93+
</picture>
8894
</figure>
8995
```
9096

91-
9297
### Figure -- align left
9398

9499
<figure class="align-left">
100+
<picture>
101+
<source srcset="/images/pyopensci-general/pyopensci-timeline2019-2024.webp" type="image/webp">
95102
<img src="/images/pyopensci-general/pyopensci-timeline2019-2024.png" alt="A timeline showing the growth of pyOpenSci from 2019 to 2024." style="width: 50%;">
96103
<figcaption>Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024</figcaption>
104+
</picture>
97105
</figure>
98106

99107

100108
The rest of this paragraph is filler for the sake of seeing the text wrap around the 150×150 image, which is **left aligned**. There should be plenty of room above, below, and to the right of the image. Just look at him there --- Hey guy! Way to rock that left side. I don't care what the right aligned image says, you look great. Don't let anyone else tell you differently.
101109

102110
```html
103111
<figure class="align-left">
112+
<picture>
113+
<source srcset="/images/pyopensci-general/pyopensci-timeline2019-2024.webp" type="image/webp">
104114
<img src="/images/pyopensci-general/pyopensci-timeline2019-2024.png" alt="A timeline showing the growth of pyOpenSci from 2019 to 2024.">
105115
<figcaption>Growth of pyOpenSci from 2019 to 2024</figcaption>
116+
</picture>
106117
</figure>
107118
```
108119

109120
You can also adjust the width inline:
110121

111122
```html
112123
<figure class="align-left">
124+
<picture>
125+
<source srcset="/images/pyopensci-general/pyopensci-timeline2019-2024.webp" type="image/webp">
113126
<img src="/images/pyopensci-general/pyopensci-timeline2019-2024.png" alt="A timeline showing the growth of pyOpenSci from 2019 to 2024." style="width: 50%;">
114127
<figcaption>Growth of pyOpenSci from 2019 to 2024</figcaption>
128+
</picture>
115129
</figure>
116130
```
117131

@@ -120,20 +134,25 @@ You can also adjust the width inline:
120134
Below is a right aligned image
121135

122136
<figure class="align-right">
137+
<picture>
138+
<source srcset="/images/pyopensci-general/pyopensci-timeline2019-2024.webp" type="image/webp">
123139
<img src="/images/pyopensci-general/pyopensci-timeline2019-2024.png" alt="A timeline showing the growth of pyOpenSci from 2019 to 2024." style="width: 50%;">
124140
<figcaption>Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024</figcaption>
141+
</picture>
125142
</figure>
126143

127-
128144
And now we're going to shift things to the **right align**. Again, there should be plenty of room above, below, and to the left of the image. Just look at him there --- Hey guy! Way to rock that right side. I don't care what the left aligned image says, you look great. Don't let anyone else tell you differently.
129145

130146
The html looks like this:
131147

132148

133149
```html
134150
<figure class="align-right">
151+
<picture>
152+
<source srcset="/images/pyopensci-general/pyopensci-timeline2019-2024.webp" type="image/webp">
135153
<img src="/images/pyopensci-general/pyopensci-timeline2019-2024.png" alt="A timeline showing the growth of pyOpenSci from 2019 to 2024.">
136154
<figcaption>Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024</figcaption>
155+
</picture>
137156
</figure>
138157
```
139158

@@ -143,17 +162,21 @@ The image below should extend outside of the parent container on right.
143162

144163

145164
<figure class="full">
165+
<picture>
166+
<source srcset="/images/pyopensci-general/pyopensci-timeline2019-2024.webp" type="image/webp">
146167
<img src="/images/pyopensci-general/pyopensci-timeline2019-2024.png" alt="A timeline showing the growth of pyOpenSci from 2019 to 2024.">
147168
<figcaption>Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024</figcaption>
169+
</picture>
148170
</figure>
149171

150172

151-
152-
153173
```html
154174
<figure class="full">
175+
<picture>
176+
<source srcset="/images/pyopensci-general/pyopensci-timeline2019-2024.webp" type="image/webp">
155177
<img src="/images/pyopensci-general/pyopensci-timeline2019-2024.png" alt="A timeline showing the growth of pyOpenSci from 2019 to 2024.">
156178
<figcaption>Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024 Growth of pyOpenSci from 2019 to 2024</figcaption>
179+
</picture>
157180
</figure>
158181
```
159182

0 commit comments

Comments
 (0)