mirror of
https://github.com/Polymer/polymer-starter-kit.git
synced 2025-02-25 18:55:22 -06:00
Indent html content
This commit is contained in:
124
src/my-app.js
124
src/my-app.js
@@ -34,81 +34,81 @@ setRootPath(Polymer.rootPath);
|
||||
class MyApp extends PolymerElement {
|
||||
static get template() {
|
||||
return html`
|
||||
<style>
|
||||
:host {
|
||||
--app-primary-color: #4285f4;
|
||||
--app-secondary-color: black;
|
||||
<style>
|
||||
:host {
|
||||
--app-primary-color: #4285f4;
|
||||
--app-secondary-color: black;
|
||||
|
||||
display: block;
|
||||
}
|
||||
display: block;
|
||||
}
|
||||
|
||||
app-drawer-layout:not([narrow]) [drawer-toggle] {
|
||||
display: none;
|
||||
}
|
||||
app-drawer-layout:not([narrow]) [drawer-toggle] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
app-header {
|
||||
color: #fff;
|
||||
background-color: var(--app-primary-color);
|
||||
}
|
||||
app-header {
|
||||
color: #fff;
|
||||
background-color: var(--app-primary-color);
|
||||
}
|
||||
|
||||
app-header paper-icon-button {
|
||||
--paper-icon-button-ink-color: white;
|
||||
}
|
||||
app-header paper-icon-button {
|
||||
--paper-icon-button-ink-color: white;
|
||||
}
|
||||
|
||||
.drawer-list {
|
||||
margin: 0 20px;
|
||||
}
|
||||
.drawer-list {
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.drawer-list a {
|
||||
display: block;
|
||||
padding: 0 16px;
|
||||
text-decoration: none;
|
||||
color: var(--app-secondary-color);
|
||||
line-height: 40px;
|
||||
}
|
||||
.drawer-list a {
|
||||
display: block;
|
||||
padding: 0 16px;
|
||||
text-decoration: none;
|
||||
color: var(--app-secondary-color);
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.drawer-list a.iron-selected {
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
.drawer-list a.iron-selected {
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
|
||||
<app-location route="{{route}}" url-space-regex="^[[rootPath]]">
|
||||
</app-location>
|
||||
<app-location route="{{route}}" url-space-regex="^[[rootPath]]">
|
||||
</app-location>
|
||||
|
||||
<app-route route="{{route}}" pattern="[[rootPath]]:page" data="{{routeData}}" tail="{{subroute}}">
|
||||
</app-route>
|
||||
<app-route route="{{route}}" pattern="[[rootPath]]:page" data="{{routeData}}" tail="{{subroute}}">
|
||||
</app-route>
|
||||
|
||||
<app-drawer-layout fullbleed="" narrow="{{narrow}}">
|
||||
<!-- Drawer content -->
|
||||
<app-drawer id="drawer" slot="drawer" swipe-open="[[narrow]]">
|
||||
<app-toolbar>Menu</app-toolbar>
|
||||
<iron-selector selected="[[page]]" attr-for-selected="name" class="drawer-list" role="navigation">
|
||||
<a name="view1" href="[[rootPath]]view1">View One</a>
|
||||
<a name="view2" href="[[rootPath]]view2">View Two</a>
|
||||
<a name="view3" href="[[rootPath]]view3">View Three</a>
|
||||
</iron-selector>
|
||||
</app-drawer>
|
||||
<app-drawer-layout fullbleed="" narrow="{{narrow}}">
|
||||
<!-- Drawer content -->
|
||||
<app-drawer id="drawer" slot="drawer" swipe-open="[[narrow]]">
|
||||
<app-toolbar>Menu</app-toolbar>
|
||||
<iron-selector selected="[[page]]" attr-for-selected="name" class="drawer-list" role="navigation">
|
||||
<a name="view1" href="[[rootPath]]view1">View One</a>
|
||||
<a name="view2" href="[[rootPath]]view2">View Two</a>
|
||||
<a name="view3" href="[[rootPath]]view3">View Three</a>
|
||||
</iron-selector>
|
||||
</app-drawer>
|
||||
|
||||
<!-- Main content -->
|
||||
<app-header-layout has-scrolling-region="">
|
||||
<!-- Main content -->
|
||||
<app-header-layout has-scrolling-region="">
|
||||
|
||||
<app-header slot="header" condenses="" reveals="" effects="waterfall">
|
||||
<app-toolbar>
|
||||
<paper-icon-button icon="my-icons:menu" drawer-toggle=""></paper-icon-button>
|
||||
<div main-title="">My App</div>
|
||||
</app-toolbar>
|
||||
</app-header>
|
||||
<app-header slot="header" condenses="" reveals="" effects="waterfall">
|
||||
<app-toolbar>
|
||||
<paper-icon-button icon="my-icons:menu" drawer-toggle=""></paper-icon-button>
|
||||
<div main-title="">My App</div>
|
||||
</app-toolbar>
|
||||
</app-header>
|
||||
|
||||
<iron-pages selected="[[page]]" attr-for-selected="name" role="main">
|
||||
<my-view1 name="view1"></my-view1>
|
||||
<my-view2 name="view2"></my-view2>
|
||||
<my-view3 name="view3"></my-view3>
|
||||
<my-view404 name="view404"></my-view404>
|
||||
</iron-pages>
|
||||
</app-header-layout>
|
||||
</app-drawer-layout>
|
||||
`;
|
||||
<iron-pages selected="[[page]]" attr-for-selected="name" role="main">
|
||||
<my-view1 name="view1"></my-view1>
|
||||
<my-view2 name="view2"></my-view2>
|
||||
<my-view3 name="view3"></my-view3>
|
||||
<my-view404 name="view404"></my-view404>
|
||||
</iron-pages>
|
||||
</app-header-layout>
|
||||
</app-drawer-layout>
|
||||
`;
|
||||
}
|
||||
|
||||
static get is() { return 'my-app'; }
|
||||
|
||||
@@ -14,21 +14,21 @@ import './shared-styles.js';
|
||||
class MyView1 extends PolymerElement {
|
||||
static get template() {
|
||||
return html`
|
||||
<style include="shared-styles">
|
||||
:host {
|
||||
display: block;
|
||||
<style include="shared-styles">
|
||||
:host {
|
||||
display: block;
|
||||
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="card">
|
||||
<div class="circle">1</div>
|
||||
<h1>View One</h1>
|
||||
<p>Ut labores minimum atomorum pro. Laudem tibique ut has.</p>
|
||||
<p>Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea.Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea.Cu mei vide viris gloriatur, at populo eripuit sit.</p>
|
||||
</div>
|
||||
`;
|
||||
<div class="card">
|
||||
<div class="circle">1</div>
|
||||
<h1>View One</h1>
|
||||
<p>Ut labores minimum atomorum pro. Laudem tibique ut has.</p>
|
||||
<p>Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea.Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea.Cu mei vide viris gloriatur, at populo eripuit sit.</p>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
static get is() { return 'my-view1'; }
|
||||
|
||||
@@ -14,21 +14,21 @@ import './shared-styles.js';
|
||||
class MyView2 extends PolymerElement {
|
||||
static get template() {
|
||||
return html`
|
||||
<style include="shared-styles">
|
||||
:host {
|
||||
display: block;
|
||||
<style include="shared-styles">
|
||||
:host {
|
||||
display: block;
|
||||
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="card">
|
||||
<div class="circle">2</div>
|
||||
<h1>View Two</h1>
|
||||
<p>Ea duis bonorum nec, falli paulo aliquid ei eum.</p>
|
||||
<p>Id nam odio natum malorum, tibique copiosae expetenda mel ea.Detracto suavitate repudiandae no eum. Id adhuc minim soluta nam.Id nam odio natum malorum, tibique copiosae expetenda mel ea.</p>
|
||||
</div>
|
||||
`;
|
||||
<div class="card">
|
||||
<div class="circle">2</div>
|
||||
<h1>View Two</h1>
|
||||
<p>Ea duis bonorum nec, falli paulo aliquid ei eum.</p>
|
||||
<p>Id nam odio natum malorum, tibique copiosae expetenda mel ea.Detracto suavitate repudiandae no eum. Id adhuc minim soluta nam.Id nam odio natum malorum, tibique copiosae expetenda mel ea.</p>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
static get is() { return 'my-view2'; }
|
||||
|
||||
@@ -14,21 +14,21 @@ import './shared-styles.js';
|
||||
class MyView3 extends PolymerElement {
|
||||
static get template() {
|
||||
return html`
|
||||
<style include="shared-styles">
|
||||
:host {
|
||||
display: block;
|
||||
<style include="shared-styles">
|
||||
:host {
|
||||
display: block;
|
||||
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="card">
|
||||
<div class="circle">3</div>
|
||||
<h1>View Three</h1>
|
||||
<p>Modus commodo minimum eum te, vero utinam assueverit per eu.</p>
|
||||
<p>Ea duis bonorum nec, falli paulo aliquid ei eum.Has at minim mucius aliquam, est id tempor laoreet.Pro saepe pertinax ei, ad pri animal labores suscipiantur.</p>
|
||||
</div>
|
||||
`;
|
||||
<div class="card">
|
||||
<div class="circle">3</div>
|
||||
<h1>View Three</h1>
|
||||
<p>Modus commodo minimum eum te, vero utinam assueverit per eu.</p>
|
||||
<p>Ea duis bonorum nec, falli paulo aliquid ei eum.Has at minim mucius aliquam, est id tempor laoreet.Pro saepe pertinax ei, ad pri animal labores suscipiantur.</p>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
static get is() { return 'my-view3'; }
|
||||
|
||||
@@ -13,16 +13,16 @@ import { PolymerElement, html } from '@polymer/polymer/polymer-element.js';
|
||||
class MyView404 extends PolymerElement {
|
||||
static get template() {
|
||||
return html`
|
||||
<style>
|
||||
:host {
|
||||
display: block;
|
||||
<style>
|
||||
:host {
|
||||
display: block;
|
||||
|
||||
padding: 10px 20px;
|
||||
}
|
||||
</style>
|
||||
padding: 10px 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Oops you hit a 404. <a href="[[rootPath]]">Head back to home.</a>
|
||||
`;
|
||||
Oops you hit a 404. <a href="[[rootPath]]">Head back to home.</a>
|
||||
`;
|
||||
}
|
||||
|
||||
static get is() { return 'my-view404'; }
|
||||
|
||||
Reference in New Issue
Block a user