dash-website/_layouts/default.html
Perry Woodin bcabe142a6 Moved base.html login inline
The base could not be included as a snippet because it causes a stack
error due to a conflict with the i18n plugin.
2016-07-14 07:34:04 -04:00

91 lines
2.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html>
<head>
{% assign base = '' %}
{% assign depth = page.url | split: '/' | size | minus: 1 %}
{% if depth == -1 %}{% assign base = '.' %}
{% elsif depth == 1 %}{% assign base = '..' %}
{% elsif depth == 2 %}{% assign base = '../..' %}
{% elsif depth == 3 %}{% assign base = '../../..' %}
{% elsif depth == 4 %}{% assign base = '../../../..' %}{% endif %}
{% if site.lang != "en" %}
{% assign base = base | prepend: '../' %}
{% endif %}
{% capture basenav %}{{ base }}{% if site.lang != "en" %}/{{ site.lang }}{% endif %}{% endcapture %}
<meta charset="UTF-8">
<title>{% if page.title %}{% t page.title %} &mdash; {% endif %}Dash</title>
<meta name="description" content="{% t page.description %}">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<link rel="icon" type="image/png" sizes="16x16" href="{{ base }}/assets/img/favicon/favicon-16x16.png">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" type="text/css" href="{{ base }}/assets/css/style.css">
<!-- JavaScript -->
<script src="//cdn.jsdelivr.net/lodash/4.12.0/lodash.min.js"></script>
<script src="{{ base }}/assets/js/moment.min.js"></script>
<script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</head>
<body>
{{ content }}
<!-- Footer -->
<footer class="content">
{% include footer.html %}
</footer>
<!-- Mobile Nav -->
<div class="overlay" id="overlay">
<a href="/"><img src="{{ base }}/assets/img/logo-white.png" alt="Dash" class="logo"></a>
{% include nav-mobile.html %}
</div>
<script src="{{ base }}/assets/js/full-menu.js"></script>
}
<script>
function windowPopup(url, width, height) {
// Calculate the position of the popup so
// its centered on the screen.
var left = (screen.width / 2) - (width / 2),
top = (screen.height / 2) - (height / 2);
window.open(
url,
"",
"menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=" + width + ",height=" + height + ",top=" + top + ",left=" + left
);
}
//jQuery
$(".js-social-share").on("click", function(e) {
e.preventDefault();
windowPopup($(this).attr("href"), 500, 300);
});
// Vanilla JavaScript
var jsSocialShares = document.querySelectorAll(".js-social-share");
if (jsSocialShares) {
[].forEach.call(jsSocialShares, function(anchor) {
anchor.addEventListener("click", function(e) {
e.preventDefault();
windowPopup(this.href, 500, 300);
});
});
}
</script>
</body>
</html>