From 5590e4c45bb868a8fa4610a1273ad131a3ee6354 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Wed, 20 Mar 2024 00:17:30 +0100 Subject: html: add example with floating figures --- src/web/html.md | 6 +++ src/web/src/figure.html | 99 ++++++++++++++++++++++++++++++++++++++++++++++++ src/web/src/grad.png | Bin 0 -> 33635 bytes 3 files changed, 105 insertions(+) create mode 100644 src/web/src/figure.html create mode 100644 src/web/src/grad.png (limited to 'src') diff --git a/src/web/html.md b/src/web/html.md index d3b78ba..0f236ef 100644 --- a/src/web/html.md +++ b/src/web/html.md @@ -30,3 +30,9 @@ ```html {{#include src/tags.html }} ``` + +# Floating figures with caption +[Rendered html](src/figure.html) +```html +{{#include src/figure.html }} +``` diff --git a/src/web/src/figure.html b/src/web/src/figure.html new file mode 100644 index 0000000..ebcdf58 --- /dev/null +++ b/src/web/src/figure.html @@ -0,0 +1,99 @@ + + + + +
+ +
Fig 1: wow such colors
+
+ +

+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +incididunt ut labore et dolore magna aliqua. Nunc lobortis mattis aliquam +faucibus. A iaculis at erat pellentesque adipiscing. Dolor morbi non arcu risus +quis varius quam quisque. Fermentum odio eu feugiat pretium. Nibh nisl +condimentum id venenatis. Gravida dictum fusce ut placerat orci nulla. Pulvinar +etiam non quam lacus suspendisse faucibus interdum posuere. Pulvinar +pellentesque habitant morbi tristique senectus et netus et malesuada. Sem +fringilla ut morbi tincidunt augue interdum. Consectetur purus ut faucibus +pulvinar elementum. Dui faucibus in ornare quam. Sodales ut etiam sit amet +nisl. Nunc scelerisque viverra mauris in aliquam. Nec sagittis aliquam +malesuada bibendum arcu vitae elementum curabitur. +

+ +
+ +
Fig 2: wow such colors again
+
+ +

+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +incididunt ut labore et dolore magna aliqua. Nunc lobortis mattis aliquam +faucibus. A iaculis at erat pellentesque adipiscing. Dolor morbi non arcu risus +quis varius quam quisque. Fermentum odio eu feugiat pretium. Nibh nisl +condimentum id venenatis. +

+ + + +
+ +
+ +
+ +Floats can be next to each other on the same height. + +
+ +
+ + + +
+ +
+ +
+ +The css property clear: {left, right, both}; controls how elements +should be handled relative to the previous floating element. + +
+ +
+ +

+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +incididunt ut labore et dolore magna aliqua. Nunc lobortis mattis aliquam +faucibus. A iaculis at erat pellentesque adipiscing. Dolor morbi non arcu risus +quis varius quam quisque. Fermentum odio eu feugiat pretium. Nibh nisl +condimentum id venenatis. Gravida dictum fusce ut placerat orci nulla. Pulvinar +etiam non quam lacus suspendisse faucibus interdum posuere. +

+ + + +
+ +
+
+ +
+overflow: auto gives an alternative to clear to +control placement of the floats. The red boarder visualizes the size of the +<div> block, you can remove the overflow property +and observe how the border changes. +
+ +
+ +
diff --git a/src/web/src/grad.png b/src/web/src/grad.png new file mode 100644 index 0000000..0ae458a Binary files /dev/null and b/src/web/src/grad.png differ -- cgit v1.2.3