Feat: homepage update from rocket

This commit is contained in:
Jonathan Kelley 2021-02-09 12:33:54 -05:00
parent f671ae5c8b
commit a61503f6cc
27 changed files with 2344 additions and 5 deletions

View File

@ -16,3 +16,5 @@ Dodrio
fc
Jemalloc
Cloudfare
webapps
downcasting

View File

@ -11,12 +11,12 @@ Dioxus is a portable, performant, and ergonomic framework for building cross-pla
```rust
static Example: FC<()> = |ctx| {
let (val1, set_val1) = use_state(&ctx, || "___?");
let (value, set_value) = use_state(&ctx, || "...?");
ctx.view(html! {
<div>
<button onclick={move |_| set_val1("world!")}> "world" </button>
<button onclick={move |_| set_val1("dioxus 🎉")}> "dioxus" </button>
<button onclick={move |_| set_value("world!")}> "world" </button>
<button onclick={move |_| set_value("dioxus 🎉")}> "dioxus" </button>
<div>
<p> "Hello, {val1}" </p>
</div>
@ -24,7 +24,8 @@ static Example: FC<()> = |ctx| {
})
};
```
The primary Dioxus crate is agnostic to platform and is meant to be configured with external renderers for getting content to the screen. We have built renderers for Dioxus to serve WebApps, Desktop Apps, static pages, liveview, Android, and iOS.
Dioxus can be used to serve webapps, desktop apps, static pages, LiveView apps, Android apps, iOS Apps, and more. At its core,
Dioxus is entirely renderer agnostic and has great documentation for creating new renderers for any platform.
Dioxus is supported by Dioxus Labs, a company providing end-to-end services for building, testing, deploying, and managing Dioxus apps on all supported platforms, designed especially for your next startup.

0
docs/guides/00-index.md Normal file
View File

0
docs/guides/01-ssr.md Normal file
View File

0
docs/guides/02-wasm.md Normal file
View File

View File

File diff suppressed because one or more lines are too long

View File

@ -1 +1,30 @@
# Custom Renderer
Dioxus is an incredibly portable framework for UI development. The lessons, knowledge, hooks, and components you acquire over time can always be used for future projects. However, sometimes those projects cannot leverage a supported renderer or you need to implement your own better renderer.
Great news: the design of the renderer is entirely up to you! We provide suggestions and inspiration with the 1st party renderers, but provide no trait or explicit interface to follow.
Implementing the renderer is fairly straightforward. The renderer needs to:
1. Handle the stream of edit events generated by updates to the virtual DOM
2. Register listeners and pass events into the virtual DOM's event system
3. Progress the virtual DOM with an async executor (or disable the suspense API and use `progress_sync`)
Essentially, your renderer needs to understand the EditEvent type and provide a callback for injecting events. From there, you'll have everything needed to render the VirtualDOM to the screen.
Internally, Dioxus handles the tree relationship, diffing, memory management, and the event system, leaving as little as possible required for renderers to implement themselves.
For inspiration, check out the source code for the various renderers we support:
- WebSys
- Morph
## Compatibility
Forewarning: not every hook and service will work on your platform. Dioxus wraps things that need to be cross-platform in "synthetic" types. However, downcasting to a native type might fail if the types don't match.
There are three opportunities for platform incompatibilities to break your program:
1. When downcasting elements via `Ref.to_native<T>()`
2. When downcasting events via `Event.to_native<T>()`
3. Calling platform-specific APIs that don't exist
The best hooks will properly detect the target platform and still provide functionality, failing gracefully when a platform is not supported. We encourage - and provide - an indication to the user on what platforms a hook supports. For issues 1 and 2, these return a result as to not cause panics on unsupported platforms. When designing your hooks, we recommend propagating this error upwards into user facing code, making it obvious that this particular service is not supported.

91
docs/rocketsrchrome.htm Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -0,0 +1 @@
<svg width="72" height="58" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path d="M51.1 35.7a3 3 0 0 1-2.8-3c0-.4 0-.8.2-1.1l.4-1-1-.3a5.1 5.1 0 0 1-3.3-4.8l.1-1.1.3-1.2h-1.4a4.6 4.6 0 0 1-4.6-4.6V17l-1.2.4a3.2 3.2 0 0 1-1.1.2 3.3 3.3 0 0 1-3.3-3.2c0-.6.2-1.2.5-1.7l.7-1-1.2-.4a26 26 0 0 0-7.4-1 26 26 0 1 0 26 26.3v-.9h-.9z" id="b"/><filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="a"><feOffset dx="2" in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur stdDeviation=".5" in="shadowOffsetOuter1" result="shadowBlurOuter1"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" in="shadowBlurOuter1"/></filter></defs><g fill="none" fill-rule="evenodd"><g transform="rotate(14 33.7 105.7)" fill="#FFF"><path d="M51.1 25.4a3 3 0 0 1-2.8-3c0-.3 0-.7.2-1l.4-1-1-.3a5.1 5.1 0 0 1-3.3-4.8l.1-1.2.3-1.1h-1.4A4.6 4.6 0 0 1 39 8.4V6.8l-1.2.4a3.2 3.2 0 0 1-1.1.2 3.3 3.3 0 0 1-3.3-3.2c0-.6.2-1.2.5-1.7l.7-1-1.2-.4A26 26 0 0 0 26 0a26 26 0 1 0 26 26.4v-1h-.9zM26 50.1c-7.5 0-14.3-3.4-18.7-8.9a3.2 3.2 0 1 0 .3-6.3 3.2 3.2 0 0 0-3 2.2 24 24 0 0 1-2.7-10.7 2 2 0 0 0 2 1.5 2 2 0 0 0 0-4.1 2 2 0 0 0-2 1.5 24.2 24.2 0 0 1 19.4-23l-.2 1a2.2 2.2 0 1 0 4.4 0 2.2 2.2 0 0 0-.5-1.4h1c2 0 4 .2 5.8.7a5 5 0 0 0-.2 1.6 5.1 5.1 0 0 0 5 5h.6a6.5 6.5 0 0 0 5.5 5.6 6.5 6.5 0 0 0 0 .5 7 7 0 0 0 3.8 6.2 4.8 4.8 0 0 0 3.6 5.7 24.2 24.2 0 0 1-24.1 23z" stroke="#FFF"/><ellipse cx="14.5" cy="11.4" rx="2" ry="2"/><ellipse cx="27.9" cy="14.1" rx="2.9" ry="2.9"/><ellipse cx="15.5" cy="21.6" rx="3.1" ry="3.1"/><circle cx="26.5" cy="29.5" r="3.8"/><ellipse cx="34" cy="42.5" rx="2.3" ry="2.3"/><ellipse cx="41.6" cy="32.9" rx="2" ry="2"/><circle cx="20.8" cy="41.7" r="2.6"/><ellipse cx="39.1" cy="20.7" rx="2" ry="2"/></g><g transform="translate(0 -6)"><use fill="#000" filter="url(#a)" xlink:href="#b"/><use fill="#282828" xlink:href="#b"/></g><g transform="translate(1.9 4.2)" fill="#FFF" stroke="#FFF"><path d="M51.1 25.4a3 3 0 0 1-2.8-3c0-.3 0-.7.2-1l.4-1-1-.3a5.1 5.1 0 0 1-3.3-4.8l.1-1.2.3-1.1h-1.4A4.6 4.6 0 0 1 39 8.4V6.8l-1.2.4a3.2 3.2 0 0 1-1.1.2 3.3 3.3 0 0 1-3.3-3.2c0-.6.2-1.2.5-1.7l.7-1-1.2-.4A26 26 0 0 0 26 0a26 26 0 1 0 26 26.4v-1h-.9zM26 50.1c-7.5 0-14.3-3.4-18.7-8.9a3.2 3.2 0 1 0 .3-6.3 3.2 3.2 0 0 0-3 2.2 24 24 0 0 1-2.7-10.7 2 2 0 0 0 2 1.5 2 2 0 0 0 0-4.1 2 2 0 0 0-2 1.5 24.2 24.2 0 0 1 19.4-23l-.2 1a2.2 2.2 0 1 0 4.4 0 2.2 2.2 0 0 0-.5-1.4h1c2 0 4 .2 5.8.7a5 5 0 0 0-.2 1.6 5.1 5.1 0 0 0 5 5h.6a6.5 6.5 0 0 0 5.5 5.6 6.5 6.5 0 0 0 0 .5 7 7 0 0 0 3.8 6.2 4.8 4.8 0 0 0 3.6 5.7 24.2 24.2 0 0 1-24.1 23z"/><ellipse cx="14.5" cy="11.4" rx="2" ry="2"/><ellipse cx="27.9" cy="14.1" rx="2.9" ry="2.9"/><ellipse cx="15.5" cy="21.6" rx="3.1" ry="3.1"/><ellipse cx="26.5" cy="29.5" rx="3.8" ry="3.8"/><ellipse cx="34" cy="42.5" rx="2.3" ry="2.3"/><ellipse cx="41.6" cy="32.9" rx="2" ry="2"/><ellipse cx="20.8" cy="41.7" rx="2.6" ry="2.6"/><ellipse cx="39.1" cy="20.7" rx="2" ry="2"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,32 @@
/* latin-ext */
@font-face {
font-family: 'Proza Libre';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/prozalibre/v5/LYjGdGHgj0k1DIQRyUEyyEomdNr1Wpyyzzc.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Proza Libre';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/prozalibre/v5/LYjGdGHgj0k1DIQRyUEyyEoodNr1Wpyy.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
font-family: 'Proza Libre';
font-style: normal;
font-weight: 500;
src: url(https://fonts.gstatic.com/s/prozalibre/v5/LYjbdGHgj0k1DIQRyUEyyELbV8_WeJGY9T6Mh1k.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Proza Libre';
font-style: normal;
font-weight: 500;
src: url(https://fonts.gstatic.com/s/prozalibre/v5/LYjbdGHgj0k1DIQRyUEyyELbV8_YeJGY9T6M.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -0,0 +1 @@
<svg width="139" height="28" xmlns="http://www.w3.org/2000/svg"><defs><filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="a"><feOffset dx="-2" in="SourceAlpha" result="shadowOffsetOuter1"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0" in="shadowOffsetOuter1" result="shadowMatrixOuter1"/><feMerge><feMergeNode in="shadowMatrixOuter1"/><feMergeNode in="SourceGraphic"/></feMerge></filter><linearGradient x1="-18.384%" y1="118.346%" x2="91.782%" y2="8.547%" id="b"><stop offset="0%"/><stop stop-color="#FFF" offset="100%"/></linearGradient></defs><g filter="url(#a)" transform="rotate(45 103.014 54.088)" fill="none" fill-rule="evenodd"><path d="M63.563 29.254c0 1.444.367 2.725 1.1 3.793L62.1 35.615c-.272.294-.072.497.216.786l2.012 2.003c.277.294.465.475.748.187l2.78-2.778c.624.229 2.121.628 4.385.296l1.74-1.311c.13-.099.357-.245.507-.327l1.563-.855-1.253 1.266c-.12.121-.324.3-.453.398l-1.496 1.127 2.55 6.977a.45.45 0 0 0 .735.171l5.985-5.693a.455.455 0 0 0 .134-.248l1.342-7.499c1.632-1.411 3.284-3.053 4.913-4.882 9.376-10.53 10.775-18.76 10.775-22.728 0-1.307-.159-2.027-.165-2.057a.452.452 0 0 0-.365-.346c-.466-.08-11.581-1.793-26.046 12.662-.018.02-1.897 1.957-3.92 4.674l-7.428 2.065a.451.451 0 0 0-.226.147l-5.284 6.349a.452.452 0 0 0 .221.722l7.1 2.064 1.195-1.375c.106-.122.295-.308.423-.418l1.334-1.143-.945 1.48a4.67 4.67 0 0 1-.356.478l-1.258 1.447zM79.24 13.868c2.348-2.348 5.694-2.81 7.473-1.03 1.78 1.78 1.319 5.125-1.03 7.474-2.348 2.348-5.693 2.809-7.473 1.03-1.78-1.78-1.318-5.126 1.03-7.474z" fill="#FFF"/><path d="M79.225 13.894c2.348-2.349 5.694-2.81 7.473-1.03 1.78 1.78 1.319 5.125-1.03 7.473-2.348 2.349-5.693 2.81-7.473 1.03-1.78-1.78-1.318-5.125 1.03-7.473z" fill-opacity=".1" fill="url(#b)"/><path d="M62.342 40.43L9.359 93.336a.815.815 0 0 1-1.152 0l-.573-.572a.813.813 0 0 1 0-1.15l52.982-52.909a.815.815 0 0 1 1.152 0l.574.573a.813.813 0 0 1 0 1.15m-.762 6.738L8.595 100.074a.815.815 0 0 1-1.152 0l-.573-.573a.813.813 0 0 1 0-1.15l52.983-52.908a.815.815 0 0 1 1.152 0l.573.572a.813.813 0 0 1 0 1.15M2.027 94.388a.817.817 0 0 1-1.152 0L.3 93.816a.813.813 0 0 1 0-1.15l52.983-52.91a.815.815 0 0 1 1.152 0l.574.573a.813.813 0 0 1 0 1.15L2.027 94.39z" fill="#FFF"/></g></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -0,0 +1 @@
<svg width="98" height="74" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="evenodd"><path d="M96.384 53.5h-1.617c-.001 1.045-.26 2.068-.793 3.11-.927 1.82-2.738 3.681-5.355 5.399-3.919 2.58-9.597 4.817-16.405 6.377C65.407 69.95 57.468 70.852 49 70.852c-12.903.003-24.582-2.102-32.892-5.426-4.155-1.657-7.459-3.622-9.643-5.69-1.094-1.032-1.908-2.085-2.44-3.125-.532-1.043-.791-2.066-.792-3.111 0-1.046.26-2.07.792-3.112.927-1.82 2.738-3.68 5.355-5.398 3.92-2.58 9.598-4.817 16.405-6.377C32.593 37.05 40.531 36.148 49 36.148c12.903-.004 24.58 2.101 32.892 5.426 4.155 1.657 7.458 3.621 9.642 5.689 1.095 1.032 1.908 2.086 2.44 3.125.533 1.042.792 2.066.793 3.112H98c0-1.568-.403-3.096-1.133-4.517-1.283-2.493-3.517-4.677-6.44-6.602-4.39-2.882-10.387-5.202-17.47-6.832C65.873 33.923 57.703 33 49 33c-13.267.004-25.28 2.135-34.12 5.66-4.419 1.77-8.055 3.882-10.665 6.343-1.304 1.231-2.352 2.556-3.083 3.98C.402 50.404-.002 51.932 0 53.5c-.002 1.567.402 3.094 1.132 4.517 1.283 2.492 3.517 4.676 6.44 6.601 4.391 2.882 10.387 5.202 17.471 6.832C32.125 73.077 40.295 74 49 74c13.266-.004 25.28-2.136 34.118-5.661 4.42-1.77 8.056-3.882 10.667-6.343 1.304-1.23 2.352-2.555 3.082-3.98.73-1.422 1.134-2.95 1.133-4.516h-1.616"/><path d="M89.78 46.567c0 .866.72 1.568 1.61 1.568.89 0 1.61-.702 1.61-1.568 0-.865-.72-1.567-1.61-1.567-.89 0-1.61.702-1.61 1.567zm-1.957 4.701a1.539 1.539 0 0 0 .226 2.206 1.64 1.64 0 0 0 2.266-.22 1.539 1.539 0 0 0-.226-2.205 1.641 1.641 0 0 0-2.266.219zM83.32 54.97a1.543 1.543 0 0 0-.504 2.162 1.637 1.637 0 0 0 2.221.49c.753-.461.978-1.43.503-2.162a1.637 1.637 0 0 0-2.22-.49zm-5.493 2.718a1.553 1.553 0 0 0-.872 2.048c.34.8 1.283 1.18 2.104.848.822-.332 1.212-1.249.872-2.048-.341-.8-1.283-1.18-2.104-.848zm-5.916 1.995c-.854.24-1.347 1.11-1.1 1.94.246.832 1.14 1.312 1.993 1.072.856-.24 1.348-1.109 1.101-1.94-.246-.832-1.138-1.311-1.994-1.072zm-6.128 1.44c-.873.169-1.44.993-1.267 1.843.173.848 1.02 1.4 1.893 1.231.872-.168 1.44-.992 1.267-1.842-.173-.849-1.021-1.4-1.893-1.232zm-6.248.977c-.882.108-1.508.891-1.398 1.75.11.86.916 1.468 1.799 1.36.882-.107 1.508-.89 1.397-1.75-.11-.858-.915-1.467-1.798-1.36zm-6.313.57c-.888.053-1.563.797-1.509 1.66.054.865.819 1.523 1.706 1.47.888-.054 1.564-.797 1.509-1.661-.055-.864-.818-1.521-1.706-1.468zm-6.344.195c-.89.002-1.609.706-1.607 1.57.002.867.725 1.567 1.614 1.565.89-.002 1.61-.705 1.607-1.57-.002-.867-.725-1.566-1.614-1.565zm-6.351-.156c-.889-.046-1.647.618-1.694 1.482-.047.865.635 1.603 1.523 1.648.888.047 1.646-.617 1.693-1.482.048-.864-.634-1.602-1.522-1.648zm-6.325-.51c-.883-.098-1.68.52-1.781 1.38-.101.86.534 1.637 1.418 1.735.883.097 1.68-.52 1.781-1.38.101-.86-.533-1.637-1.418-1.735zm-6.262-.901c-.875-.158-1.715.406-1.876 1.257-.16.851.417 1.668 1.292 1.825.874.158 1.714-.406 1.875-1.257.162-.851-.417-1.668-1.291-1.825zm-6.15-1.356c-.86-.228-1.744.264-1.978 1.1-.235.834.271 1.696 1.129 1.924.858.228 1.744-.264 1.978-1.1.234-.834-.271-1.696-1.13-1.924zm-5.94-1.914c-.827-.321-1.764.07-2.094.874-.33.804.073 1.716.9 2.037.824.321 1.762-.07 2.092-.875.33-.803-.073-1.715-.899-2.037v.001zm-5.512-2.657c-.756-.457-1.749-.232-2.218.504a1.542 1.542 0 0 0 .517 2.158 1.636 1.636 0 0 0 2.218-.503 1.543 1.543 0 0 0-.517-2.159zM5.87 51.684a1.641 1.641 0 0 0-2.263-.251 1.54 1.54 0 0 0-.258 2.202 1.64 1.64 0 0 0 2.263.251 1.54 1.54 0 0 0 .258-2.202zm22.24-25.73c2.976 1.4 10.46 4.391 20.173 4.396 5.905 0 12.634-1.114 19.63-4.375 4.502 4.369 7.453 10.212 7.996 16.71a50.737 50.737 0 0 1-4.564 2.236c-3.207 1.375-7.215 2.648-10.837 2.643-.45 0-.814.35-.814.782 0 .43.365.781.814.781 4.276-.005 8.732-1.546 12.153-3.064a52.697 52.697 0 0 0 3.335-1.629c.003.144.004.287.004.431 0 14.847-56 14.847-56 0 0-.225.003-.45.009-.674a52.741 52.741 0 0 0 3.786 1.872c3.421 1.518 7.878 3.059 12.152 3.064.45 0 .815-.35.815-.781 0-.432-.364-.782-.815-.782-3.862.006-8.165-1.445-11.467-2.918a51.002 51.002 0 0 1-4.368-2.204c.597-6.411 3.54-12.172 7.997-16.488zm1.264-1.151C34.324 20.57 40.85 18 48 18c7.162 0 13.697 2.579 18.649 6.822-6.557 2.953-12.828 3.964-18.366 3.965-6.089 0-11.29-1.227-14.963-2.454a42.813 42.813 0 0 1-3.946-1.53z"/><path d="M49.48 9.283l7.268-1.692a1.63 1.63 0 0 0 1.24-1.385 1.609 1.609 0 0 0-.884-1.626l-8.69-4.4a1.692 1.692 0 0 0-1.62.055A1.62 1.62 0 0 0 46 1.62v18.76c0 .895.74 1.62 1.655 1.62.914 0 1.655-.725 1.655-1.62l.17-11.097z"/></g></svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -0,0 +1 @@
<svg width="82" height="81" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="evenodd"><path d="M17.41 20.294c0 2.096-1.732 3.795-3.87 3.795-2.137 0-3.869-1.699-3.869-3.795s1.732-3.796 3.87-3.796c2.137 0 3.869 1.7 3.869 3.796m48.14 48.052c0 .828-.684 1.5-1.528 1.5-.846 0-1.53-.672-1.53-1.5 0-.83.684-1.5 1.53-1.5.844 0 1.529.67 1.529 1.5M35.542 55.012l-1.377.553a15.557 15.557 0 0 1 1.208 6.002c0 3.127-.95 6.18-2.685 8.76a16.045 16.045 0 0 1-7.387 5.949 16.41 16.41 0 0 1-6.12 1.185c-3.19 0-6.301-.932-8.932-2.633a15.872 15.872 0 0 1-6.064-7.247 15.558 15.558 0 0 1-1.21-6.002c0-3.128.95-6.18 2.686-8.76a16.04 16.04 0 0 1 7.388-5.949 16.406 16.406 0 0 1 6.12-1.185c3.189 0 6.3.932 8.931 2.633a15.878 15.878 0 0 1 6.065 7.247l1.377-.553 1.378-.551a18.806 18.806 0 0 0-7.182-8.58 19.46 19.46 0 0 0-17.815-1.713 19.015 19.015 0 0 0-8.747 7.044A18.607 18.607 0 0 0 0 61.579c0 2.37.46 4.781 1.43 7.106a18.804 18.804 0 0 0 7.18 8.58 19.46 19.46 0 0 0 17.816 1.713c3.71-1.487 6.697-3.99 8.747-7.044a18.6 18.6 0 0 0 3.176-10.367c0-2.37-.46-4.781-1.43-7.107l-1.377.552"/><path d="M10.119 48.911L45.309 2.78a1.441 1.441 0 0 0-.3-2.043 1.508 1.508 0 0 0-2.082.295L7.737 47.163a1.44 1.44 0 0 0 .3 2.043c.657.482 1.59.35 2.082-.295m24.25 24.432l47.034-34.516a1.44 1.44 0 0 0 .3-2.042 1.507 1.507 0 0 0-2.082-.295L32.586 71.006a1.441 1.441 0 0 0-.3 2.043 1.507 1.507 0 0 0 2.083.294m3.907-27.893l30.631-31.594a1.44 1.44 0 0 0-.053-2.064 1.51 1.51 0 0 0-2.104.052L36.12 43.439a1.44 1.44 0 0 0 .054 2.064 1.508 1.508 0 0 0 2.103-.053M25.648 75.23c-2.724-4.05-5.68-7.907-9.206-11.319-1.828-1.769-3.996-3.122-6.07-4.585-1.797-1.268-4.234-1.856-5.919-3.144-1.1-.84-2.623.347-2.123 1.59.544 1.349 1.643 1.665 2.86 2.409 2.077 1.271 3.884 3.002 5.71 4.586 4.205 3.645 7.617 8.153 10.211 13.025 1.784 3.345 6.654.583 4.537-2.562"/><path d="M35.876 60.62c-2.09.656-8.949-1.58-11.42-2.508-2.914-1.094-5.503-2.671-7.921-4.584-1.58-1.248-4.243-3.255-4.894-5.29-.747-2.33-4.626-.554-3.109 1.758 3.506 5.342 10.075 9.056 16.056 10.963 1.287.41 12.404 3.44 12.321.257-.012-.515-.607-.729-1.033-.596"/></g></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

@ -0,0 +1 @@
<svg width="71" height="62" xmlns="http://www.w3.org/2000/svg"><defs><filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="a"><feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0" in="shadowOffsetOuter1" result="shadowMatrixOuter1"/><feMerge><feMergeNode in="shadowMatrixOuter1"/><feMergeNode in="SourceGraphic"/></feMerge></filter></defs><g filter="url(#a)" fill="#FFF" fill-rule="evenodd"><path d="M69.102 15.534l-.176-1.251-17.997 2.504-1.604-11.455 16.742-2.33 1.78 12.707 1.255-.175-.176-1.251.176 1.251 1.256-.174L68.228.15 46.463 3.178l2.305 16.461 21.765-3.029-.175-1.251-1.256.174"/><path d="M48.858 15.387l-.175-1.252-15.082 2.099-.708-5.057 13.825-1.925.884 6.31 1.256-.175-.175-1.252.175 1.252 1.256-.175-1.236-8.813-18.847 2.623 1.41 10.065 18.849-2.623-.176-1.252-1.256.175"/><path d="M33.104 17.58l-.175-1.253-22.666 3.155-.708-5.058 21.41-2.98.884 6.31 1.255-.175-.175-1.252.175 1.252 1.256-.175-1.234-8.812L6.692 12.27l1.41 10.064 26.433-3.678-.175-1.252-1.256.175"/><path d="M9.345 22.071L9.17 20.82l-4.58.637-1.033-7.384 3.322-.462 1.21 8.635 1.256-.175-.175-1.251.175 1.251 1.256-.175-1.56-11.138-8.346 1.161L2.43 24.31l8.347-1.16-.176-1.253-1.256.175m17.914-3.115v39.81c0 .7.567 1.265 1.268 1.265.7 0 1.268-.566 1.268-1.264v-39.81c0-.699-.568-1.264-1.268-1.264-.7 0-1.268.565-1.268 1.263m-3.804 0v39.81c0 .7.568 1.265 1.268 1.265.7 0 1.268-.566 1.268-1.264v-39.81c0-.699-.567-1.264-1.268-1.264-.7 0-1.268.565-1.268 1.263"/><path d="M24.723 60.032h3.804c.7 0 1.268-.566 1.268-1.264 0-.698-.568-1.264-1.268-1.264h-3.804c-.7 0-1.268.566-1.268 1.264 0 .698.568 1.264 1.268 1.264m3.607-31.537l22.559 22.487a1.271 1.271 0 0 0 1.793 0 1.261 1.261 0 0 0 0-1.788L30.123 26.707a1.271 1.271 0 0 0-1.793 0 1.261 1.261 0 0 0 0 1.788m-.144 4.84l20.57 20.504a1.27 1.27 0 0 0 1.792 0 1.26 1.26 0 0 0 0-1.787L29.98 31.548a1.27 1.27 0 0 0-1.793 0 1.26 1.26 0 0 0 0 1.787"/><path d="M50.548 53.839l2.5-2.491a1.261 1.261 0 0 0 0-1.788 1.271 1.271 0 0 0-1.793 0l-2.5 2.492a1.26 1.26 0 0 0 0 1.787 1.27 1.27 0 0 0 1.793 0M23.696 26.707L1.136 49.194a1.261 1.261 0 0 0 0 1.788 1.27 1.27 0 0 0 1.793 0l22.56-22.487a1.261 1.261 0 0 0 0-1.788 1.27 1.27 0 0 0-1.793 0m.142 4.841L3.27 52.052a1.26 1.26 0 0 0 0 1.787 1.271 1.271 0 0 0 1.793 0l20.568-20.504a1.26 1.26 0 0 0 0-1.787 1.271 1.271 0 0 0-1.793 0"/><path d="M5.063 52.052l-2.5-2.492a1.27 1.27 0 0 0-1.793 0 1.261 1.261 0 0 0 0 1.788l2.5 2.491a1.271 1.271 0 0 0 1.793 0 1.26 1.26 0 0 0 0-1.787"/></g></svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1 @@
<svg width="101" height="52" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="evenodd"><path d="M37.102 50.632V26h10.306v-2.737H34.354v27.369h2.748"/><path d="M28.857 52H42.6v-2.737H28.857zm0-4.79H42.6v-2.736H28.857zm39.163 3.422V23.263H54.966V26h10.306v24.632h2.748"/><path d="M59.776 52h13.741v-2.737H59.776zm0-4.79h13.741v-2.736H59.776zM39.163 13h22.674a1.37 1.37 0 0 0 1.374-1.368 1.37 1.37 0 0 0-1.374-1.369H39.163a1.37 1.37 0 0 0-1.374 1.369A1.37 1.37 0 0 0 39.163 13"/><path d="M99.626 15.737v-1.369H63.21v-4.79h35.04v6.159h1.375v-1.369 1.369H101V6.842H60.463v10.263H101v-1.368h-1.374m-60.463-.684v-1.369H2.748v-4.79H37.79v6.159h1.374v-1.369 1.369h1.374V6.158H0V16.42h40.537v-1.368h-1.374"/><path d="M9.619 7.526v6.842a1.37 1.37 0 0 0 1.374 1.369 1.37 1.37 0 0 0 1.374-1.369V7.526a1.37 1.37 0 0 0-1.374-1.368A1.37 1.37 0 0 0 9.62 7.526m15.115 0v6.842a1.37 1.37 0 0 0 1.374 1.369 1.37 1.37 0 0 0 1.374-1.369V7.526a1.37 1.37 0 0 0-1.374-1.368 1.37 1.37 0 0 0-1.374 1.368m63.898 1.369v6.842a1.37 1.37 0 0 0 1.374 1.368 1.37 1.37 0 0 0 1.374-1.368V8.895a1.37 1.37 0 0 0-1.374-1.369 1.37 1.37 0 0 0-1.374 1.369m-15.116 0v6.842a1.37 1.37 0 0 0 1.374 1.368 1.37 1.37 0 0 0 1.374-1.368V8.895a1.37 1.37 0 0 0-1.374-1.369 1.37 1.37 0 0 0-1.374 1.369M55.653 34.21v-1.368h-7.558V2.737h6.184V34.21h1.374v-1.369 1.369h1.374V0h-11.68v35.579h11.68V34.21h-1.374"/></g></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -41,6 +41,10 @@ path = "common.rs"
# Examples are manually keyed in
# ================================
[[example]]
path = "example_app.rs"
name = "example_app"
# [[example]]
# path = "hello_web.rs"
# name = "hello_web"

48
examples/example_app.rs Normal file
View File

@ -0,0 +1,48 @@
//! Example App
//! --------------
//!
//! This example shows how to use the cross-platform abilities of dioxus to generate everything a dioxus app might need.
//! All of your apps will look like this.
//!
//! cargo run --features dioxus/static
fn main() {
// DioxusApp::new(launch)
}
mod launches {
#[cfg(feature = "wasm")]
fn launch() {
// launch the wasm_rednerer
}
#[cfg(feature = "static")]
fn launch() {
// render the tree to text
}
// #[cfg(features = "server")]
// fn launch() {
// // launch the app
// }
// #[cfg(features = "liveview")]
// fn launch() {
// // launch the app
// }
// #[cfg(features = "desktop")]
// fn launch() {
// // launch the app
// }
// #[cfg(features = "android")]
// fn launch() {
// // launch a simulator in dev mode
// }
// #[cfg(features = "ios")]
// fn launch() {
// // launch a simulator in dev mode
// }
}