From 6fd2c1552735639d96d177550e98b314bd6f79a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Thu, 7 Sep 2023 05:05:43 +0200 Subject: [PATCH] Host GIFs and video examples in `iced.rs` RIP Gfycat --- README.md | 14 +++++++------- examples/README.md | 20 +++++++------------- examples/bezier_tool/README.md | 4 +--- examples/color_palette/README.md | 6 ++---- examples/counter/README.md | 4 +--- examples/custom_widget/README.md | 4 +--- examples/download_progress/README.md | 4 +--- examples/events/README.md | 6 ------ examples/game_of_life/README.md | 4 +--- examples/geometry/README.md | 4 +--- examples/integration/README.md | 4 +--- examples/loading_spinners/README.md | 6 ------ examples/pane_grid/README.md | 4 +--- examples/pokedex/README.md | 4 +--- examples/progress_bar/README.md | 4 +--- examples/qr_code/README.md | 4 +--- examples/sierpinski_triangle/README.md | 4 +--- examples/solar_system/README.md | 4 +--- examples/stopwatch/README.md | 4 +--- examples/styling/README.md | 4 +--- examples/todos/README.md | 4 ++-- examples/tour/README.md | 4 ++-- src/lib.rs | 6 +++--- widget/src/pane_grid.rs | 4 ++-- 24 files changed, 40 insertions(+), 90 deletions(-) diff --git a/README.md b/README.md index 431f14f972..825219aa6f 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,11 @@ A cross-platform GUI library for Rust focused on simplicity and type-safety. Inspired by [Elm]. - - + + - - + + @@ -47,9 +47,9 @@ __Iced is currently experimental software.__ [Take a look at the roadmap], [Cross-platform support]: https://raw.githubusercontent.com/iced-rs/iced/master/docs/images/todos_desktop.jpg [the Web]: https://github.com/iced-rs/iced_web -[text inputs]: https://gfycat.com/alertcalmcrow-rust-gui -[scrollables]: https://gfycat.com/perkybaggybaboon-rust-gui -[Debug overlay with performance metrics]: https://gfycat.com/incredibledarlingbee +[text inputs]: https://iced.rs/examples/text_input.mp4 +[scrollables]: https://iced.rs/examples/scrollable.mp4 +[Debug overlay with performance metrics]: https://iced.rs/examples/debug.mp4 [Modular ecosystem]: ECOSYSTEM.md [renderer-agnostic native runtime]: runtime/ [`wgpu`]: https://github.com/gfx-rs/wgpu diff --git a/examples/README.md b/examples/README.md index 111e89100d..71dad13eba 100644 --- a/examples/README.md +++ b/examples/README.md @@ -10,8 +10,8 @@ A simple UI tour that can run both on native platforms and the web! It showcases The __[`main`](tour/src/main.rs)__ file contains all the code of the example! All the cross-platform GUI is defined in terms of __state__, __messages__, __update logic__ and __view logic__.
- - + +
@@ -33,8 +33,8 @@ A todos tracker inspired by [TodoMVC]. It showcases dynamic layout, text input, The example code is located in the __[`main`](todos/src/main.rs)__ file.
- - + +
@@ -53,9 +53,7 @@ It runs a simulation in a background thread while allowing interaction with a `C The relevant code is located in the __[`main`](game_of_life/src/main.rs)__ file.
- - - +
You can run it with `cargo run`: @@ -72,9 +70,7 @@ An example showcasing custom styling with a light and dark theme. The example code is located in the __[`main`](styling/src/main.rs)__ file.
- - - +
You can run it with `cargo run`: @@ -120,9 +116,7 @@ Since [Iced was born in May 2019], it has been powering the user interfaces in
- - - +
[Iced was born in May 2019]: https://github.com/hecrj/coffee/pull/35 diff --git a/examples/bezier_tool/README.md b/examples/bezier_tool/README.md index ebbb12cce3..6dc1378548 100644 --- a/examples/bezier_tool/README.md +++ b/examples/bezier_tool/README.md @@ -5,9 +5,7 @@ A Paint-like tool for drawing Bézier curves using the `Canvas` widget. The __[`main`]__ file contains all the code of the example.
- - - +
You can run it with `cargo run`: diff --git a/examples/color_palette/README.md b/examples/color_palette/README.md index f90020b1d6..9c13593747 100644 --- a/examples/color_palette/README.md +++ b/examples/color_palette/README.md @@ -3,13 +3,11 @@ A color palette generator, based on a user-defined root color.
- - - +
You can run it with `cargo run`: ``` -cargo run --package pure_color_palette +cargo run --package color_palette ``` diff --git a/examples/counter/README.md b/examples/counter/README.md index 4d9fc5b979..53243c246f 100644 --- a/examples/counter/README.md +++ b/examples/counter/README.md @@ -5,9 +5,7 @@ The classic counter example explained in the [`README`](../../README.md). The __[`main`]__ file contains all the code of the example.
- - - +
You can run it with `cargo run`: diff --git a/examples/custom_widget/README.md b/examples/custom_widget/README.md index 3d6cf902fe..b80e898fc5 100644 --- a/examples/custom_widget/README.md +++ b/examples/custom_widget/README.md @@ -5,9 +5,7 @@ A demonstration of how to build a custom widget that draws a circle. The __[`main`]__ file contains all the code of the example.
- - - +
You can run it with `cargo run`: diff --git a/examples/download_progress/README.md b/examples/download_progress/README.md index 7999ce94ad..19cb296694 100644 --- a/examples/download_progress/README.md +++ b/examples/download_progress/README.md @@ -5,9 +5,7 @@ A basic application that asynchronously downloads multiple dummy files of 100 MB The example implements a custom `Subscription` in the __[`download`](src/download.rs)__ module. This subscription downloads and produces messages that can be used to keep track of its progress.
- - - +
You can run it with `cargo run`: diff --git a/examples/events/README.md b/examples/events/README.md index 3c9a1cab3e..fd7f9b473a 100644 --- a/examples/events/README.md +++ b/examples/events/README.md @@ -4,12 +4,6 @@ A log of native events displayed using a conditional `Subscription`. The __[`main`]__ file contains all the code of the example. -
- - - -
- You can run it with `cargo run`: ``` cargo run --package events diff --git a/examples/game_of_life/README.md b/examples/game_of_life/README.md index aa39201c86..60033c1ae3 100644 --- a/examples/game_of_life/README.md +++ b/examples/game_of_life/README.md @@ -7,9 +7,7 @@ It runs a simulation in a background thread while allowing interaction with a `C The __[`main`]__ file contains the relevant code of the example.
- - - +
You can run it with `cargo run`: diff --git a/examples/geometry/README.md b/examples/geometry/README.md index 4d5c81cbef..16be8d191d 100644 --- a/examples/geometry/README.md +++ b/examples/geometry/README.md @@ -5,9 +5,7 @@ A custom widget showcasing how to draw geometry with the `Mesh2D` primitive in [ The __[`main`]__ file contains all the code of the example.
- - - +
You can run it with `cargo run`: diff --git a/examples/integration/README.md b/examples/integration/README.md index ece9ba1ee3..996cdc17ce 100644 --- a/examples/integration/README.md +++ b/examples/integration/README.md @@ -5,9 +5,7 @@ A demonstration of how to integrate Iced in an existing [`wgpu`] application. The __[`main`]__ file contains all the code of the example.
- - - +
You can run it with `cargo run`: diff --git a/examples/loading_spinners/README.md b/examples/loading_spinners/README.md index 3573c6f6d1..75b888040a 100644 --- a/examples/loading_spinners/README.md +++ b/examples/loading_spinners/README.md @@ -2,12 +2,6 @@ Example implementation of animated indeterminate loading spinners. -
- - - -
- You can run it with `cargo run`: ``` cargo run --package loading_spinners diff --git a/examples/pane_grid/README.md b/examples/pane_grid/README.md index a4cfcb7d12..65357b23c0 100644 --- a/examples/pane_grid/README.md +++ b/examples/pane_grid/README.md @@ -15,9 +15,7 @@ This example showcases the `PaneGrid` widget, which features: The __[`main`]__ file contains all the code of the example.
- - - +
You can run it with `cargo run`: diff --git a/examples/pokedex/README.md b/examples/pokedex/README.md index 50720f5715..8e8562ac4e 100644 --- a/examples/pokedex/README.md +++ b/examples/pokedex/README.md @@ -4,9 +4,7 @@ An application that loads a random Pokédex entry using the [PokéAPI]. All the example code can be found in the __[`main`](src/main.rs)__ file.
- - - +
You can run it on native platforms with `cargo run`: diff --git a/examples/progress_bar/README.md b/examples/progress_bar/README.md index 1e927b3cf3..1268ac6bee 100644 --- a/examples/progress_bar/README.md +++ b/examples/progress_bar/README.md @@ -5,9 +5,7 @@ A simple progress bar that can be filled by using a slider. The __[`main`]__ file contains all the code of the example.
- - - +
You can run it with `cargo run`: diff --git a/examples/qr_code/README.md b/examples/qr_code/README.md index 2dd89c26b8..0d1abaa708 100644 --- a/examples/qr_code/README.md +++ b/examples/qr_code/README.md @@ -5,9 +5,7 @@ A basic QR code generator that showcases the `QRCode` widget. The __[`main`]__ file contains all the code of the example.
- - - +
You can run it with `cargo run`: diff --git a/examples/sierpinski_triangle/README.md b/examples/sierpinski_triangle/README.md index 9fd1825781..8b7676d183 100644 --- a/examples/sierpinski_triangle/README.md +++ b/examples/sierpinski_triangle/README.md @@ -5,9 +5,7 @@ A simple [Sierpiński triangle](https://en.wikipedia.org/wiki/Sierpi%C5%84ski_tr Left-click add fixed point, right-click remove fixed point.
- - - +
You can run with cargo: diff --git a/examples/solar_system/README.md b/examples/solar_system/README.md index acfbc46639..81ffd3a5ca 100644 --- a/examples/solar_system/README.md +++ b/examples/solar_system/README.md @@ -5,9 +5,7 @@ An animated solar system drawn using the `Canvas` widget and showcasing how to c The __[`main`]__ file contains all the code of the example.
- - - +
You can run it with `cargo run`: diff --git a/examples/stopwatch/README.md b/examples/stopwatch/README.md index 4cf4582ed0..1cf370bdf8 100644 --- a/examples/stopwatch/README.md +++ b/examples/stopwatch/README.md @@ -5,9 +5,7 @@ A watch with start/stop and reset buttons showcasing how to listen to time. The __[`main`]__ file contains all the code of the example.
- - - +
You can run it with `cargo run`: diff --git a/examples/styling/README.md b/examples/styling/README.md index 6c198a541d..fd12300d32 100644 --- a/examples/styling/README.md +++ b/examples/styling/README.md @@ -4,9 +4,7 @@ An example showcasing custom styling with a light and dark theme. All the example code is located in the __[`main`](src/main.rs)__ file.
- - - +
You can run it with `cargo run`: diff --git a/examples/todos/README.md b/examples/todos/README.md index 9c2598b95e..852dd88d9a 100644 --- a/examples/todos/README.md +++ b/examples/todos/README.md @@ -5,8 +5,8 @@ A todos tracker inspired by [TodoMVC]. It showcases dynamic layout, text input, All the example code is located in the __[`main`]__ file.
- - + +
diff --git a/examples/tour/README.md b/examples/tour/README.md index 731e7e66f0..1c01236b31 100644 --- a/examples/tour/README.md +++ b/examples/tour/README.md @@ -5,8 +5,8 @@ A simple UI tour that can run both on native platforms and the web! It showcases The __[`main`]__ file contains all the code of the example! All the cross-platform GUI is defined in terms of __state__, __messages__, __update logic__ and __view logic__.
- - + +
diff --git a/src/lib.rs b/src/lib.rs index 840802cc0d..91c78423e6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,9 +20,9 @@ //! Check out the [repository] and the [examples] for more details! //! //! [Cross-platform support]: https://github.com/iced-rs/iced/blob/master/docs/images/todos_desktop.jpg?raw=true -//! [text inputs]: https://gfycat.com/alertcalmcrow-rust-gui -//! [scrollables]: https://gfycat.com/perkybaggybaboon-rust-gui -//! [Debug overlay with performance metrics]: https://gfycat.com/incredibledarlingbee +//! [text inputs]: https://iced.rs/examples/text_input.mp4 +//! [scrollables]: https://iced.rs/examples/scrollable.mp4 +//! [Debug overlay with performance metrics]: https://iced.rs/examples/debug.mp4 //! [Modular ecosystem]: https://github.com/iced-rs/iced/blob/master/ECOSYSTEM.md //! [renderer-agnostic native runtime]: https://github.com/iced-rs/iced/tree/0.10/runtime //! [`wgpu`]: https://github.com/gfx-rs/wgpu-rs diff --git a/widget/src/pane_grid.rs b/widget/src/pane_grid.rs index d8c9885894..408336226f 100644 --- a/widget/src/pane_grid.rs +++ b/widget/src/pane_grid.rs @@ -1,6 +1,6 @@ //! Let your users split regions of your application and organize layout dynamically. //! -//! [![Pane grid - Iced](https://thumbs.gfycat.com/MixedFlatJellyfish-small.gif)](https://gfycat.com/mixedflatjellyfish) +//! ![Pane grid - Iced](https://iced.rs/examples/pane_grid.gif) //! //! # Example //! The [`pane_grid` example] showcases how to use a [`PaneGrid`] with resizing, @@ -49,7 +49,7 @@ use crate::core::{ /// A collection of panes distributed using either vertical or horizontal splits /// to completely fill the space available. /// -/// [![Pane grid - Iced](https://thumbs.gfycat.com/FrailFreshAiredaleterrier-small.gif)](https://gfycat.com/frailfreshairedaleterrier) +/// ![Pane grid - Iced](https://iced.rs/examples/pane_grid.gif) /// /// This distribution of space is common in tiling window managers (like /// [`awesome`](https://awesomewm.org/), [`i3`](https://i3wm.org/), or even