Re: Responsive images in pgweb docs
Jonathan S. Katz <jkatz@postgresql.org>
From: "Jonathan S. Katz" <jkatz@postgresql.org>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
Pg Docs <pgsql-docs@lists.postgresql.org>
Date: 2019-04-04T16:23:56Z
Lists: pgsql-docs
Attachments
- 0001-Make-pagelayout.svg-scalable-based-viewport.patch (text/plain) patch 0001
On 4/4/19 7:17 AM, Peter Eisentraut wrote: > Here is a patch to improve this a bit. It turns back on making the SVG > images in the HTML output scale with the page size. I also added some > CSS stuff to make the width 75% on large screens for a more pleasing look. > > This fixes it for the gin image. The pagelayout image still doesn't > scale, presumably for the reasons you identified inside the SVG code. Tested against the local patch I have for pgweb for importing the docs with appropriate classes. The GIN SVG does indeed scale properly, thanks! As you mention, pagelayout still does not properly scale as it needs the fix to scale. Given you kept the gin.svg as is and that has some of the widths on it, I'd propose we just add the viewbox on pagelayout.svg, i.e. viewBox="0.00 0.00 610.00 210.00" Fix attached. I tested this in both the HTML build and with the import into pgweb with new patch, and it scaled correctly. Thanks, Jonathan
Commits
-
Add viewBox attribute to storage page layout SVG image
- 29046c44f360 12.0 landed
-
Better scaling of images in HTML output
- e446cde16d67 12.0 landed