[Git][NTPsec/ntpsec][master] 2 commits: Add links in footer to validator.w3c.org
Gary E. Miller
gitlab at mg.gitlab.com
Tue Aug 23 02:06:15 UTC 2016
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
a99e8f55 by Gary E. Miller at 2016-08-22T18:58:17-07:00
Add links in footer to validator.w3c.org
Sadly the html validator is currently broken for https referrer.
- - - - -
38cae6f7 by Gary E. Miller at 2016-08-22T19:05:31-07:00
Only write logo file is not present.
- - - - -
1 changed file:
- ntpstats/ntpviz
Changes:
=====================================
ntpstats/ntpviz
=====================================
--- a/ntpstats/ntpviz
+++ b/ntpstats/ntpviz
@@ -481,8 +481,12 @@ if __name__ == '__main__':
sys.stderr.write("ntpviz: ERROR: %s can't be created.\n" \
% outdir)
raise SystemExit(1)
- with open(os.path.join(outdir, "ntpsec-logo.png"), "w") as wp:
- wp.write(binascii.a2b_base64(ntpsec_logo))
+
+ # if no ntpsec logo, write one.
+ logo_filename = os.path.join(outdir, "ntpsec-logo.png")
+ if not os.path.isfile( logo_filename ):
+ with open( logo_filename, "w" ) as wp:
+ wp.write(binascii.a2b_base64(ntpsec_logo))
index_header = '''\
<!DOCTYPE html>
@@ -508,9 +512,23 @@ if __name__ == '__main__':
<br>
<br>
<br>
+<div style="float:left">
This page autogenerated by <a href="https://docs.ntpsec.org/latest/ntpviz.html">
ntpviz</a>, part of the <a href="https://www.ntpsec.org/">NTPsec project</a>
-<br><br>
+</div>
+<div style="float:left;margin-left:350px;">
+ <a href="https://validator.w3.org/nu/">
+ <img src="https://www.w3.org/html/logo/downloads/HTML5_Logo_32.png"
+ alt="html 5">
+ </a>
+
+ <a href="https://jigsaw.w3.org/css-validator/check/referer">
+ <img style="border:0;width:88px;height:31px"
+ src="https://jigsaw.w3.org/css-validator/images/vcss"
+ alt="Valid CSS!" />
+ </a>
+</div>
+<div style="clear:both;"></div>
</body>
</html>
'''
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/10741671bf55b90dd7739f6f349f03b0b25d958c...38cae6f7b80048ca42da619241fcfc4f6b14a112
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160823/a50843e0/attachment.html>
More information about the vc
mailing list