Commit Graph

6 Commits

Author SHA1 Message Date
Sean Dague 534320c875 api-ref: add url parameter to expand all sections
When attempting to link to a specific element that is inside of a
collaspable section, the anchors don't work because they are not
visible. A relatively low complexity work around is to add an
?expand_all parameter, which allows one to specify the url as a page
that should be fully expanded. Then any deep linking will take people
to the right place.

Part of bp:api-ref-in-rst

Change-Id: Iae7bc4b2cee9ef76323877d502035e878d0d7182
2016-05-09 16:35:30 -04:00
Sean Dague 40630d731b Collection of CSS fixes
This ensures all parameter tables are 100% wide, even if they have
only a few items with short descriptions. It makes all the tables the
same width.

This moves the link icon into the gutter for the main content, and
makes it hidden by default (only visible on hover) like in the API
site today.

This makes the link + method name div be ``white-space: nowrap`` to
ensure that when the screen gets narrower the Delete button doesn't
fold up on itself.

Part of bp:api-ref-in-rst

Change-Id: I3892e6c8e3c01956d63a33603ba1bf9146d21161
2016-04-15 12:18:44 -04:00
Sean Dague ccee8b3c13 fix blockquote font size
The blockquote font size is 17.5px in bootstrap where normal text is
14px. This is because blockquote is thought of for doing pull
quotes. However sphinx uses block quote for indented text, and it
should thus be the same as the body text.

Part of bp:api-ref-in-rst

Change-Id: I4135686416d84f5ca113a031534c3486a4c2b1c5
2016-04-15 07:43:06 -04:00
Sean Dague e51b8f43e1 Add 'Show All' / 'Hide All' toggle
This adds a global control that does show / hide of all collapseable
sections. Which is extremely useful in seeing the entire API at once.

Part of bp:api-ref-in-rst

Change-Id: I814e6b2c20c25bf3d4cb4e722bc8157ca0aa1b89
2016-04-15 07:43:06 -04:00
Sean Dague 5bc00aac40 Fix css references to the glyphicons font
The bootstrap css uses the glyphicons font, but sphinx can't put it
exactly in the same place that bootstrap wants it. So fix the
minimized css to make it available and include those fonts in our
tree.

Part of bp:api-ref-in-rst

Change-Id: Ib45b90966ce12194fcb571c2782b1baed7af2471
2016-04-15 07:43:06 -04:00
Sean Dague 68ec070645 Create api-ref docs site
This creates a stub for landing content to support having the source
for the api-ref site in our source tree. It includes a new sphinx
extension that will be used to generate the html needed for the site
which supports 2 new stanzas:

 .. rest_parameters::

This uses a parameters yaml file to look up the definitions of
parameters and produce a structured table of those parameters and how
they are used.

 .. rest_method::

This is a stanza used inside a section which specifies the REST method
(i.e. GET /servers/{id}) which is then used to produce a nice
collapsable section.

This uses quite a bit of the sphinx extension API, and tries to
document any non obvious actions.

This extension needs additional styling from bootstrap, and some
custom js / css to do the theming / collapsing. That's included as
part of this.

Change-Id: I41b568b782d3c85f6ef8d3bb3a6f4ae378e4dc33
2016-03-29 16:35:33 -04:00