Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created config file as well as header and footer includes
- Loading branch information
1 parent
31c5c1b
commit 8d664bd
Showing
5 changed files
with
77 additions
and
46 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
$config = new stdClass; | ||
|
||
$config->env = 'dev'; | ||
|
||
// Analytics | ||
$config->ga = 'UA-XXXXXX-X'; | ||
|
||
// SEO and namimg | ||
$config->site_name = "Your New Site"; | ||
$config->site_desc = ""; | ||
$config->site_keywords = ""; | ||
$config->author = ""; | ||
$config->current_url = "http://" . $_SERVER["SERVER_NAME"]. $_SERVER["REQUEST_URI"]; | ||
|
||
// Directory helpers | ||
$config->site_url = "http://" . $_SERVER['HTTP_HOST']; | ||
$config->assets = $config->site_url . '/assets'; | ||
|
||
|
||
|
||
if ( $config->env == 'dev' ) { | ||
ini_set('error_reporting', E_ALL); | ||
ini_set('display_errors', 1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
</div><? // wrapper ?> | ||
|
||
<script src="<?= $config->assets ?>/js/libs/jquery.js"></script> | ||
<script src="<?= $config->assets ?>/js/plugins.js"></script> | ||
<script src="<?= $config->assets ?>/js/script.js"></script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<? require($_SERVER['DOCUMENT_ROOT'] . "/config.php"); ?> | ||
<!doctype html> | ||
<!--[if IE 8]><html class="no-js ie8 oldie" lang="en"> <![endif]--> | ||
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1,requiresActiveX=true"> | ||
<meta name="author" content="<?= $config->author ?>"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<title><?= $config->site_name ?></title> | ||
|
||
<meta name="robots" content="all"> | ||
<link type="text/plain" rel="author" href="<?= $config->site_url ?>/humans.txt" /> | ||
<link rel="icon" type="image/png" href="<?= $config->assets ?>/img/favicon.ico"> | ||
<meta name="description" content="<?= $config->site_desc ?>"> | ||
<meta name="keywords" content="<?= $config->site_keywords ?>"> | ||
|
||
<meta property="og:title" content="<?= $config->site_name ?>"/> | ||
<meta property="og:image" content=""/> | ||
<meta property="og:url" content="<?= $config->current_url ?>"/> | ||
<meta property="og:site_name" content="<?= $config->site_name ?>"/> | ||
<meta property="og:description" content="<?= $config->site_desc ?>"/> | ||
|
||
<link href="<?= $config->assets ?>/css/core.css"> | ||
<script src="<?= $config->assets ?>/js/libs/modernizr.js"></script> | ||
|
||
<? if ( $config->env !== 'dev' ) : ?> | ||
<script> | ||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | ||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | ||
ga('create', '<?= $config->ga ?>'); | ||
ga('send', 'pageview'); | ||
</script> | ||
<? endif; ?> | ||
|
||
</head> | ||
<body data-base-url="http://<?= $_SERVER['HTTP_HOST'] ?>"> | ||
|
||
<div class="wrapper"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,5 @@ | ||
<!doctype html> | ||
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]--> | ||
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1,requiresActiveX=true"> | ||
<meta name="author" content="<%= author %>"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<? include($_SERVER['DOCUMENT_ROOT'] . "/includes/header.php"); ?> | ||
|
||
<title>Your Website</title> | ||
|
||
<meta name="robots" content="all"> | ||
<link type="text/plain" rel="author" href="humans.txt" /> | ||
<meta name="description" content=""> | ||
<meta name="keywords" content=""> | ||
|
||
<meta property="og:title" content=""/> | ||
<meta property="og:type" content=""/> | ||
<meta property="og:image" content=""/> | ||
<meta property="og:url" content=""/> | ||
<meta property="og:site_name" content=""/> | ||
<meta property="og:description" content=""/> | ||
|
||
<link href="assets/css/core.css" rel="stylesheet"> | ||
<script src="assets/js/libs/modernizr.js"></script> | ||
|
||
<script type="text/javascript"> | ||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | ||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | ||
|
||
ga('create', 'UA-XXXX-Y'); | ||
ga('send', 'pageview'); | ||
</script> | ||
|
||
</head> | ||
<body data-base-url="http://<?= $_SERVER['HTTP_HOST'] ?>"> | ||
|
||
<div class="wrapper"> | ||
|
||
</div> | ||
|
||
<script src="assets/js/libs/jquery.js"></script> | ||
<script src="assets/js/plugins.js"></script> | ||
<script src="assets/js/script.js"></script> | ||
|
||
</body> | ||
</html> | ||
<? include($_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php"); ?> |