Files
MQTT-Explorer/_layouts/default.html
T
2019-04-09 13:17:48 +02:00

127 lines
4.8 KiB
HTML

<!DOCTYPE html>
<html lang="{{ site.lang | default: "en-US" }}">
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}" media="screen" type="text/css">
<link rel="stylesheet" href="{{ '/assets/css/print.css' | relative_url }}" media="print" type="text/css">
<link rel="stylesheet" href="./osx-frame.css">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<![endif]-->
<style>
.inner img {
border-radius: 8px;
}
</style>
{% seo %}
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TRN5K6H');</script>
<!-- End Google Tag Manager -->
<script>
function trackConversion(url) {
const conversions = {
'snap://mqtt-explorer': 'snap',
'https://snapcraft.io/mqtt-explorer': 'snap',
'https://geo.itunes.apple.com/us/app/mqtt-explorer/id1455214828?mt=12&app=apps': 'Mac App Store',
'https://www.microsoft.com/store/apps/9PP8SFM082WD?ocid=badge': 'Microsoft Store',
'https://github.com/thomasnordquist/MQTT-Explorer/releases/download/': 'binary download'
}
const conversion = Object.keys(conversions).find(function(conversionUrlPrefix) { return url.startsWith(conversionUrlPrefix) })
if (conversion) {
ga('send', 'event', 'outbound', 'download', conversions[conversion], {
'transport': 'beacon',
'hitCallback': function(){ document.location = url; }
});
} else {
ga('send', 'event', 'outbound', 'click', url, {
'transport': 'beacon',
'hitCallback': function(){ document.location = url; }
});
}
}
function didLoad() {
if (!Array.prototype.filter || !Array.prototype.find || !String.prototype.startsWith) {
return
}
Object.values(document.getElementsByTagName('a'))
.filter(function(a) { return !a.href.startsWith(a.baseURI)})
.forEach(function(a) { a.onclick = function() { trackConversion(a.href) }})
}
</script>
</head>
<body onload="didLoad()">
<header>
<div class="inner">
<a href="{{ '/' | absolute_url }}">
<h1 style="display: inline">
<img src="./icon.png" style="
height: 1em;
display: inline;
vertical-align: top;
margin-top: -0.04em;
"></img>
{{ site.title | default: site.github.repository_name }}
</h1>
</a>
<h2>{{ site.description | default: site.github.project_tagline }}</h2>
{% if site.github.is_project_page %}
<a href="{{ site.github.repository_url }}" class="button"><small>View project on</small> GitHub</a>
{% endif %}
{% if site.github.is_user_page %}
<a href="{{ site.github.owner_url }}" class="button"><small>Follow me on</small> GitHub</a>
{% endif %}
</div>
</header>
<div id="content-wrapper">
<div class="inner clearfix">
<section id="main-content">
{{ content }}
</section>
<aside id="sidebar">
{% if site.show_downloads %}
<a href="{{ site.github.zip_url }}" class="button">
<small>Download</small>
.zip file
</a>
<a href="{{ site.github.tar_url }}" class="button">
<small>Download</small>
.tar.gz file
</a>
{% endif %}
{% if site.github.is_project_page %}
<h2>Author</h2>
<img src="{{ site.author.picture }}" width="200" />
<h3>{{ site.author.name }}</h3>
<p class="repo-owner"><a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></p>
{% endif %}
</aside>
</div>
</div>
{% if site.google_analytics %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
</body>
</html>