updated theme

This commit is contained in:
Paul 2020-03-11 16:58:12 +01:00
parent a74162777b
commit 97cfe7d7da
8 changed files with 60 additions and 36 deletions

View File

@ -13,5 +13,6 @@
</div>
</div>
{{ partial "footer" . }}
{{ partial "footer_js" . }}
</body>
</html>

View File

@ -5,7 +5,7 @@
&copy; {{ now.Format "2006" }} <a href="https://git.paulbsd.com/paulbsd">paulbsd</a>. <br>
{{ with .Site.Params.copyright }}{{ . | markdownify}}{{ end }}
</footer>
<footer id="footer-right">Your IP address : <a id="dip"></a></footer>
<footer id="footer-right">Your IP address : <a id="dip">{{ "{{" }} dipjson.ip {{ "}}" }}/{{ "{{" }} dipjson.hostname {{ "}}" }}</a></footer>
</div>
</div>
</footer>

View File

@ -1,12 +1,15 @@
{{ template "_internal/google_analytics.html" . }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="{{ .Site.BaseURL }}fancybox/jquery.fancybox.pack.js"></script>
<script src="{{ .Site.BaseURL }}js/script.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.8.0/highlight.min.js"></script>
<script src="{{ .Site.BaseURL }}js/main.js">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.8.0/highlight.min.js">
</script>
<script>
hljs.initHighlightingOnLoad();
</script>
<!--
{{ "<!-- MathJax -->" | safeHTML }}
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
@ -14,9 +17,11 @@
inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
-->
<!--
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
-->
<script type="text/javascript" src="https://raw.githubusercontent.com/jeresig/jquery.hotkeys/master/jquery.hotkeys.js">
</script>
<script type="text/javascript" src="https://raw.githubusercontent.com/jeresig/jquery.hotkeys/master/jquery.hotkeys.js">
</script>

View File

@ -17,6 +17,8 @@
<script src="{{ .Site.BaseURL }}bower_components/d3/d3.min.js"></script>
<script src="{{ .Site.BaseURL }}bower_components/cal-heatmap/cal-heatmap.min.js"></script>
<script src="{{ .Site.BaseURL }}bower_components/highlightjs/highlight.pack.min.js"></script>
<script src="{{ .Site.BaseURL }}bower_components/vue/vue.min.js"></script>
<script src="{{ .Site.BaseURL }}bower_components/axios/axios.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
@ -24,7 +26,6 @@
inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<script src="{{ .Site.BaseURL }}js/main.js"></script>
<link rel="icon" href="{{ .Site.BaseURL }}favicon.ico" />
<link rel="apple-touch-icon" href="{{ .Site.BaseURL }}apple-touch-icon.png" />
@ -35,7 +36,7 @@
<link rel="stylesheet" href="{{ .Site.BaseURL }}bower_components/createjs/createjs.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}bower_components/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}bower_components/icomoon/css/icomoon.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}bower_components/cal-heatmap/cal-heatmap.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/style.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/mobile.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}bower_components/cal-heatmap/cal-heatmap.css" />
</head>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,31 +1,38 @@
// dip service
function main() {
var jqxhr =
$.ajax({
type: "GET",
url: "https://ip.paulbsd.com",
headers: {
'Access-Control-Allow-Origin': '*',
'Accept': 'application/json',
var dip = new Vue({
el: '#dip',
data () {
return {
title: "Public IP Address Service",
dipjson: {"ip": null, "hostname": null, "city": null, "country": null},
autorefresh: false,
interval: null,
}
},
dataType: 'json',
}).done(function(data) {
var dip = $('#dip');
dip[0].text = data.ip;
mounted () {
this.updateIP();
this.runTimer();
},
methods: {
updateIP: function () {
axios.get("https://ip.paulbsd.com/json")
.then(response => {
this.dipjson = response.data;
})
.catch(err => {
// Manage the state of the application if the request
// has failed
});
return jqxhr;
}
function transformIPInfo(data) {
if (data.hostname != '') {
return data.ip + '/' + data.hostname;
},
runTimer: function () {
if (this.autorefresh) {
this.interval = setInterval(this.updateIP,10000);
}
}
else {
return data.ip;
}
}
$(document).ready(function() {
main();
});
);