mirror of
https://github.com/seigler/dash-website
synced 2025-07-27 07:16:10 +00:00
(Update) Layout: Spacing Home (#10)
* (Update) Logo-collection: Adjust spacing / add maxheight / use BEM * (Update) Home: Adjust spacing between h1 + slogan / Adjust space between image at the bottom * (Fix) Home: Replace secure icon with correctly retraced one * [Chore] Layout: Whitespace / unused inline javascript * (Update) Home: More Spacing * (Fix) Currency: execute js onload * (Update) Layout: Add class for latest news section
This commit is contained in:
parent
29290b301f
commit
2cde4f02dd
6 changed files with 134 additions and 156 deletions
|
@ -5,33 +5,31 @@
|
|||
<meta charset="UTF-8">
|
||||
<title>{% if page.title %}{% t page.title %} — {% endif %}Dash</title>
|
||||
<meta name="description" content="{% t page.description %}">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
{{ content }}
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="footer">
|
||||
{% 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>
|
||||
|
||||
|
||||
<!-- JavaScript -->
|
||||
<script src="//cdn.jsdelivr.net/lodash/4.12.0/lodash.min.js"></script>
|
||||
<script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
|
||||
|
@ -39,51 +37,17 @@
|
|||
<script src="{{ base }}/assets/js/moment.min.js"></script>
|
||||
<script src="{{ base }}/assets/js/full-menu.js"></script>
|
||||
|
||||
<script>
|
||||
function formatNumber (num) {
|
||||
return num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,")
|
||||
}
|
||||
<script>
|
||||
function formatNumber (num) {
|
||||
return num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,")
|
||||
}
|
||||
|
||||
function formatCurrency (num,decimal) {
|
||||
var _decimal;
|
||||
_decimal = typeof decimal !== "undefined" ? decimal : 2;
|
||||
return num.toFixed(_decimal).replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,")
|
||||
}
|
||||
function formatCurrency (num,decimal) {
|
||||
var _decimal;
|
||||
_decimal = typeof decimal !== "undefined" ? decimal : 2;
|
||||
return parseFloat(num).toFixed(_decimal).replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,")
|
||||
}
|
||||
</script>
|
||||
|
||||
function windowPopup(url, width, height) {
|
||||
// Calculate the position of the popup so
|
||||
// it’s 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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue