Commit graph

28 commits

Author SHA1 Message Date
Chris Wong
2f3d68c8a4
Remove blanket Render impl for T: Display ()
Closes 
2021-11-21 19:58:58 +11:00
Chris Wong
dc6c88fae3
Disallow slashes (/) in void elements ()
# Overview

The following syntax will no longer work:

```rust
html! {
    br /
    link rel="stylesheet" href="styles.css" /
}
```

This should be changed to the following:

```rust
html! {
    br;
    link rel="stylesheet" href="styles.css";
}
```

# Rationale

The `;` syntax was introduced in ; the rationale for it can be found there.

Removing support for the older `/` syntax will simplify the API surface, and allow for the space to be used for other things.
2021-11-07 23:17:15 +11:00
Chris Wong
434af86ae7
Remove Iron support ()
The Iron framework hasn't been updated in a long time. It still uses outdated versions of libraries like futures 0.1, hyper 0.12, url 1.7. We can clean up the repo by removing it. This will also slightly speed up CI.
2021-11-06 11:44:10 +00:00
Chris Wong
45157fc58c
Partially revert for class shorthand ()
On reflection, the extra spaces around classes feels weird to me. Let's revert that (but keep the 2021 edition migration in place).
2021-11-06 21:51:34 +11:00
Chris Wong
49755007da
Update to Rust 2021 () 2021-11-01 17:18:48 +11:00
Alexandre Macabies
2909e5129c
Add support for Option<T> attributes ()
* Add support for Option<T> attributes

Introduces the `attr=[value]` syntax that assumes `value` is an
`Option<T>`. Renders `attr="value"` for `Some(value)` and entirely
omits the attribute for `None`.

Implements and therefore closes .

* Call `Generator::splice` directly

* Handle struct literals (edge case)

Co-authored-by: Chris Wong <xbuns@google.com>
2021-10-29 16:24:34 +11:00
David Pedersen
4374979a4f
Update to support axum 0.2 ()
* Update to support axum 0.2

* Update changelog
2021-10-16 14:14:27 +11:00
Chris Wong
fe7588fcef
Remove "blazing" ()
It doesn't mean anything.
2021-09-24 10:01:55 +00:00
Marcel Müller
cc62bcbb86
Add axum support ()
Co-authored-by: Chris Wong <lambda.fairy@gmail.com>
2021-08-17 19:25:07 +10:00
Max Countryman
ba9c7b523c
Tide support ()
This introduces support for Tide by implementing `From` over markup.
Unlike other frameworks, Tide does not seem to provide e.g. a trait
which could instead be implemented. However as demonstrated, this
alternative results in a simple, ergonomic interface.

Consumers may leverage Tide support by using the "tide" feature.

Co-authored-by: Chris Wong <lambda.fairy@gmail.com>
2021-08-06 14:22:05 +10:00
Chris Wong
75b6801f47
Switch documentation to semantic line breaks ()
mdformat will preserve semantic line breaks, so we may as well commit to
using them.

cc 
2021-01-22 19:31:51 +13:00
Chris Wong
eaf552d417
Test documentation examples in CI ()
Closes 

Closes 
2021-01-15 17:40:46 +13:00
Chris Wong
202dc1ef01
Fix pulldown-cmark/ammonia example in docs ()
Closes 
2021-01-06 23:09:59 +13:00
Chris Wong
0358af67dc
Improve "elements and attributes" documentation () 2020-12-01 10:44:05 +13:00
Chris Wong
d5dec51c3a
Make the ? suffix for empty attributes optional () 2020-11-11 16:47:23 +13:00
Chris Wong
159b4080d2 Document splices in classes and IDs () 2020-11-02 16:33:03 +11:00
Chris Wong
3af1397541
Rewrite docs () 2020-11-02 12:53:27 +13:00
Chris Wong
b670d85595
Update documentation to account for stable support ()
* Remove `#![feature(proc_macro_hygiene)]` from documentation

Closes 

* Update comment about nightly vs stable
2020-10-08 11:02:19 +13:00
brian
240ecf03b8
Add example to docs of custom element ()
* Add example to docs of custom element

* incorporate feedback
2020-05-28 16:04:19 +10:00
Chris Wong
d0f29ae410 Change username from lfairy to lambda-fairy 2019-09-14 13:48:59 +12:00
kstrohbeck
680607dfae Update actix-web support documentation. () 2019-06-29 12:29:04 +12:00
Chris Wong
ee74c3ec49 Clean up partials docs 2019-05-09 21:30:04 +12:00
Thomas Lovegrove
f3a4c298de Add implicit div class/id shorthand ()
* Add implicit div class/id shorthand

* Add newline

* Add short explanation and example of implicit div
2019-04-20 13:39:24 +12:00
Chris Wong
5b027d08ae
Remove maud_extras crate ()
I don't think the examples in this crate are very useful, or demonstrate how to best use the library.
2019-03-25 20:36:23 +13:00
Chris Wong
07ca29aa55 Rust 2018 the web framework examples 2019-03-16 19:53:24 +13:00
Chris Wong
a986c22526 Remove tagline 2019-03-16 19:36:07 +13:00
Chris Wong
00a38a32b3 Add files from existing book 2019-03-16 16:29:31 +13:00
Chris Wong
65849b051e Rewrite the book! 2019-03-16 16:29:31 +13:00