Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Merge pull request #34 from Polymer/mixin
Browse files Browse the repository at this point in the history
Support @mixin + link to resource
  • Loading branch information
addyosmani committed Dec 17, 2014
2 parents 09cbecb + 57121f4 commit 2e351a1
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 8 deletions.
27 changes: 26 additions & 1 deletion elements/core-doc-page.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

:host {
display: block;
font-family: Roboto;
}

#info > * {
Expand All @@ -34,7 +35,11 @@ h1 {
color: #E91E63;
font-size: 52px;
line-height: 60px;
font-weight: inherit;
font-weight: 300;
}

h3 {
font-weight: 500;
}

.box {
Expand Down Expand Up @@ -68,6 +73,26 @@ h1 {
font-weight: 500;
}

.inheritance {
border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
padding: 16px 0;
}

.inheritance h3 {
margin: 0 10px 0 0;
}

.inheritance .top > * {
margin-right: 7px;
}

.top b,
.top strong {
text-transform: uppercase;
font-size: 14px;
}

.top pre {
background-color: rgb(250, 250, 250);
padding: 16px;
Expand Down
38 changes: 34 additions & 4 deletions elements/core-doc-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<link rel="import" href="../../prettify-element/prettify-import.html">
<link rel="import" href="../../context-free-parser/context-free-parser.html">

<link href='http://fonts.googleapis.com/css?family=Roboto:400,300,500,700|Source+Code+Pro' rel='stylesheet' type='text/css'>

<!--
Displays formatted source documentation scraped from input urls.
Expand Down Expand Up @@ -43,10 +45,38 @@ <h1>{{data.name}}</h1>
<span layout horizontal center hidden?="{{!data.version}}"><core-icon icon="info-outline"></core-icon>Version: {{data.version}}</span>
</p>

<template if="{{data.extends}}">
<section class="top">
<h3 id="{{data.name}}.extends">Extends: <a href="#{{data.extends}}">{{data.extends}}</a></h3>
</section>
<template bind="{{data as data}}" if="{{data.extends || data.mixins}}">
<div class="inheritance">
<template if="{{data.extends}}">
<section class="top extends" layout horizontal center>
<h3 id="{{data.name}}.extends">Extends:</h3>
<template repeat="{{e, i in data.extends}}">
<div>
<template if="{{e.url}}">
<a href="{{e.url}}">{{e.name}}</a>
</template>
<template if="{{!e.url}}"><a href="#{{e.name}}">{{e.name}}</a></template>
<span hidden?="{{i == data.extends.length - 1}}">,</span>
</div>
</template>
</section>
</template>

<template if="{{data.mixins}}">
<section class="top mixins" layout horizontal center>
<h3 id="{{data.name}}.mixins">Mixins:</h3>
<template repeat="{{e, i in data.mixins}}">
<div>
<template if="{{e.url}}">
<a href="{{e.url ? e.url : e.name}}">{{e.name}}</a>
</template>
<template if="{{!e.url}}"><span>{{e.name}}</span></template>
<span hidden?="{{i == data.mixins.length - 1}}">,</span>
</div>
</template>
</section>
</template>
</div>
</template>

<template if="{{data.description}}">
Expand Down
6 changes: 3 additions & 3 deletions elements/core-doc-toc.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ core-header-panel {
top: 0;
left: 0;
height: 100%;
width: 100%;
width: 100%;
}

core-toolbar {
background-color: #eeeeee;
core-toolbar {
background-color: #eeeeee;
}

0 comments on commit 2e351a1

Please sign in to comment.