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>
</div> </div>
{{ partial "footer" . }} {{ partial "footer" . }}
{{ partial "footer_js" . }}
</body> </body>
</html> </html>

View File

@ -5,7 +5,7 @@
&copy; {{ now.Format "2006" }} <a href="https://git.paulbsd.com/paulbsd">paulbsd</a>. <br> &copy; {{ now.Format "2006" }} <a href="https://git.paulbsd.com/paulbsd">paulbsd</a>. <br>
{{ with .Site.Params.copyright }}{{ . | markdownify}}{{ end }} {{ with .Site.Params.copyright }}{{ . | markdownify}}{{ end }}
</footer> </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>
</div> </div>
</footer> </footer>

View File

@ -1,12 +1,15 @@
{{ template "_internal/google_analytics.html" . }} {{ 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 }}js/main.js">
<script src="{{ .Site.BaseURL }}fancybox/jquery.fancybox.pack.js"></script> </script>
<script src="{{ .Site.BaseURL }}js/script.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.8.0/highlight.min.js"></script> </script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.8.0/highlight.min.js">
</script>
<script> <script>
hljs.initHighlightingOnLoad(); hljs.initHighlightingOnLoad();
</script> </script>
<!--
{{ "<!-- MathJax -->" | safeHTML }} {{ "<!-- MathJax -->" | safeHTML }}
<script type="text/x-mathjax-config"> <script type="text/x-mathjax-config">
MathJax.Hub.Config({ MathJax.Hub.Config({
@ -14,7 +17,9 @@
inlineMath: [['$','$'], ['\\(','\\)']]} inlineMath: [['$','$'], ['\\(','\\)']]}
}); });
</script> </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://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.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/d3/d3.min.js"></script>
<script src="{{ .Site.BaseURL }}bower_components/cal-heatmap/cal-heatmap.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/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>hljs.initHighlightingOnLoad();</script>
<script type="text/x-mathjax-config"> <script type="text/x-mathjax-config">
MathJax.Hub.Config({ MathJax.Hub.Config({
@ -24,7 +26,6 @@
inlineMath: [['$','$'], ['\\(','\\)']]} inlineMath: [['$','$'], ['\\(','\\)']]}
}); });
</script> </script>
<script src="{{ .Site.BaseURL }}js/main.js"></script>
<link rel="icon" href="{{ .Site.BaseURL }}favicon.ico" /> <link rel="icon" href="{{ .Site.BaseURL }}favicon.ico" />
<link rel="apple-touch-icon" href="{{ .Site.BaseURL }}apple-touch-icon.png" /> <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/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/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/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/style.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/mobile.css" /> <link rel="stylesheet" href="{{ .Site.BaseURL }}css/mobile.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}bower_components/cal-heatmap/cal-heatmap.css" />
</head> </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 // dip service
function main() { var dip = new Vue({
var jqxhr = el: '#dip',
$.ajax({
type: "GET", data () {
url: "https://ip.paulbsd.com", return {
headers: { title: "Public IP Address Service",
'Access-Control-Allow-Origin': '*', dipjson: {"ip": null, "hostname": null, "city": null, "country": null},
'Accept': 'application/json', autorefresh: false,
interval: null,
}
}, },
dataType: 'json',
}).done(function(data) {
var dip = $('#dip');
dip[0].text = data.ip;
});
return jqxhr;
}
function transformIPInfo(data) { mounted () {
if (data.hostname != '') { this.updateIP();
return data.ip + '/' + data.hostname; this.runTimer();
} },
else {
return data.ip;
}
}
$(document).ready(function() { methods: {
main(); 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
}); });
},
runTimer: function () {
if (this.autorefresh) {
this.interval = setInterval(this.updateIP,10000);
}
}
}
}
);