Skip to content

Commit

Permalink
Merge pull request #3 from JamesRArroyo/simple-banner
Browse files Browse the repository at this point in the history
Simple banner
  • Loading branch information
hipsterreed authored Nov 6, 2017
2 parents 0006feb + 4c06ec0 commit 8346185
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 47 deletions.
73 changes: 73 additions & 0 deletions ab-animated-banner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<link rel="import" href="./bower_components/polymer/polymer-element.html">

<dom-module id="ab-animated-banner">
<template>
<style>

:host {
display: block;
}

.banner-container{
width: 30%;
}

.banner{
background: white;
height: 70px;
font-size: 12px;
color: black;
text-align: left;

}

.banner .innerLeft{
height: 100%;
width: 20%;
float: left;
background: rgba(253,202,0,1);
}

.innerLeft h4{
font-size: 20px;
text-align: center;
}



</style>

<div class="banner-container">
<div class="banner">
<div class="innerLeft">
<h4>[[title]]</h4>
</div>
</div>
</div>

</template>

<script>
/**
* @customElement
* @polymer
*/
class AbAnimatedBanner extends Polymer.Element {
static get is() { return 'ab-animated-banner'; }
static get properties() {
return {
title: {
type: String,
value: 'Title'
},
dataSet: {
type: Array,
value: ['Jimmy Arroyo', 'John Doe', 'Bob Smith']
}
};
}
}

window.customElements.define(AbAnimatedBanner.is, AbAnimatedBanner);
</script>
</dom-module>
4 changes: 3 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
"url": "git://github.com/JamesRArroyo/ab-animated-banner"
},
"license": "MIT",
"main": "index.html",
"main": "ab-animated-banner.html",
"dependencies": {
"polymer": "Polymer/polymer#^2.0.0"
},
"devDependencies": {
"iron-component-page": "PolymerElements/iron-component-page#1 - 2",
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#1 - 2",
"web-component-tester": "Polymer/web-component-tester#^6.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0"
}
Expand Down
16 changes: 16 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>

<head>
<title>An animated banner</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, minimal-ui">
<script src="../bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../ab-animated-banner.html">
</head>

<body style="background-color: #efefef">
<ab-animated-banner></ab-animated-banner>
</body>

</html>
27 changes: 13 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<html>
<head>

<title>ab-animated-banner</title>
<meta name="description" content="ab-animated-banner description">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">

<!-- See https://goo.gl/OOhYW5 -->
<link rel="manifest" href="/manifest.json">
<title>ab-animated-banner</title>

<script src="/bower_components/webcomponentsjs/webcomponents-loader.js"></script>
<script src="./bower_components/webcomponentsjs/webcomponents-lite.js"></script>

<link rel="import" href="/src/ab-animated-banner-app/ab-animated-banner-app.html">
</head>
<body>
<ab-animated-banner-app></ab-animated-banner-app>
</body>
<link rel="import" href="./bower_components/polymer/polymer.html">
<link rel="import" href="./bower_components/iron-component-page/iron-component-page.html">

</head>
<body>
<iron-component-page></iron-component-page>
</body>
</html>
32 changes: 0 additions & 32 deletions src/ab-animated-banner-app/ab-animated-banner-app.html

This file was deleted.

0 comments on commit 8346185

Please sign in to comment.