summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/index.js21
-rw-r--r--examples/layouts/footer.html15
-rw-r--r--examples/layouts/header.html27
-rw-r--r--examples/layouts/loading.html12
-rw-r--r--examples/shop.js51
5 files changed, 54 insertions, 72 deletions
diff --git a/examples/index.js b/examples/index.js
deleted file mode 100644
index 64a619b..0000000
--- a/examples/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-class Index {
- constructor() {}
-
- async Main() {
- return {
- html: `
- <section>
- <h1>Welcome to <a href='https://git.fatalmatrix.xyz/cosmic.git'>Cosmic</a>!</h1>
- <p>Please read the README.md</p>
- </section>
- `,
- meta: {
- keywords: 'Cosmic',
- description: 'Welcome to Cosmic!'
- }
- }
- }
-}
-
-module.exports = (x) => {return new Index(x)}
-
diff --git a/examples/layouts/footer.html b/examples/layouts/footer.html
new file mode 100644
index 0000000..9b2c673
--- /dev/null
+++ b/examples/layouts/footer.html
@@ -0,0 +1,15 @@
+ </section>
+ <section id="footer">
+ <div class="copied">
+ <p>Copied to clipboard</p>
+ </div>
+ <div class="links">
+ <p>Email: <a href='mailto:mchaeldonald62@pm.me'>mchaeldonald62@pm.me</a></p>
+ <p>Monero: <span class='footer-links'>89dARfwUGJNByHeir8bpCM4YJS2cTz58DNvu9fad1bpg7bfZs2H1QwtJpFghhJJatzRo8rnrE8AH5CAXbQHUpTp5FujsU1h</span></p>
+ <p>Bitcoin: <span class='footer-links'>bc1qplmr9wx7ahcna5zmwlhhl5zcgs8n5nuxp74apw</span></p>
+ </div>
+ </section>
+ <script src="/js/purify.js"></script>
+ <script src="/js/main.js"></script>
+ </body>
+</html>
diff --git a/examples/layouts/header.html b/examples/layouts/header.html
new file mode 100644
index 0000000..165133b
--- /dev/null
+++ b/examples/layouts/header.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Welcome to my website!</title>
+ <link rel="stylesheet" href="/css/main.css"/>
+ <link rel="stylesheet" href="/css/prism.css">
+ <meta name="description" content="Welcome to my website!">
+ <meta name="keywords" content="">
+ </head>
+ <body>
+ <section id="header">
+ <nav class="menulist" id="menu-list">
+ <a class="list" href="/">Home</a>
+ <a class="list" href="/about">About</a>
+ <a class="list" href="/blog">Blog</a>
+ <a class="list" href="https://git.fatalmatrix.xyz/">Git Server</a>
+ <div class="close" id="close">
+ <p>&#10005;</p>
+ </div>
+ </nav>
+ <div class="menuIcon" id="menu-icon">
+ <div></div>
+ <div></div>
+ <div></div>
+ </div>
+ </section>
+ <section id="main">
diff --git a/examples/layouts/loading.html b/examples/layouts/loading.html
new file mode 100644
index 0000000..e8157e7
--- /dev/null
+++ b/examples/layouts/loading.html
@@ -0,0 +1,12 @@
+ <section id="loading">
+ <div class="main">
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ </div>
+ </section>
diff --git a/examples/shop.js b/examples/shop.js
deleted file mode 100644
index e75d289..0000000
--- a/examples/shop.js
+++ /dev/null
@@ -1,51 +0,0 @@
-const database = require('../source/database')
-const estore = database('EStore')
-
-class Shop {
- constructor() {}
-
- async Main() {
- return estore.Query('SELECT * FROM Products').then(output => {
- const data = {
- start: `
- <section id='shop'>
- <div>
- <h1>This is the Shop page</h1>
- `,
- body: '',
- end: `
- </div>
- </section>
- `
- }
- if (output) {
- for (let i = 0; i < output[0].length; i++) {
- data.body += `
- <div class='item'>
- <h2>${output[0][i].ProductName}</h2>
- <p>ID: ${output[0][i].ID}</p>
- </div>
- `
- }
- } else {
- data.body = `
- There are no items in the database.
- `
- }
- return data.start + data.body + data.end
- })
- }
- Product() {
- const data = `
- <section id='product'>
- <div>
- <h1>This is the Product page</h1>
- <p>Description</p>
- </div>
- </section>
- `
- return data
- }
-}
-
-module.exports = () => {return new Shop()}