mirror of
https://github.com/gmemstr/notdonemywebsite.git
synced 2024-09-19 21:51:10 +01:00
New template and template switching system :)
This commit is contained in:
parent
1721d78d2f
commit
f620471484
|
@ -35,12 +35,18 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="var">Site URL: <input type="text" name="surl" placeholder="notdonemy.website">
|
<div id="var">Site URL: <input type="text" name="surl" placeholder="notdonemy.website">
|
||||||
</div>
|
</div>
|
||||||
<div id="var">Developer/Designer: <input type="text" name="devname" placeholder="John D. Oh">
|
<div id="var">Webmaster: <input type="text" name="devname" placeholder="John D. Oh">
|
||||||
</div>
|
</div>
|
||||||
<div id="var">Primary Colour: <input type="color" name="pcolour" placeholder="#333333">
|
<div id="var">Primary Colour: <input type="color" name="pcolour" placeholder="#333333">
|
||||||
</div>
|
</div>
|
||||||
<div id="var">Secondary Colour: <input type="color" name="scolour" placeholder="#eeeeee">
|
<div id="var">Secondary Colour: <input type="color" name="scolour" placeholder="#eeeeee">
|
||||||
</div>
|
</div>
|
||||||
|
<div id="var">Template: <input list="templates" name="template">
|
||||||
|
<datalist id="templates">
|
||||||
|
<option value="The Original">
|
||||||
|
<option value="Forked">
|
||||||
|
</datalist>
|
||||||
|
</div>
|
||||||
|
|
||||||
<button type="submit" value="Check">Generate</button>
|
<button type="submit" value="Check">Generate</button>
|
||||||
|
|
||||||
|
|
14
make.php
14
make.php
|
@ -4,9 +4,19 @@
|
||||||
$devname = $_POST['devname'];
|
$devname = $_POST['devname'];
|
||||||
$pcolour = $_POST['pcolour'];
|
$pcolour = $_POST['pcolour'];
|
||||||
$scolour = $_POST['scolour'];
|
$scolour = $_POST['scolour'];
|
||||||
|
$template = $_POST['template'];
|
||||||
|
|
||||||
$template = fopen("template/template.html", "r+"); // Change this if you have a custom template filename
|
$tFile = "template/template.html";
|
||||||
$tempContents = fread($template, filesize("template/template.html"));
|
|
||||||
|
if($template == "The Original"){
|
||||||
|
$tFile = "template/template.html";
|
||||||
|
}
|
||||||
|
if($template == "Forked"){
|
||||||
|
$tFile = "template/template2.html";
|
||||||
|
}
|
||||||
|
|
||||||
|
$template = fopen($tFile, "r+"); // Change this if you have a custom template filename
|
||||||
|
$tempContents = fread($template, filesize($tFile));
|
||||||
|
|
||||||
// Keywords for replacement - see README
|
// Keywords for replacement - see README
|
||||||
$keywords = array("rep_PCOLOUR", "rep_SCOLOUR", "rep_SNAME", "rep_URL", "rep_DEVNAME");
|
$keywords = array("rep_PCOLOUR", "rep_SCOLOUR", "rep_SNAME", "rep_URL", "rep_DEVNAME");
|
||||||
|
|
59
template/template2.html
Normal file
59
template/template2.html
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Very simple webpage that scales decently -->
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
|
<title>rep_SNAME - Under Construction</title>
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link href='https://fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
body{
|
||||||
|
font-family: 'Roboto', sans-serif;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
background-color: #E9E9E9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
width: 40%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
margin-top: -20px;
|
||||||
|
background-color: rep_PCOLOUR;
|
||||||
|
border-bottom: 5px solid rep_SCOLOUR;
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content{
|
||||||
|
width: 40%;
|
||||||
|
position: fixed;
|
||||||
|
top: 40%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
font-weight: 400;
|
||||||
|
text-align: center;
|
||||||
|
color: rep_SCOLOUR;
|
||||||
|
background-color: rep_PCOLOUR;
|
||||||
|
box-shadow:2px 2px 5px #888;
|
||||||
|
border-bottom: 5px solid rep_SCOLOUR;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<div class="container">
|
||||||
|
<h1>rep_SNAME</h1>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<h1>Under Construction</h1>
|
||||||
|
<p>rep_SNAME is being worked on by rep_DEVNAME!</p> <!-- See README for keywords -->
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in a new issue