thebookofshaders/header.php

103 lines
4.1 KiB
PHP
Raw Normal View History

2015-07-15 12:12:44 +00:00
<!DOCTYPE html>
<?php
$html_attributes = "";
if ($_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>';
?>
2016-03-16 10:47:28 +00:00
<link href="/favicon.gif" rel="shortcut icon"/>
<meta name="keywords" content="shader,openGL,WebGL,GLSL,book,procedural,generative" />
2016-05-07 19:07:34 +00:00
<meta name="description" content="Gentle step-by-step guide through the abstract and complex universe of Fragment Shaders."/>
2016-03-16 10:47:28 +00:00
2016-05-16 13:11:11 +00:00
<! 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"/>
2016-05-17 17:26:04 +00:00
<meta property="og:image:secure_url" content="https://thebookofshaders.com/thumb.png"/>
2016-05-16 13:11:11 +00:00
<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">
2016-03-16 10:47:28 +00:00
<meta name="twitter:site" content="@bookofshaders">
2016-05-07 19:07:34 +00:00
<meta name="twitter:creator" content="@patriciogv">
2016-03-16 10:47:28 +00:00
<meta name="twitter:title" content="The Book Of Shaders">
<meta name="twitter:domain" content="thebookofshaders.com">
2016-05-16 13:11:11 +00:00
<meta name="twitter:description" content="Gentle step-by-step guide through the abstract and complex universe of Fragment Shaders.">
2016-05-17 17:26:04 +00:00
<meta name="twitter:image" content="https://thebookofshaders.com/thumb.png">
2016-05-16 13:11:11 +00:00
<meta name="twitter:image:width" content="500">
<meta name="twitter:image:height" content="500">
2017-08-19 10:11:58 +00:00
2016-03-16 10:47:28 +00:00
<link href="/favicon.gif" rel="shortcut icon"/>
<!-- Highlight -->
<?php
echo '
2016-03-16 10:47:28 +00:00
<link type="text/css" rel="stylesheet" href="'.$path.'/css/github.css">
<script type="text/javascript" src="'.$path.'/src/highlight.min.js"></script>';
?>
2016-03-16 10:47:28 +00:00
<!-- GlslCanvas -->
<?php
2016-06-07 19:11:11 +00:00
if (file_exists($path."/src/glslCanvas/build/GlslCanvas.js")) {
echo '
2016-06-07 19:11:11 +00:00
<script type="text/javascript" src="'.$path.'/src/glslCanvas/build/GlslCanvas.js"></script>';
} else {
echo '
2016-06-07 19:11:11 +00:00
<script type="text/javascript" src="https://thebookofshaders.com/glslCanvas/GlslCanvas.js"></script>';
}
?>
2016-03-16 10:47:28 +00:00
<!-- GlslEditor -->
<?php
if (file_exists($path."/src/glslEditor/build/glslEditor.js")) {
echo '
2017-08-19 10:11:58 +00:00
<link type="text/css" rel="stylesheet" href="'.$path.'/src/glslEditor/build/glslEditor.css">
2016-03-16 10:47:28 +00:00
<script type="application/javascript" src="'.$path.'/src/glslEditor/build/glslEditor.js"></script>';
} else {
echo '
2017-08-19 10:11:58 +00:00
<link type="text/css" rel="stylesheet" href="https://thebookofshaders.com/glslEditor/glslEditor.css">
2016-05-07 19:07:34 +00:00
<script type="application/javascript" src="https://thebookofshaders.com/glslEditor/glslEditor.js"></script>';
}
?>
2016-04-23 15:57:33 +00:00
<!-- GlslGallery -->
<?php
if (file_exists($path."/src/glslGallery/build/glslGallery.js")) {
echo '
2017-08-19 10:11:58 +00:00
<link type="text/css" rel="stylesheet" href="'.$path.'/src/glslGallery/build/glslGallery.css">
2016-04-23 15:57:33 +00:00
<script type="application/javascript" src="'.$path.'/src/glslGallery/build/glslGallery.js"></script>';
} else {
echo '
2017-08-19 10:11:58 +00:00
<link type="text/css" rel="stylesheet" href="https://thebookofshaders.com/glslGallery/glslGallery.css">
2016-05-07 19:07:34 +00:00
<script type="application/javascript" src="https://thebookofshaders.com/glslGallery/glslGallery.js"></script>';
}
2015-07-15 12:12:44 +00:00
?>
2016-03-04 15:40:21 +00:00
<!-- Main style -->
<?php
echo '
<link type="text/css" rel="stylesheet" href="'.$path.'/css/style.css">';
2016-03-08 12:44:37 +00:00
if ( $language !== '' && file_exists($path.'/css/style'.$language.'.css') ) {
echo '
<!-- Translation style -->
<link type="text/css" rel="stylesheet" href="'.$path.'/css/style'.$language.'.css">';
}
?>
2016-03-08 12:44:37 +00:00
</head>
2017-08-19 10:11:58 +00:00
<body>