-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve generation of HTML for the hydrate example. (#657)
Fix hydrate example rendered HTML This changes the hydrate app to render the HTML when using `cargo run` so that we no longer need to manually update the HTML.
- Loading branch information
Showing
3 changed files
with
43 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,16 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<title>Hydration | Sycamore</title> | ||
</head> | ||
<body> | ||
<!-- SSR-ed HTML can be found in dev console when running the app. --> | ||
<p data-hk="0.0">Hydration</p> | ||
<br data-hk="0.1" /> | ||
<div data-hk="1.1"> | ||
<p> | ||
Hello | ||
<!--#--><span data-hk="1.0">World</span | ||
><!--/-->! | ||
</p> | ||
<input /> | ||
</div> | ||
<br data-hk="0.2" /> | ||
<div data-hk="2.0"> | ||
<p> | ||
Value: | ||
<!--#-->0<!--/--> | ||
</p> | ||
<button>+</button><button>-</button><button>Reset</button> | ||
</div> | ||
<div data-hk="3.0"><p>This paragraph is not hydrated!</p></div> | ||
<div data-hk="4.0"><!----></div> | ||
<!-- End SSR-ed HTML. --> | ||
</body> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<title>Hydration | Sycamore</title> | ||
</head> | ||
|
||
<body> | ||
<!-- Generate SSR-ed HTML with `cargo run`. This will generate an `index.html` file with the rendered HTML --> | ||
<p data-hk="0.0">Hydration</p><br data-hk="0.1"/><div data-hk="1.1"><p>Hello <!--#--><span data-hk="1.0">World</span><!--/-->!</p><input/></div><br data-hk="0.2"/><div data-hk="2.0"><p>Value: <!--#-->0<!--/--></p><button>+</button><button>-</button><button>Reset</button></div><div data-hk="3.0"><p>This paragraph is not hydrated!</p></div><div data-hk="4.0"><!----></div> | ||
<!-- End SSR-ed HTML. --> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!doctype html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<title>Hydration | Sycamore</title> | ||
</head> | ||
|
||
<body> | ||
<!-- Generate SSR-ed HTML with `cargo run`. This will generate an `index.html` file with the rendered HTML --> | ||
%sycamore.html% | ||
<!-- End SSR-ed HTML. --> | ||
</body> | ||
|
||
</html> |