-
-
Notifications
You must be signed in to change notification settings - Fork 690
/
header.php
129 lines (113 loc) · 5.06 KB
/
header.php
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html>
<?php
$html_attributes = "";
if (!empty($_GET['lan']) && $_GET['lan'] == "fa") {
$html_attributes = 'dir="rtl" lang="fa"';
}
echo '
<html '.$html_attributes.'>
<head>
<meta charset="utf-8">
<title>The Book of Shaders'.$subtitle.'</title>';
?>
<link href="/favicon.gif" rel="shortcut icon"/>
<meta name="keywords" content="shader,openGL,WebGL,GLSL,book,procedural,generative" />
<meta name="description" content="Gentle step-by-step guide through the abstract and complex universe of Fragment Shaders."/>
<!— Open Graph data —>
<meta property="og:type" content="article"/>
<meta property="og:title" content="The Book of Shaders"/>
<meta property="og:site_name" content="The Book of Shaders"/>
<meta property="og:description" content="Gentle step-by-step guide through the abstract and complex universe of Fragment Shaders."/>
<meta property="og:image" content="http://thebookofshaders.com/thumb.png"/>
<meta property="og:image:secure_url" content="https://thebookofshaders.com/thumb.png"/>
<meta property="og:image:type" content="image/png"/>
<meta property="og:image:width" content="500" />
<meta property="og:image:height" content="500" />
<!— Twitter Card—>
<meta name="twitter:card" content="image">
<meta name="twitter:site" content="@bookofshaders">
<meta name="twitter:creator" content="@patriciogv">
<meta name="twitter:title" content="The Book Of Shaders">
<meta name="twitter:domain" content="thebookofshaders.com">
<meta name="twitter:description" content="Gentle step-by-step guide through the abstract and complex universe of Fragment Shaders.">
<meta name="twitter:image" content="https://thebookofshaders.com/thumb.png">
<meta name="twitter:image:width" content="500">
<meta name="twitter:image:height" content="500">
<link href="/favicon.gif" rel="shortcut icon"/>
<!-- Highlight -->
<?php
echo '
<link type="text/css" rel="stylesheet" href="'.$path.'/css/github.css">
<script type="text/javascript" src="'.$path.'/src/highlight.min.js"></script>';
?>
<!-- GlslCanvas -->
<?php
if (file_exists($path."/src/glslCanvas/build/GlslCanvas.js")) {
echo '
<script type="text/javascript" src="'.$path.'/src/glslCanvas/build/GlslCanvas.js"></script>';
} else {
echo '
<script type="text/javascript" src="https://thebookofshaders.com/glslCanvas/GlslCanvas.js"></script>';
}
?>
<!-- GlslEditor -->
<?php
if (file_exists($path."/src/glslEditor/build/glslEditor.js")) {
echo '
<link type="text/css" rel="stylesheet" href="'.$path.'/src/glslEditor/build/glslEditor.css">
<script type="application/javascript" src="'.$path.'/src/glslEditor/build/glslEditor.js"></script>';
} else {
echo '
<link type="text/css" rel="stylesheet" href="https://thebookofshaders.com/glslEditor/glslEditor.css">
<script type="application/javascript" src="https://thebookofshaders.com/glslEditor/glslEditor.js"></script>';
}
?>
<!-- GlslGallery -->
<?php
if (file_exists($path."/src/glslGallery/build/glslGallery.js")) {
echo '
<link type="text/css" rel="stylesheet" href="'.$path.'/src/glslGallery/build/glslGallery.css">
<script type="application/javascript" src="'.$path.'/src/glslGallery/build/glslGallery.js"></script>';
} else {
echo '
<link type="text/css" rel="stylesheet" href="https://thebookofshaders.com/glslGallery/glslGallery.css">
<script type="application/javascript" src="https://thebookofshaders.com/glslGallery/glslGallery.js"></script>';
}
?>
<!-- Main style -->
<?php
echo '
<link type="text/css" rel="stylesheet" href="'.$path.'/css/style.css">';
if ( $language !== '' && file_exists($path.'/css/style'.$language.'.css') ) {
echo '
<!-- Translation style -->
<link type="text/css" rel="stylesheet" href="'.$path.'/css/style'.$language.'.css">';
}
?>
<!-- Flowdesk Newsletter -->
<?php
echo '
<script>
(function(w, d, t, h, s, n) {
w.FlodeskObject = n;
var fn = function() {
(w[n].q = w[n].q || []).push(arguments);
};
w[n] = w[n] || fn;
var f = d.getElementsByTagName(t)[0];
var v = "?v=" + Math.floor(new Date().getTime() / (120 * 1000)) * 60;
var sm = d.createElement(t);
sm.async = true;
sm.type = "module";
sm.src = h + s + ".mjs" + v;
f.parentNode.insertBefore(sm, f);
var sn = d.createElement(t);
sn.async = true;
sn.noModule = true;
sn.src = h + s + ".js" + v;
f.parentNode.insertBefore(sn, f);
})(window, document, "script", "https://assets.flodesk.com", "/universal", "fd");
</script>'
?>
</head>
<body>