A simple, zero dependency component that will keep a simple copyright notice up to date (current year).
For example, it can make sure that the year part of "Copyright © Awesome Company 2016" will always be the current year.
Because this is such a simple component, it has no other dependencies.
Install the component with Bower: - bower install crupu --save
Add the WebJar dependency to your pom.xml
file:
<dependency>
<groupId>org.webjars.bower</groupId>
<artifactId>crupu</artifactId>
<version>0.0.3</version>
</dependency>
TODO
<script src="bower_components/crupu/src/crupu.js"></script>
Include in your view with an appropriately sourced script
tag.
For example, using ThymeLeaf:
<script th:src="@{/webjars/crupu/0.0.3/src/crupu.js}"></script>
TODO
TODO
Mark the elements you want to keep up to date with the right css classes:
- crupu-pre : the preamble, in other words "Copyright ©"
- crupu-year: the full year, for example 2016
Please take a look at sample.html
for examples.
But, in short:
Copyright & Awesome Factory x100 <span class="crupu-year">this will be replaced</span>
Yes, it is horrible.
No, I'm not changing it.
Naming things are hard enough without 2nd guessing and constantly angsting about it.
Because everybody knows javascript. It is probably the only REAL, PRACTICAL cross platform language around today.
It allows me to provide the same functionality to Java, .Net and whatever else you want to use in your backend.
BTW: I still dislike JavaScript. Just saying.