diff --git a/package.json b/package.json index d36793f..9f1524e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "keyoxide-web", "version": "3.3.0", "description": "A modern, secure and privacy-friendly platform to establish your decentralized online identity", - "main": "index.js", + "main": "./src/index.js", "type": "module", "dependencies": { "ajv": "^8.6.3", diff --git a/index.js b/src/index.js similarity index 85% rename from index.js rename to src/index.js index a74c0af..a15571a 100644 --- a/index.js +++ b/src/index.js @@ -33,19 +33,19 @@ import { stringReplace } from 'string-replace-middleware' import * as pug from 'pug' import 'dotenv/config.js' -import apiRoute from './routes/api.js' -import mainRoute from './routes/main.js' -import profileRoute from './routes/profile.js' -import staticRoute from './routes/static.js' -import utilRoute from './routes/util.js' +import apiRoute from '../routes/api.js' +import mainRoute from '../routes/main.js' +import profileRoute from '../routes/profile.js' +import staticRoute from '../routes/static.js' +import utilRoute from '../routes/util.js' const app = express() const packageData = JSON.parse(readFileSync('./package.json')) -app.set('env', process.env.NODE_ENV || "production") +app.set('env', process.env.NODE_ENV || 'production') app.engine('pug', pug.__express).set('view engine', 'pug') app.set('port', process.env.PORT || 3000) -app.set('domain', process.env.DOMAIN || "keyoxide.org") +app.set('domain', process.env.DOMAIN || 'keyoxide.org') app.set('keyoxide_version', packageData.version) app.set('onion_url', process.env.ONION_URL) @@ -69,8 +69,8 @@ app.use(stringReplace({ })) // Routes -app.use('/favicon.svg', express.static('favicon.svg')) -app.use('/robots.txt', express.static('robots.txt')) +app.use('/favicon.svg', express.static('../static/favicon.svg')) +app.use('/robots.txt', express.static('../static/robots.txt')) app.use('/', mainRoute) app.use('/api', apiRoute) diff --git a/favicon.svg b/static-src/files/favicon.svg similarity index 100% rename from favicon.svg rename to static-src/files/favicon.svg diff --git a/static-src/files/img/alert-circle.png b/static-src/files/img/alert-circle.png new file mode 100644 index 0000000..d09205b Binary files /dev/null and b/static-src/files/img/alert-circle.png differ diff --git a/static-src/files/img/alert-decagram.png b/static-src/files/img/alert-decagram.png new file mode 100644 index 0000000..fc9419a Binary files /dev/null and b/static-src/files/img/alert-decagram.png differ diff --git a/static-src/files/img/avatar_placeholder.png b/static-src/files/img/avatar_placeholder.png new file mode 100644 index 0000000..08dc470 Binary files /dev/null and b/static-src/files/img/avatar_placeholder.png differ diff --git a/static-src/files/img/background.svg b/static-src/files/img/background.svg new file mode 100644 index 0000000..ea25295 --- /dev/null +++ b/static-src/files/img/background.svg @@ -0,0 +1,102 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/static-src/files/img/check-decagram.png b/static-src/files/img/check-decagram.png new file mode 100644 index 0000000..618b358 Binary files /dev/null and b/static-src/files/img/check-decagram.png differ diff --git a/static-src/files/img/cogs.png b/static-src/files/img/cogs.png new file mode 100644 index 0000000..fdc24f3 Binary files /dev/null and b/static-src/files/img/cogs.png differ diff --git a/static-src/files/img/decagram.png b/static-src/files/img/decagram.png new file mode 100644 index 0000000..8c484ff Binary files /dev/null and b/static-src/files/img/decagram.png differ diff --git a/static-src/files/img/fingerprint.png b/static-src/files/img/fingerprint.png new file mode 100644 index 0000000..d981247 Binary files /dev/null and b/static-src/files/img/fingerprint.png differ diff --git a/static-src/files/img/information.png b/static-src/files/img/information.png new file mode 100644 index 0000000..c420671 Binary files /dev/null and b/static-src/files/img/information.png differ diff --git a/static-src/files/img/key.png b/static-src/files/img/key.png new file mode 100644 index 0000000..82be7a9 Binary files /dev/null and b/static-src/files/img/key.png differ diff --git a/static-src/files/img/link.png b/static-src/files/img/link.png new file mode 100644 index 0000000..301ed90 Binary files /dev/null and b/static-src/files/img/link.png differ diff --git a/static-src/files/img/logo.png b/static-src/files/img/logo.png new file mode 100644 index 0000000..f452cdc Binary files /dev/null and b/static-src/files/img/logo.png differ diff --git a/static-src/files/img/logo_96.png b/static-src/files/img/logo_96.png new file mode 100644 index 0000000..3713a01 Binary files /dev/null and b/static-src/files/img/logo_96.png differ diff --git a/static-src/files/img/logo_circle.png b/static-src/files/img/logo_circle.png new file mode 100644 index 0000000..ff6c59b Binary files /dev/null and b/static-src/files/img/logo_circle.png differ diff --git a/static-src/files/img/qrcode.png b/static-src/files/img/qrcode.png new file mode 100644 index 0000000..f3e044f Binary files /dev/null and b/static-src/files/img/qrcode.png differ diff --git a/static-src/files/img/shield-link.png b/static-src/files/img/shield-link.png new file mode 100644 index 0000000..235c797 Binary files /dev/null and b/static-src/files/img/shield-link.png differ diff --git a/static-src/files/img/shield-search.png b/static-src/files/img/shield-search.png new file mode 100644 index 0000000..b5594c0 Binary files /dev/null and b/static-src/files/img/shield-search.png differ diff --git a/robots.txt b/static-src/files/robots.txt similarity index 100% rename from robots.txt rename to static-src/files/robots.txt