Skip to content

Commit 93e3c75

Browse files
committed
docs: responsive images for mobile
1 parent e200bf8 commit 93e3c75

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

README.md

+20-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ options.
5656

5757
## Progress
5858

59-
<img src="https://stuff.charm.sh/bubbles-examples/progress.gif" width="800" alt="Progressbar Example">
59+
<picture>
60+
<source media="(max-width: 800px)" srcset="https://stuff.charm.sh/bubbles-examples/progress.gif">
61+
<source media="(min-width: 800px)" width="800" srcset="https://stuff.charm.sh/bubbles-examples/progress.gif">
62+
<img src="https://stuff.charm.sh/bubbles-examples/progress.gif" alt="Progressbar Example">
63+
</picture>
6064

6165
A simple, customizable progress meter, with optional animation via
6266
[Harmonica][harmonica]. Supports solid and gradient fills. The empty and filled
@@ -83,7 +87,11 @@ logic and visualize pagination however you like.
8387

8488
## Viewport
8589

86-
<img src="https://stuff.charm.sh/bubbles-examples/viewport.gif?0" width="600" alt="Viewport Example">
90+
<picture>
91+
<source media="(max-width: 600px)" srcset="https://stuff.charm.sh/bubbles-examples/viewport.gif?0">
92+
<source media="(min-width: 600px)" width="600" srcset="https://stuff.charm.sh/bubbles-examples/viewport.gif?0">
93+
<img src="https://stuff.charm.sh/bubbles-examples/viewport.gif?0" alt="Viewport Example">
94+
</picture>
8795

8896
A viewport for vertically scrolling content. Optionally includes standard
8997
pager keybindings and mouse wheel support. A high performance mode is available
@@ -99,7 +107,11 @@ indenting and text wrapping.
99107

100108
## List
101109

102-
<img src="https://stuff.charm.sh/bubbles-examples/list.gif" width="600" alt="List Example">
110+
<picture>
111+
<source media="(max-width: 600px)" srcset="https://stuff.charm.sh/bubbles-examples/list.gif">
112+
<source media="(min-width: 600px)" width="600" srcset="https://stuff.charm.sh/bubbles-examples/list.gif">
113+
<img src="https://stuff.charm.sh/bubbles-examples/list.gif" alt="List Example">
114+
</picture>
103115

104116
A customizable, batteries-included component for browsing a set of items.
105117
Features pagination, fuzzy filtering, auto-generated help, an activity spinner,
@@ -133,7 +145,11 @@ can be customized as you see fit.
133145

134146
## Help
135147

136-
<img src="https://stuff.charm.sh/bubbles-examples/help.gif" width="500" alt="Help Example">
148+
<picture>
149+
<source media="(max-width: 500px)" srcset="https://stuff.charm.sh/bubbles-examples/help.gif">
150+
<source media="(min-width: 500px)" width="500" srcset="https://stuff.charm.sh/bubbles-examples/help.gif">
151+
<img src="https://stuff.charm.sh/bubbles-examples/help.gif" alt="Help Example">
152+
</picture>
137153

138154
A customizable horizontal mini help view that automatically generates itself
139155
from your keybindings. It features single and multi-line modes, which the user

0 commit comments

Comments
 (0)