forked from IonicaBizau/kindly-license
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.templ.html
82 lines (74 loc) · 3.01 KB
/
index.templ.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>The KINDLY License</title>
<link href='http://fonts.googleapis.com/css?family=Ubuntu+Mono:700&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/2.2.2/octicons.min.css" type="text/css" media="screen" charset="utf-8">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
<script src="https://cdnjs.cloudflare.com/ajax/libs/urljs/1.1.0/url.min.js"></script>
<style>
pre {
font-family: 'Ubuntu Mono', monospace;
font-weight: bold;
margin: 80px auto;
padding: 18px;
border-radius: 4px;
width: 625px;
background-color: white;
color: #333;
box-shadow: 0 0 25px rgba(0, 0, 0, 0.11);
border: 1px solid rgb(236, 236, 236);
}
.footer {
text-align: center;
position: fixed;
left: 0;
right: 0;
bottom: 25px;
font-family: "Open Sans", sans-serif;
font-weight: 400;
color: #333;
}
.footer a {
text-decoration: none;
color: #111;
font-weight: bold;
}
.footer a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<pre id="license">{license}</pre>
<script type="text/javascript">
(function () {
var pre = document.getElementById("license")
, content = pre.innerHTML
, author = Url.queryString("author")
, year = Url.queryString("year")
, thisYear = new Date().getFullYear()
;
if (year && /^(1|2)[0-9][0-9][0-9]$/.test(year)) {
if (year < thisYear) {
year = year + "-" + thisYear;
}
} else {
year = null;
}
if (year) {
content = content.replace("<year>", year);
}
if (author) {
author = author.replace(/</g, "<").replace(/>/g, ">");
content = content.replace("<author>", author);
}
pre.innerHTML = content;
})();
</script>
<div class="footer">
<span class="octicon octicon-pencil"></span> with <span class="octicon octicon-heart"></span> by <a href="https://github.com/IonicaBizau">@IonicaBizau</a> | Contribute on <a href="https://github.com/IonicaBizau/kindly-license"><span class="octicon octicon-octoface"></span> GitHub</a>.
</div>
</body>
</html>