diff --git a/README.md b/README.md index 81a720d..7260a48 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,31 @@ # Not Done My Website -__Master is currently legacy code. Consider checking out the rewrite branch :)__ +## Rewrite Goals -## Project Outline -Not Done My Website is a quick webpage generator for developers who don't have time to build a nice under construction webpage and instead would like to just throw something up very quickly. This provides a tool for generating that and also a framework for making your own templates. +- [ ] Move frontend to entirely HTML5 w/o framework or PHP +- [ ] Move backend to Golang or Node.js (undecided as of now) +- [ ] Create more templates +- [ ] Work out system for easier template additions + +## What is this? + +Not Done My Website is a little utility for generating index page placeholders based on required criteria, whether it's because you're working on your website or just need a placeholder page! ## Running -You need to have an instance of PHP running. Then do this in the web folder (e.g htdocs in XAMPP). + +Right now, you need to have an instance of PHP running. This will change during the rewrite, use `master` branch for stability. + +Clone the repository to your webserver. + ``` git clone git@github.com:gmemstr/notdonemywebsite.git ``` -Then go to localhost/notdonemywebsite (or however you have your server set up). -## Creating Custom Templates -Custom templates should go in to the `/templates/` folder. They should be .html files (PHP works too but adds a bit of complexity and overall maybe not worth it because the page is returned as a .html), with the CSS included. You may use CDNs to deliver content but keep in mind that the only file the client recieves is the `index.html`. +Then go to localhost/notdonemywebsite (or however you have your server set up) and generate away. + +## Adding Templates + +Custom templates belong in the `templates/` folder and should be entirely self contained, and preferably minimized as well. Feel free to make a pull request so we can add your template to the repository! These should be .html files. ### Keywords for template diff --git a/assets/app.js b/assets/app.js new file mode 100644 index 0000000..0a07012 --- /dev/null +++ b/assets/app.js @@ -0,0 +1,19 @@ +console.log("app.js loaded"); + +var getTemplateHtml = template => { + fetch('template/template.html') + .then(function(response) { + return response.text() + }) + .then(function(html) { + document.getElementById('iframe').contentWindow.document.write(html); + }); +} + +getTemplateHtml("1"); + +var valueChange = value => { + var iframehtml = document.getElementById('iframe').contentWindow.document.getElementById(value); + val = document.getElementById(value).value; + iframehtml.innerHTML = val +} \ No newline at end of file diff --git a/assets/css.css b/assets/css.css new file mode 100644 index 0000000..1a97272 --- /dev/null +++ b/assets/css.css @@ -0,0 +1,40 @@ +body { + padding: 0; + margin: 0 auto; + font-family: 'Open Sans', sans-serif; +} +h2 { + font-weight: lighter; +} + +nav { + padding: 5vh; + width: 10vw; + height: 90vh; + background-color: lightblue; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +button, input { + display: block; + width: 10vw; + height: 5vh; +} +input[type=text] { + font-size: 100%; +} +.themeclr { + width: 100%; +} + +.content { + position: absolute; + top:0; + margin-left: 15vw; + /* Comment out background color later*/ + background-color: #E9E9E9; + height: 100vh; + width: 85vw; +} \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..0b830ad --- /dev/null +++ b/index.html @@ -0,0 +1,50 @@ + + + + + + I'm not done my website! + + + + + + + + + + + + + \ No newline at end of file diff --git a/index.php b/index.php deleted file mode 100644 index adeedff..0000000 --- a/index.php +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - <?php echo $_title ?> - - - - - - - - -
-

Variables for web page

- -
-
Site name: -
-
Site URL: -
-
Webmaster: -
-
Primary Colour: -
-
Secondary Colour: -
-
Template: - -
- - - -
- -
- - - \ No newline at end of file diff --git a/make.php b/make.php index 9a65c0b..766a523 100644 --- a/make.php +++ b/make.php @@ -1,5 +1,4 @@
-

rep_SNAME

+

rep_SNAME


-
-

rep_URL is being worked on by rep_DEVNAME!

+
+

rep_URL is being worked on by rep_DEVNAME!

\ No newline at end of file