Skip to content

Commit

Permalink
#5 js
Browse files Browse the repository at this point in the history
  • Loading branch information
Yegor Bugayenko committed Feb 24, 2016
1 parent b7ad5a4 commit 030dbdc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main/java/io/wring/tk/RsPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ private static Response make(final String xsl, final Request req,
new XeGithubLink(req, Manifests.read("Wring-GithubId")),
new XeLogoutLink(req),
new XeLink("pipes", "/pipes"),
new XeLink("favicon", "/favicon"),
new XeAppend(
"version",
new XeAppend("name", Manifests.read("Wring-Version")),
Expand Down
16 changes: 15 additions & 1 deletion src/main/xsl/layout.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,21 @@
<link rel="shortcut icon" href="/images/logo.png"/>
</xsl:if>
<xsl:if test="identity">
<link rel="shortcut icon" type="image/gif" href="/favicon"/>
<link id='favicon' rel="shortcut icon" type="image/png"
data-origin="{links/link[@rel='favicon']/@href}"
href="{links/link[@rel='favicon']/@href}?{@date}{@sla}"/>
<script type="text/javascript">
setInterval(
function() {
var link = document.getElementById('favicon');
link.setAttribute(
'href',
link.getAttribute('data-origin') + '?' + new Date().getTime()
);
},
60 * 1000
);
</script>
</xsl:if>
<link rel="stylesheet" href="http://yegor256.github.io/tacit/tacit.min.css"/>
<link rel="stylesheet" href="/css/main.css"/>
Expand Down

0 comments on commit 030dbdc

Please sign in to comment.