Browse Source

i dunno what broke but i fixed it i think

master
hokkqi 2 weeks ago
parent
commit
012595faa5
13 changed files with 9 additions and 239 deletions
  1. +1
    -1
      constants.js
  2. +0
    -11
      routes/art.js
  3. +0
    -13
      routes/lore.js
  4. +1
    -1
      routes/portfolio.js
  5. +2
    -2
      routes/things.js
  6. +3
    -34
      server.js
  7. +0
    -11
      views/artwork.hbs
  8. +0
    -44
      views/layouts/artwork.hbs
  9. +0
    -44
      views/layouts/lore.hbs
  10. +2
    -7
      views/layouts/main.hbs
  11. +0
    -44
      views/layouts/portfolio.hbs
  12. +0
    -16
      views/portfolio.hbs
  13. +0
    -11
      views/story.hbs

+ 1
- 1
constants.js View File

@@ -1,4 +1,4 @@
module.exports = {
name: "hokkqi",
updateToken: "qwertzuiop1234567890",
portfolio: "https://werewolf.design",
};

+ 0
- 11
routes/art.js View File

@@ -1,11 +0,0 @@
var express = require('express');
var art = express.Router();
art.get('/', (req, res) => {
res.status(200).jsonp({
site: 'art',
done: false
});
});
module.exports = art;

+ 0
- 13
routes/lore.js View File

@@ -1,13 +0,0 @@
var express = require('express');
var lore = express.Router();
const con = require('../constants');
lore.get('/', (req, res) => {
res.render('story', {
layout: 'lore',
name: `${con.name}`,
host: req.hostname
});
});
module.exports = lore;

+ 1
- 1
routes/portfolio.js View File

@@ -3,7 +3,7 @@ var portfolio = express.Router();
const con = require("../constants");
portfolio.get("/", (req, res) => {
res.redirect("https://p.wrwlf.co");
res.redirect(con.portfolio);
});
module.exports = portfolio;

routes/p.js → routes/things.js View File

@@ -27,8 +27,8 @@ p.get("/benji", (req, res) => {
p.get("/yugen", (req, res) => {
res.redirect("https://yugen.work");
});
p.get("/pup", (req, res) => {
res.redirect("https://github.com/nonstopworld");
p.get("/nonstopworld", (req, res) => {
res.redirect("https://nonstop.world");
});
module.exports = p;

+ 3
- 34
server.js View File

@@ -1,5 +1,5 @@
//! Deps
// wrwlf.co
// werewolf.computer / wrwlf.co
const express = require("express");
const helmet = require("helmet");
const compression = require("compression");
@@ -7,9 +7,6 @@ const cors = require("cors");
const morgan = require("morgan");
const chalk = require("chalk");
const hbs = require("express-handlebars");
const UA = require("ua-parser-js");
const exec = require("shell-exec");
const simpleIcons = require("simple-icons");
let social = require("./socials");
const con = require("./constants");
@@ -63,46 +60,18 @@ app.use(
);
app.use("/portfolio", require("./routes/portfolio"));
app.use("/things", require("./routes/things"));
module.exports = (client) => {
app.get("/", async (req, res) => {
res.render("index", {
layout: "main",
name: con.name,
host: req.hostname,
item: [{ name: "portfolio", source: "https://p.wrwlf.co" }],
item: [{ name: "portfolio", source: con.portfolio }],
social,
});
});
app.get("/update", async (req, res) => {
//console.log(req.headers['user-agent']);
if (req.headers.authorization === con.updateToken) {
await exec("git pull")
.then((r) => {
console.log("Pulled latest changes");
res.status(200).jsonp({
success: true,
message: "Successfully pulled latest changes",
});
process.exit();
//trying.edit('```fix\n' + r.stdout + '```');
})
.catch((error) => {
res.status(400).jsonp({
success: false,
message: error.message,
});
console.error(error);
});
} else {
res.status(400).jsonp({
success: false,
message: "You are not authorized to access this Endpoint",
});
}
});
app.listen(port /* , hostname */, () => {
console.log(`[ Server ] Listening on ${port}`);
});


+ 0
- 11
views/artwork.hbs View File

@@ -1,11 +0,0 @@
<body>
<h1 class="title"><a href="/">{{name}}</a></h1>
<h1 class="subtitle toggle">dark/light</h1>
<div class="center">
{{#each art}}
<img src="http://{{this.image}}" width="{{this.aspect.w}}" height="{{this.aspect.h}}" alt="Image">
{{/each}}
</div>
<div id="box"></div>
</div>
</body>

+ 0
- 44
views/layouts/artwork.hbs View File

@@ -1,44 +0,0 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1.0">
<meta http-equiv="X-UA-Compatible">
<title>ry - artwork</title>
<script src="../assets/js/main.js" async></script>
{{!-- <script src="../assets/js/lore.js" async></script> --}}
<link rel="stylesheet" type="text/css" href="../assets/css/portfolio.css" />
<link rel="stylesheet" type="text/css" href="../assets/css/artwork.css" />
{{!--
<link href="https://afeld.github.io/emoji-css/emoji.css" rel="stylesheet">
<link rel="manifest" href="./assets/json/manifest.json">
<script type="text/javascript" src="./assets/js/dropdown.js"></script> --}}
<meta name="theme-color" content="#e4778d">
<meta property="og:title" content="ry - lore">
<meta property="og:type" content="website">
<meta property="og:url" content="https://{{host}}">
<meta property="og:image" content="/images/icon.png">
<meta property="og:description" content="here you can see my art">
{{!-- <link rel="icon" type="image/png"
href="https://raw.githubusercontent.com/EndlessHosting/assets/master/images/PFPs/code.png" sizes="32x32">
<link rel="icon" type="image/png"
href="https://raw.githubusercontent.com/EndlessHosting/assets/master/images/PFPs/code.png" sizes="96x96">
<link rel="apple-touch-icon" sizes="180x180"
href="https://raw.githubusercontent.com/EndlessHosting/assets/master/images/PFPs/code.png"> --}}
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
<meta name="apple-mobile-web-app-capable" content="yes">
</head>
<body>
{{{body}}}
</body>
</html>

+ 0
- 44
views/layouts/lore.hbs View File

@@ -1,44 +0,0 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1.0">
<meta http-equiv="X-UA-Compatible">
<title>ry - lore</title>
<script src="../assets/js/main.js" async></script>
{{!-- <script src="../assets/js/lore.js" async></script> --}}
<link rel="stylesheet" type="text/css" href="../assets/css/lore.css" />
{{!--
<link href="https://afeld.github.io/emoji-css/emoji.css" rel="stylesheet">
<link rel="manifest" href="./assets/json/manifest.json">
<script type="text/javascript" src="./assets/js/dropdown.js"></script> --}}
<meta name="theme-color" content="#e4778d">
<meta property="og:title" content="ry - lore">
<meta property="og:type" content="website">
<meta property="og:url" content="https://{{host}}">
{{!-- <meta property="og:image"
content="https://raw.githubusercontent.com/EndlessHosting/assets/master/images/PFPs/code.png">
--}} <meta property="og:description" content="hewwo -w-">
{{!-- <link rel="icon" type="image/png"
href="https://raw.githubusercontent.com/EndlessHosting/assets/master/images/PFPs/code.png" sizes="32x32">
<link rel="icon" type="image/png"
href="https://raw.githubusercontent.com/EndlessHosting/assets/master/images/PFPs/code.png" sizes="96x96">
<link rel="apple-touch-icon" sizes="180x180"
href="https://raw.githubusercontent.com/EndlessHosting/assets/master/images/PFPs/code.png"> --}}
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
<meta name="apple-mobile-web-app-capable" content="yes">
</head>
<body>
{{{body}}}
</body>
</html>

+ 2
- 7
views/layouts/main.hbs View File

@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1.0">
<meta http-equiv="X-UA-Compatible">
<title>hokkqi</title>
<title>hokkqi - {{host}}</title>
<script src="../assets/js/main.js" async></script>
<link rel="stylesheet" type="text/css" href="../assets/css/main.css" />

@@ -21,10 +21,5 @@
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
<meta name="apple-mobile-web-app-capable" content="yes">
</head>

<body>
{{{body}}}
</body>


{{{body}}}
</html>

+ 0
- 44
views/layouts/portfolio.hbs View File

@@ -1,44 +0,0 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1.0">
<meta http-equiv="X-UA-Compatible">
<title>ry - portfolio</title>
<script src="../assets/js/main.js" async></script>
{{!-- <script src="../assets/js/lore.js" async></script> --}}
<link rel="stylesheet" type="text/css" href="../assets/css/portfolio.css" />
{{!--
<link href="https://afeld.github.io/emoji-css/emoji.css" rel="stylesheet">
<link rel="manifest" href="./assets/json/manifest.json">
<script type="text/javascript" src="./assets/js/dropdown.js"></script> --}}
<meta name="theme-color" content="#e4778d">
<meta property="og:title" content="ry - portfolio">
<meta property="og:type" content="website">
<meta property="og:url" content="https://{{host}}">
{{!-- <meta property="og:image"
content="https://raw.githubusercontent.com/EndlessHosting/assets/master/images/PFPs/code.png">
--}} <meta property="og:description" content="hewwo -w-">
{{!-- <link rel="icon" type="image/png"
href="https://raw.githubusercontent.com/EndlessHosting/assets/master/images/PFPs/code.png" sizes="32x32">
<link rel="icon" type="image/png"
href="https://raw.githubusercontent.com/EndlessHosting/assets/master/images/PFPs/code.png" sizes="96x96">
<link rel="apple-touch-icon" sizes="180x180"
href="https://raw.githubusercontent.com/EndlessHosting/assets/master/images/PFPs/code.png"> --}}
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
<meta name="apple-mobile-web-app-capable" content="yes">
</head>
<body>
{{{body}}}
</body>
</html>

+ 0
- 16
views/portfolio.hbs View File

@@ -1,16 +0,0 @@
<body>
<h1 class="title" > <a href="/">{{name}}</a></h1>
<h1 class="subtitle toggle">dark/light</h1>
<div class="center">
<p class="subtitle coding">Coding</p>
{{!-- <br> --}}
{{#each portfolio.code}}
<a class="{{this.name}}" target="_blank" href="{{this.source}}">{{this.name}}</a>
{{/each}}
{{!-- <br> --}}
<p class="subtitle coding">Art</p>
{{!-- <br> --}}
<a class="art" href="https://twitter.com/floofydev" target="_blank">@floofydev</a>
<div id="box"></div>
</div>
</body>

+ 0
- 11
views/story.hbs View File

@@ -1,11 +0,0 @@
<body>
<h1 class="title" > <a href="/">{{name}}</a></h1>
<h1 class="subtitle toggle">dark/light</h1>
<div class="center">
<a class="monty" href="/lore/monty">monty</a>
<a class="ryden" href="/lore/ryden">ryden</a>
<a class="thaldrin" href="/lore/thaldrin">thaldrin</a>
<div id="box"></div>
</div>
</body>

Loading…
Cancel
Save