Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setze aktuelle Maven Project Version in Footer via Maven Filtering - … #260

Merged
merged 1 commit into from
Mar 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>