Skip to content

Commit

Permalink
Move more resources to bottom of platform pages. Move nav items around
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel committed Feb 13, 2014
1 parent 2551608 commit 478b393
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 47 deletions.
11 changes: 11 additions & 0 deletions _includes/other-resources.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% if page.links %}

## Other useful resources

{% for link_hash in page.links %}
{% for link in link_hash %}
- [{{link[0]}}]({{link[1]}})
{% endfor %}
{% endfor %}

{% endif %}
16 changes: 1 addition & 15 deletions _includes/spec-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,4 @@

> {{page.feature.summary}}

---

{% if page.links %}

#### Before you begin

Some useful resources:

{% for link_hash in page.links %}
{% for link in link_hash %}
- [{{link[0]}}]({{link[1]}})
{% endfor %}
{% endfor %}

{% endif %}
---
6 changes: 3 additions & 3 deletions css/site2.css
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,11 @@ footer #copyright a { color: #666666; }
/* line 469, ../sass/site2.scss */
#content-container .article { margin-bottom: 2em; }
/* line 473, ../sass/site2.scss */
#content-container h2 { margin-top: 40px; }
#content-container h2 { margin-top: 20px; }
/* line 476, ../sass/site2.scss */
#content-container h3 { margin-top: 30px; }
#content-container h3 { margin-top: 15px; }
/* line 479, ../sass/site2.scss */
#content-container h4 { margin-top: 20px; }
#content-container h4 { margin-top: 10px; }
/* line 483, ../sass/site2.scss */
#content-container scroll-area article header { margin-bottom: 24px; }

Expand Down
23 changes: 1 addition & 22 deletions docs/start/usingelements.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,7 @@ with custom API functionality (i.e. attributes, properties, methods, events).
It can be surprising to consider invisible elements, that is, elements that do not
render anything to the screen. However, there are plenty of examples already in HTML: `<script>`, `<style>`, and `<meta>` to name a few. These do useful work without rendering UI.

Non-visual custom elements provide utility without rendering UI. An example is `<polymer-ajax>`, which removes the complexity of `XMLHttpRequest` by doing useful work without.

Another is `<polymer-layout>`.

is But the page is just blank, what happened? Well, polymer-layout is an example of a invisible element: an element that does useful work without actually showing up on the screen.

To make our page actually display something, we need to provide some nodes for polymer-layout to lay out.

<!doctype html>gi
<html>
<head>
<title>Project</title>
<script src="components/platform/platform.js"></script>
<link rel="import" href="components/polymer-layout/polymer-layout.html">
</head>
<body>
<polymer-layout></polymer-layout>
<div flex style="background: #333; border: 2px solid black;"></div>
</body>
</html>

There, now I've added an dark gray box, and we can see that it fills the viewport. Notice the flex attribute on the div. This is a custom attribute that tells polymer-layout to make the div fit the viewport and adapt as the viewport changes.
Non-visual custom elements provide utility without rendering. One example is `<polymer-ajax>`, which removes the complexity of `XMLHttpRequest` by doing useful work without.

## Visible Elements

Expand Down
6 changes: 3 additions & 3 deletions elements/docs-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
:host ^^ polymer-ui-icon {
background-size: 48px !important;
}
#mainmenu > polymer-ui-submenu-item {
#mainmenu > * {
display: none;
}
.show {
Expand All @@ -47,9 +47,9 @@
<polymer-ui-menu id="mainmenu">
<polymer-ui-submenu-item class="{{ {show: menu == 'start'} | tokenList}}" id="gettingstartedmenu" label="Getting started" src="/images/picons/ic_polymer_source.svg">
<!-- <ui-color-icon src="/images/picons/ic_polymer_source.svg"></ui-color-icon> -->
<polymer-ui-menu-item href="/getting-the-code.html">Get the code</polymer-ui-menu-item>
<polymer-ui-menu-item href="/docs/start/everything.html">Understanding Polymer</polymer-ui-menu-item>
<!-- <polymer-ui-menu-item href="/docs/start/layers.html">Layers of Polymer</polymer-ui-menu-item> -->
<polymer-ui-menu-item href="/getting-the-code.html">Get the code</polymer-ui-menu-item>
<polymer-ui-menu-item href="/docs/start/usingelements.html">Using elements</polymer-ui-menu-item>
<polymer-ui-menu-item href="/getting-started.html">Creating elements</polymer-ui-menu-item>
<polymer-ui-menu-item href="/docs/start/platform.html">Using Platform</polymer-ui-menu-item>
Expand Down Expand Up @@ -87,7 +87,7 @@
<polymer-ui-menu-item href="/changelog.html">Releases</polymer-ui-menu-item>
<polymer-ui-menu-item href="/faq.html">FAQ</polymer-ui-menu-item>
</polymer-ui-submenu-item>
<polymer-ui-menu-item id="articles" href="/articles/" class="{{ {show: menu == 'docs'} | tokenList}}" src="/images/picons/ic_news_dark.png">Articles</polymer-ui-menu-item>
<polymer-ui-menu-item id="articles" href="/articles/" class="elements-creating {{ {show: menu == 'docs'} | tokenList}}" src="/images/picons/ic_news_dark.png">Articles</polymer-ui-menu-item>
<!-- <polymer-ui-nav-arrow target="{{item}}" borderColor="rgba(0, 0, 0,0.15)"></polymer-ui-nav-arrow> -->
</polymer-ui-menu>
</template>
Expand Down
3 changes: 3 additions & 0 deletions platform/custom-elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ links:

{% include spec-header.html %}

{% include toc.html %}

{% include_external components/CustomElements/README.md %}

{% include other-resources.html %}
4 changes: 4 additions & 0 deletions platform/html-imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ links:

{% include spec-header.html %}

{% include toc.html %}

{% include_external components/HTMLImports/README.md %}

{% include other-resources.html %}
6 changes: 5 additions & 1 deletion platform/mutation-observers.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ feature:

{% include spec-header.html %}

{% include toc.html %}

TODO

{% comment %}
{% include_external polymer/platform/MutationObservers/README.md %}
{% endcomment %}
{% endcomment %}

{% include other-resources.html %}
4 changes: 4 additions & 0 deletions platform/pointer-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ feature:

{% include spec-header.html %}

{% include toc.html %}

{% include_external components/PointerEvents/README.md %}

{% include other-resources.html %}
4 changes: 4 additions & 0 deletions platform/shadow-dom.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ links:

{% include spec-header.html %}

{% include toc.html %}

{% include_external components/ShadowDOM/README.md %}

{% include other-resources.html %}
4 changes: 4 additions & 0 deletions platform/web-animations.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ feature:

{% include spec-header.html %}

{% include toc.html %}

{% include_external components/web-animations-js/README.md %}

{% include other-resources.html %}
6 changes: 3 additions & 3 deletions sass/site2.scss
Original file line number Diff line number Diff line change
Expand Up @@ -471,13 +471,13 @@ footer {
}

h2 {
margin-top: 40px;
margin-top: 20px;
}
h3 {
margin-top: 30px;
margin-top: 15px;
}
h4 {
margin-top: 20px;
margin-top: 10px;
}

scroll-area article header {
Expand Down

0 comments on commit 478b393

Please sign in to comment.