-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.hbs
83 lines (67 loc) · 3.3 KB
/
default.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{meta_title}}</title>
{{ghost_head}}
<link rel="shortcut icon" href="{{asset "/images/favicon.ico"}}">
<link rel="apple-touch-icon" sizes="57x57" href="{{asset "/images/apple-icon-57x57.png"}}">
<link rel="apple-touch-icon" sizes="72x72" href="{{asset "/images/apple-icon-72x72.png"}}">
<link rel="apple-touch-icon" sizes="114x114" href="{{asset "/images/apple-icon-114x114.png"}}">
<link rel="apple-touch-icon" sizes="144x144" href="{{asset "/images/apple-icon-144x144.png"}}">
<meta name="description" content="{{meta_description}}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en">
<link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.grey-pink.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="{{asset "css/main.css"}}">
</head>
<body class="{{body_class}}">
{{{body}}} {{ghost_foot}}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="{{asset "js/script.js"}}"></script>
<script defer src="https://code.getmdl.io/1.1.3/material.min.js"></script>
<script async defer src="//assets.pinterest.com/js/pinit.js"></script>
<script type="text/javascript">
// including special pages in your home.hbs file or in every file,
// where the div with the corresponding class exists
var embedPage = function(ele, pageUrl) {
ele.load(pageUrl, function(response, status, xhr) {
if (status == "error") {
var msg = "Sorry but there was an error: ";
$(this).html(msg + xhr.status + " " + xhr.statusText);
}
});
};
embedPage($('div.place4welcome'), '/welcome');
// you can add more elements here. But be shure,
// to have also an own page hbs file like 'page-contact.hbs' for a contact page.
// Otherwise it will load the page.hbs file with headers a.s.o again.
// In this case, we will have an endless loop. OMG! So, be careful.
//
// calculate the image height in the portfolio cards
//
var goldenCutRatio = 1.618;
$(window).on('load', function() {
var cardWidth = $('div.portfolio-card').width();
var cardHeight = cardWidth / goldenCutRatio;
if(cardHeight <= '200') cardHeight = 200;
$('div.mdl-card__media').height(cardHeight);
$('div.mdl-card__title').css({
'margin-top': '-' + cardHeight + 'px',
'height': cardHeight
});
});
$(window).on('resize', function() {
var cardWidth = $('div.portfolio-card').width();
var cardHeight = cardWidth / goldenCutRatio;
if(cardHeight <= '200') cardHeight = 200;
$('div.mdl-card__media').height(cardHeight);
$('div.mdl-card__title').css({
'margin-top': '-' + cardHeight + 'px',
'height': cardHeight
});
});
</script>
</body>
</html>