Skip to content

Commit

Permalink
docs(aio): image sweep (#16609)
Browse files Browse the repository at this point in the history
* fix(aio): allow code blocks to clear floated images

Previously the negative margin on the code headings were causing
floated images to overlay the start of a code block. Now all code block
successfully clear all floated elements.

* feat(aio): add a `.clear` class for clearing floating images

* fix(aio): tidy up image styles

The css rules for `img.right` and `img.left` allow authors easy
access to floating an image on the left or right, respectively.

The `.image-display` rule which was always found on a figure
has been simplified so that all figures have this styling. It is very
unlikely that a figure will be used outside the content area; and
at this time it seems like `figure` is as good an indicator that we
want this kind of styling as anything.

Now that images are all tagged with width and height values, we cannot
assume to modify these dimensions via CSS as it can cause the image to
lose its correct proportions.  Until we find a better solition we must set
`height` to `auto` when the screen width is below 1300px to ensure that
these images maintain their proportions as they get shrunk to fit.

* docs(aio): general tidy up of image HTML in guides

Previously, the guides have a lot of inline image styling and unnecessary
use of the `image-display` css class.
Images over 700px are problematic for guide docs, so those have been given
specific widths and associated heights.

* docs(aio): use correct anchor for "back to the top" link

The `#toc` anchor does not work when the page is
wide enough that the TOC is floating to the side.

* build(aio): add `#top-of-page` to path variants for link checking

Since the `#top-of-page` is outside the rendered docs
the `checkAnchorLinks` processor doesn't find them
as valid targets for links.
Adding them as a `pathVariant` solves this problem
but will still catch links to docs that do not actually exist.

* fix(aio): ensure that headings clear floated images

* fix(aio): do not force live-example embedded image to 100% size

This made them look too big, generally. Leaving them with no size means
that they will look reasonable in large viewports and switch to 100% width
in narrow viewports.
  • Loading branch information
petebacondarwin authored and jasonaden committed May 9, 2017
1 parent d0e72a8 commit 9e661e5
Show file tree
Hide file tree
Showing 40 changed files with 578 additions and 1,328 deletions.
2 changes: 1 addition & 1 deletion aio/content/file-not-found.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@description

<div class="nf-container l-flex-wrap flex-center">
<img src="assets/images/support/angular-404.svg" width="300px" height="300px"/>
<img src="assets/images/support/angular-404.svg" width="300" height="300"/>
<div class="nf-response l-flex-wrap">
<h1 class="no-toc">Page Not Found</h1>
<p>We're sorry. The page you are looking for cannot be found.</p>
Expand Down
215 changes: 32 additions & 183 deletions aio/content/guide/animations.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions aio/content/guide/aot-compiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ showing exactly which application and Angular modules and classes are included i
Here's the map for _Tour of Heroes_.

<a href="generated/images/guide/aot-compiler/toh-pt6-bundle.png" title="View larger image">
<figure class='image-display'>
<img src="generated/images/guide/aot-compiler/toh-pt6-bundle.png" alt="toh-pt6-bundle"></img>
<figure>
<img src="generated/images/guide/aot-compiler/toh-pt6-bundle.png" alt="toh-pt6-bundle" width="700">
</figure>
</a>

0 comments on commit 9e661e5

Please sign in to comment.