@haxtheweb/haxcms-nodejs
Version:
HAXcms single and multisite nodejs server, api, and administration
61 lines (57 loc) • 2.4 kB
JavaScript
/**
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
import"../polymer/polymer-legacy.js";import"../iron-location/iron-location.js";import"../font-roboto/roboto.js";import{Polymer as o}from"../polymer/lib/legacy/polymer-fn.js";import{html as t}from"../polymer/lib/utils/html-tag.js";o({_template:t`
<style>
:host {
margin: 0px;
padding: 15px 35px;
border-bottom: 2px solid gray;
height: 1.5em;
display: none;
overflow-x: auto;
overflow-y: hidden;
background-color: white;
@apply --url-bar;
}
:host([in-iframe]) {
/* This element only wants to be displayed if it's in an iframe. */
display: block;
}
label {
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased;
/* for backwards compat */
@apply --paper-font-common-base;
display: inline-block;
padding-right: 25px;
}
span {
font-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace;
-webkit-font-smoothing: antialiased;
/* for backwards compat */
@apply --paper-font-common-code;
white-space: pre;
}
.layout.horizontal {
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-ms-flex-direction: row;
-webkit-flex-direction: row;
flex-direction: row;
}
</style>
<iron-location path="{{path}}" query="{{query}}" hash="{{hash}}">
</iron-location>
<div class="layout horizontal">
<label>URL</label><span>{{url}}</span>
</div>
`,is:"url-bar",properties:{url:{computed:"__computeUrl(path, query, hash)",type:String},inIframe:{value:function(){return window.top!==window},reflectToAttribute:!0,type:Boolean},path:{type:String},query:{type:String},hash:{type:String}},__computeUrl:function(o,t,e){var i=o;return t&&(i+="?"+t),e&&(i+="#"+e),i}});