diff --git a/_source/_assets/css/components/_demo.scss b/_source/_assets/css/components/_demo.scss new file mode 100644 index 0000000..48cfe2d --- /dev/null +++ b/_source/_assets/css/components/_demo.scss @@ -0,0 +1,5 @@ +.demo { + background-color: $color-tint; + padding: 1em; + margin-bottom: 2em; +} diff --git a/_source/_assets/css/main.scss b/_source/_assets/css/main.scss index 3e461e0..5feccbb 100644 --- a/_source/_assets/css/main.scss +++ b/_source/_assets/css/main.scss @@ -1,4 +1,3 @@ - @import "base/mixins", "base/fonts", @@ -13,4 +12,5 @@ "components/landing", "components/highlighter", "components/callout", - "components/grid"; + "components/grid", + "components/demo"; diff --git a/_source/handbook/01_introduction.md b/_source/handbook/01_introduction.md index dfe340f..0e903b8 100644 --- a/_source/handbook/01_introduction.md +++ b/_source/handbook/01_introduction.md @@ -35,6 +35,8 @@ With Turbo Frames, you can place those independent segments inside frame element To wrap an independent segment in its own navigation context, enclose it in a `` tag. For example: +
HTML
+ ```html
@@ -43,16 +45,34 @@ To wrap an independent segment in its own navigation context, enclose it in a `< ``` +
DEMO
+
+ + + + + +
+ When you submit the form above, Turbo extracts the matching `` element from the redirected HTML response and swaps its content into the existing `new_message` frame element. The rest of the page stays just as it was. Frames can also defer loading their contents in addition to scoping navigation. To defer loading a frame, add a `src` attribute whose value is the URL to be automatically loaded. As with scoped navigation, Turbo finds and extracts the matching frame from the resulting response and swaps its content into place: +
HTML
+ ```html

This message will be replaced by the response from /messages.

``` +
DEMO
+
+ +

This message will be replaced by the response from /messages.

+
+
+ This may sound a lot like old-school frames, or even `