Skip to content

Commit

Permalink
Page is selected in top app-bar
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel committed Feb 11, 2014
1 parent 01d386a commit 7babcfd
Show file tree
Hide file tree
Showing 35 changed files with 71 additions and 25 deletions.
8 changes: 4 additions & 4 deletions _includes/top-nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
{% endcapture %}

<app-bar theme="{{theme | trim }}" class="bar">
<a href="/getting-started.html" class="paper-button" borderless sink>Start</a>
<a href="/docs/polymer/polymer.html" class="paper-button" borderless sink>Docs</a>
<a href="/faq.html" class="paper-button" borderless sink>Resources</a>
<a href="/discuss.html" class="paper-button" borderless sink>Community</a>
<a href="/getting-started.html" class="paper-button {% if page.navgroup == 'start' %}active{% endif %}" borderless sink>Start</a>
<a href="/docs/polymer/polymer.html" class="paper-button {% if page.navgroup == 'docs' %}active{% endif %}" borderless sink>Docs</a>
<a href="/faq.html" class="paper-button {% if page.navgroup == 'resources' %}active{% endif %}" borderless sink>Resources</a>
<a href="/discuss.html" class="paper-button {% if page.navgroup == 'community' %}active{% endif %}" borderless sink>Community</a>
<!-- <a href="#" class="paper-button" borderless sink>News</a> -->
</app-bar>
5 changes: 1 addition & 4 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
<polymer-ui-icon id="dropdown-toggle" size="35" src="/images/picons/ic_arrowDropDown_dark_.png">
</polymer-ui-icon>
</polymer-flex-layout>

{{site.data.pagetypes[page.type].menu}}
{{page.type}}

<polymer-ui-menu id="dropdown-panel">
<polymer-ui-arrow id="dropdown-arrow" direction="up" size="9">
Expand Down Expand Up @@ -45,7 +42,7 @@
</aside>
<page-scrim></page-scrim>
<scroll-area sidebar>
<site-banner type="{{page.type}}" shortname="{{page.shortname}}">
<site-banner type="{{page.type}}" navgroup="{{page.navgroup}}" shortname="{{page.shortname}}">
{% include top-nav.html %}
<header>
<h1>{{page.title}}</h1>
Expand Down
1 change: 1 addition & 0 deletions articles/communication.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: core
navgroup: docs
shortname: Articles
title: "Communication & Message Passing"
subtitle: Common techniques for sharing information between custom elements
Expand Down
1 change: 1 addition & 0 deletions articles/concatenating-web-components.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: core
navgroup: docs
shortname: Articles
title: "Concatenating Web Components with Vulcanize"
subtitle: Reduce network requests by flattening HTML Imports
Expand Down
1 change: 1 addition & 0 deletions articles/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: core
navgroup: docs
shortname: Docs
title: Articles
subtitle: Core concepts of build apps on top of Polymer and web components
Expand Down
1 change: 1 addition & 0 deletions articles/styling-elements.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: core
navgroup: docs
shortname: Articles
title: A Guide to Styling Elements

Expand Down
1 change: 1 addition & 0 deletions build/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: default
title: Build status
type: resources
navgroup: resources
shortname: Resources

add_permalinks: false
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: resources
navgroup: resources
shortname: Resources
title: Releases
---
Expand Down
1 change: 1 addition & 0 deletions compatibility.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: resources
navgroup: resources
shortname: Resources
title: Browser Compatibility
---
Expand Down
34 changes: 19 additions & 15 deletions css/elements/app-bar.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,44 +59,48 @@ code, pre { color: #9f499b; }
/* line 16, ../../sass/elements/app-bar.scss */
:host([theme="light"]) { color: inherit; }

/* line 20, ../../sass/elements/app-bar.scss */
/* line 21, ../../sass/elements/app-bar.scss */
:ancestor(site-banner[navgroup="start"], site-banner[navgroup="resources"], site-banner[navgroup="community"]) ::content .active, :ancestor(site-banner[navgroup="start"], site-banner[navgroup="resources"], site-banner[navgroup="community"]) ::content .paper-button:hover { box-shadow: 0 1px 1px black inset, 0 -1px 1px black inset, 0 2px 0px black inset; background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 40%); background: linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 40%); }

/* @polyfill-unscoped-rule site-banner[navgroup="start"] app-bar .active, site-banner[navgroup="resources"] app-bar .active, site-banner[navgroup="community"] app-bar .active { box-shadow: 0 1px 1px rgba(0, 0, 0, 1) inset, 0 -1px 1px rgba(0, 0, 0, 1) inset, 0 2px 0px rgba(0, 0, 0, 1) inset !important; background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 40%) !important; background: linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 40%) !important; }*/
/* line 35, ../../sass/elements/app-bar.scss */
:host(.search-on) { left: 0; background: inherit; }

/* line 25, ../../sass/elements/app-bar.scss */
/* line 40, ../../sass/elements/app-bar.scss */
:host([theme="dark"].search-on) { border-bottom: 1px solid rgba(0, 0, 0, 0.14902); box-shadow: #cccccc 0px 1px 5px; }

/* line 30, ../../sass/elements/app-bar.scss */
/* line 45, ../../sass/elements/app-bar.scss */
:ancestor(site-banner) { right: 0; top: 0; position: absolute; }

/* line 36, ../../sass/elements/app-bar.scss */
/* line 51, ../../sass/elements/app-bar.scss */
:host(.fixed) { position: fixed; }

/* line 40, ../../sass/elements/app-bar.scss */
/* line 55, ../../sass/elements/app-bar.scss */
polymer-ui-icon { width: 24px !important; height: 24px !important; background-size: 48px !important; opacity: 0.6; }

/* @polyfill :host a */
/* line 49, ../../sass/elements/app-bar.scss */
/* line 64, ../../sass/elements/app-bar.scss */
::content a { opacity: 0.6; }

/* line 53, ../../sass/elements/app-bar.scss */
/* line 68, ../../sass/elements/app-bar.scss */
#search { display: -webkit-box; display: -webkit-flex; display: -moz-flex; display: -ms-flex; display: -o-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; -moz-align-items: center; -ms-align-items: center; -o-align-items: center; align-items: center; width: 24px; margin-left: 16px; box-sizing: border-box; background-color: inherit; }
/* line 63, ../../sass/elements/app-bar.scss */
/* line 78, ../../sass/elements/app-bar.scss */
#search[show] { width: 100%; height: 100%; position: absolute; left: 0; top: 0; padding: 0 16px; margin-left: 0; }
/* line 72, ../../sass/elements/app-bar.scss */
/* line 87, ../../sass/elements/app-bar.scss */
#search[show] input { padding: 10px; }

/* line 79, ../../sass/elements/app-bar.scss */
/* line 94, ../../sass/elements/app-bar.scss */
input { background-color: inherit; border: none; font-size: 20px; outline: none; padding: 0; color: inherit; -webkit-box-flex: 1; -webkit-flex: 1; -moz-flex: 1; -ms-flex: 1; -o-flex: 1; flex: 1; }

/* line 90, ../../sass/elements/app-bar.scss */
/* line 105, ../../sass/elements/app-bar.scss */
#menu { display: none; }

@media only screen and (max-width: 800px) { /* line 95, ../../sass/elements/app-bar.scss */
@media only screen and (max-width: 800px) { /* line 110, ../../sass/elements/app-bar.scss */
:host { -webkit-box-pack: space-between; -webkit-justify-content: space-between; -moz-justify-content: space-between; -ms-justify-content: space-between; -o-justify-content: space-between; justify-content: space-between; width: 100%; background: initial; }
/* @polyfill :host a */
/* line 102, ../../sass/elements/app-bar.scss */
/* line 117, ../../sass/elements/app-bar.scss */
::content a { display: none; }
/* line 106, ../../sass/elements/app-bar.scss */
/* line 121, ../../sass/elements/app-bar.scss */
polymer-ui-icon { margin: 0; }
/* line 110, ../../sass/elements/app-bar.scss */
/* line 125, ../../sass/elements/app-bar.scss */
#menu { display: inline-block; } }
1 change: 1 addition & 0 deletions discuss.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: resources
navgroup: community
shortname: Community
title: Discussion
---
Expand Down
1 change: 1 addition & 0 deletions docs/elements/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: elements
navgroup: docs
shortname: Elements
#title: Elements

Expand Down
1 change: 1 addition & 0 deletions docs/elements/other.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: elements
navgroup: docs
shortname: Elements
title: Misc elements
---
Expand Down
1 change: 1 addition & 0 deletions docs/elements/polymer-elements.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: elements
navgroup: docs
shortname: Elements
title: Polymer elements
subtitle: Utility elements that do not render UI
Expand Down
1 change: 1 addition & 0 deletions docs/elements/polymer-ui-elements.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: elements
navgroup: docs
shortname: Elements
title: Polymer UI elements
subtitle: Basic UI components
Expand Down
1 change: 1 addition & 0 deletions docs/polymer/databinding.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: core
navgroup: docs
shortname: Docs
title: Data-binding
---
Expand Down
1 change: 1 addition & 0 deletions docs/polymer/expressions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: core
navgroup: docs
shortname: Docs
title: Expressions
---
Expand Down
1 change: 1 addition & 0 deletions docs/polymer/filters.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: core
navgroup: docs
shortname: Docs
title: Filters
---
Expand Down
1 change: 1 addition & 0 deletions docs/polymer/polymer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: core
navgroup: docs
shortname: Docs
title: API reference
---
Expand Down
1 change: 1 addition & 0 deletions docs/polymer/runtime-config.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: core
navgroup: docs
shortname: Docs
title: Runtime configuration
---
Expand Down
1 change: 1 addition & 0 deletions docs/polymer/styling.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: core
navgroup: docs
shortname: Docs
title: Styling reference
---
Expand Down
4 changes: 2 additions & 2 deletions elements/site-banner.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- <link rel="import" href="../components/polymer-flex-layout/polymer-flex-layout.html"> -->
<link rel="import" href="../components/polymer-media-query/polymer-media-query.html">

<polymer-element name="site-banner" attributes="type shortname">
<polymer-element name="site-banner" attributes="shortname">
<template>
<link rel="stylesheet" href="../css/elements/site-banner.css">
<polymer-media-query query="max-width: 581px" queryMatches="{{isPhone}}"></polymer-media-query>
Expand All @@ -17,7 +17,7 @@ <h2>{{shortname}}</h2>
(function() {
Polymer('site-banner', {
shortname: '',
type: 'default',
// type: 'default',
isPhone: false,
isPhoneChanged: function() {
this.parentElement.classList.toggle('mobile', this.isPhone);
Expand Down
1 change: 1 addition & 0 deletions faq.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: resources
navgroup: resources
shortname: Resources
title: FAQ
---
Expand Down
1 change: 1 addition & 0 deletions getting-started.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: start
navgroup: start
shortname: Start
title: Getting started

Expand Down
1 change: 1 addition & 0 deletions getting-the-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: default
type: start
shortname: Start
navgroup: start
title: Getting the code
---

Expand Down
1 change: 1 addition & 0 deletions platform/custom-elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: default
title: Custom Elements
type: platform
navgroup: docs
shortname: Platform
subtitle: polyfill

Expand Down
1 change: 1 addition & 0 deletions platform/html-imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: default
title: HTML Imports
type: platform
navgroup: docs
shortname: Platform
subtitle: polyfill

Expand Down
1 change: 1 addition & 0 deletions platform/mutation-observers.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: default
title: Mutation Observers
type: platform
navgroup: docs
shortname: Platform
subtitle: polyfill

Expand Down
1 change: 1 addition & 0 deletions platform/node_bind.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: default
title: Node.bind()
type: platform
navgroup: docs
shortname: Platform
subtitle: <a href="http://prollyfill.org/" target="_blank">prollyfill</a>

Expand Down
1 change: 1 addition & 0 deletions platform/pointer-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: default
title: Pointer Events
type: platform
navgroup: docs
shortname: Platform
subtitle: polyfill

Expand Down
1 change: 1 addition & 0 deletions platform/shadow-dom.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: default
title: Shadow DOM
type: platform
navgroup: docs
shortname: Platform
subtitle: polyfill

Expand Down
1 change: 1 addition & 0 deletions platform/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: default
title: Template Binding
type: platform
navgroup: docs
shortname: Platform
subtitle: <a href="http://prollyfill.org/" target="_blank">prollyfill</a>

Expand Down
1 change: 1 addition & 0 deletions platform/web-animations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: default
title: Web Animations
type: platform
navgroup: docs
shortname: Platform
subtitle: polyfill

Expand Down
15 changes: 15 additions & 0 deletions sass/elements/app-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@
color: inherit;
}

:ancestor(site-banner[navgroup="start"], site-banner[navgroup="resources"], site-banner[navgroup="community"]) ::content .active,
:ancestor(site-banner[navgroup="start"], site-banner[navgroup="resources"], site-banner[navgroup="community"]) ::content .paper-button:hover {
box-shadow: 0 1px 1px rgba(0, 0, 0, 1) inset, 0 -1px 1px rgba(0, 0, 0, 1) inset, 0 2px 0px rgba(0, 0, 0, 1) inset;
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 40%);
background: linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 40%);
}

/* @polyfill-unscoped-rule site-banner[navgroup="start"] app-bar .active,
site-banner[navgroup="resources"] app-bar .active,
site-banner[navgroup="community"] app-bar .active {
box-shadow: 0 1px 1px rgba(0, 0, 0, 1) inset, 0 -1px 1px rgba(0, 0, 0, 1) inset, 0 2px 0px rgba(0, 0, 0, 1) inset !important;
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 40%) !important;
background: linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 40%) !important;
}*/

:host(.search-on) {
left: 0;
background: inherit;
Expand Down
1 change: 1 addition & 0 deletions tooling-strategy.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
type: resources
navgroup: resources
shortname: Resources
title: Tools & Testing
---
Expand Down

0 comments on commit 7babcfd

Please sign in to comment.