Skip to content

Commit

Permalink
Merge pull request #260 from eidottermihi/_#255
Browse files Browse the repository at this point in the history
Setze aktuelle Maven Project Version in Footer via Maven Filtering - …
  • Loading branch information
xdoo authored Mar 15, 2018
2 parents a252409 + ffa1794 commit 899c4b2
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
<resource>
<directory>build/es5-bundled</directory>
<targetPath>static</targetPath>
<filtering>true</filtering>
</resource>
</resources>

Expand Down
4 changes: 4 additions & 0 deletions src/animad-app.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

<!-- GENERATOR pattern: [DOMAINNAME]-icons.html -->
<link rel="import" href="animad-icons.html">
<!-- GENERATOR pattern: [DOMAINNAME]-footer.html -->
<link rel="import" href="animad-footer.html">

<!-- Polyfill for dropdowns -->
<link rel="import" href="../bower_components/neon-animation/web-animations.html">
Expand Down Expand Up @@ -253,6 +255,8 @@
<animad-view404 name="view404"></animad-view404>
</iron-pages>

<animad-footer/>

</app-drawer-layout>

</app-header-layout>
Expand Down
44 changes: 44 additions & 0 deletions src/animad-footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<link rel="import" href="../bower_components/polymer/polymer-element.html">

<link rel="import" href="shared-styles.html">

<!-- GENERATOR pattern: [DOMAINNAME]-footer -->
<dom-module id="animad-footer">
<template>
<style include="shared-styles">
:host {
display: block;
padding: 10px;
}
footer {
text-align: center;
font-size: 12px;
}
</style>

<footer>
<b>Animad App</b> - Version <span id="animad-footer-version">[[_version]]</span>
</footer>

</template>

<script>
// GENERATOR pattern (camel case): [DOMAINNAME]Footer
class AnimadFooter extends Polymer.Element {
// GENERATOR pattern: [DOMAINNAME]-footer
static get is() { return 'animad-footer'; }
static get properties() {
return {
_version: {
type: String,
// will be filtered by Maven
value: "@project.version@"
}
}
}
}

// GENERATOR pattern (camel case): [DOMAINNAME]Footer
window.customElements.define(AnimadFooter.is, AnimadFooter);
</script>
</dom-module>

0 comments on commit 899c4b2

Please sign in to comment.