tohojo / bufferbloat-net

The source repository for the bufferbloat.net web site
https://www.bufferbloat.net
Other
52 stars 32 forks source link

Showing two graphs side by side #27

Open dtaht opened 7 years ago

dtaht commented 7 years ago

I'd like to be doing "before - after" plots side by side. It doesn't appear hugo by default lets you do anything fancy with graphics like this. I figure writing a new macro {{%figure2 src1= src2= %}} to do it right would be good - but in this modern era do you use tables? div tags? Apply some extra css. what?

also would like to "flow" text along the side of a graph (image align left or right)

(yes, I'm willing to learn enough go/hugo/templating to do this, but being too ancient to even know how to apply styles in modern is a PITA)

tohojo commented 7 years ago

First off, you can't do this in a way that will always work, because screen sizes and resolutions vary so much. On a phone, the images will not be side by side, for instance.

What you can do, is have the images flow side by side dynamically when the space allows. Having a command that produces a

with a suitable class that wraps the tags would be the way to go. Then you can style that with CSS to make the images float to one size. The "float" CSS property does that. This is also how you make an image float to the side of text...