Giter VIP home page Giter VIP logo

iron-doc-viewer's Introduction

Build status Published on webcomponents.org

<iron-doc-viewer>

A collection of elements that display documentation about custom elements, mixins, classes, and more using the JSON descriptor format produced by Polymer Analyzer.

You may also be interested in <iron-component-page>, which composes the iron-doc elements into a more complete documentation browser.

Elements

  • <iron-doc-nav> Show a table-of-contents.
  • <iron-doc-viewer> Manage routing and delegate to a child doc element.
  • <iron-doc-element> Show docs about a custom element.
  • <iron-doc-behavior> Show docs about a Polymer behavior.
  • <iron-doc-namespace> Show docs about a JavaScript namespace.
  • <iron-doc-class> Show docs about a JavaScript class.
  • <iron-doc-mixin> Show docs about a JavaScript mixin.

Routing

<iron-doc-viewer> handles URL routing to provide permanent addresses for all locations in the documentation tree, including scroll anchor targets.

By default it uses the URL fragment for routing (e.g. docs.html#/elements/my-element#property-foo), in order to support simple static file hosts.

To use the real URL path for routing, set the base-href property to the server mount point, omitting the trailing slash (e.g. /api/docs or empty string for the root path). Note that this requires a host that serves the application from all paths that should be handled by the doc viewer.

Styling

The iron-doc elements come with an optional material-design default theme that must be explicitly included as custom style:

<link rel="import" href="../iron-doc-viewer/default-theme.html">

<custom-style>
  <style is="custom-style" include="iron-doc-default-theme"></style>
</custom-style>

The following custom properties and mixins are available for styling:

Custom property Description Default
--iron-doc-accent-color Color for emphasis (e.g. hyperlink hover). #1565c0
--iron-doc-font-body Mixin applied to non-code text. {}
--iron-doc-font-code Mixin applied to code snippets. {}
--iron-doc-title Mixin applied to page titles. {}
--iron-doc-heading Mixin applied to section headings. {}

Previous versions

The 3.x iron-doc elements described here have major breaking changes versus the 1.x and 2.x versions. Previous versions were based on Hydrolysis, the predecessor to Polymer Analyzer. Hydrolysis is no longer maintained and does not support analysis of Polymer 2 elements.

If you still need the previous version, see the 2.x branch.

iron-doc-viewer's People

Contributors

abdonrd avatar addyosmani avatar aomarks avatar atotic avatar blasten avatar cdata avatar dfreedm avatar e111077 avatar ebidel avatar garlicnation avatar justinfagnani avatar katemenkhaus avatar keanulee avatar limonte avatar mbleigh avatar nevir avatar notwaldorf avatar rictic avatar samuelli avatar tedium-bot avatar tjsavage avatar valdrinkoshi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.