diff --git a/config/config.yml b/config/config.yml index 465228a..9cf0d64 100644 --- a/config/config.yml +++ b/config/config.yml @@ -1,5 +1,6 @@ name: "Nikurasu" # The name on the linktree # profilePic: # uncomment and set this if your profile pic has a custom name +theme: 'simple-orange' links: - text: "YouTube" # text on the link hyperlink: "Test" # the actual hyperlink diff --git a/package.json b/package.json index 355594b..4810d37 100644 --- a/package.json +++ b/package.json @@ -8,12 +8,15 @@ "license": "MIT", "scripts": { "start": "node src/index.js", - "dev": "nodemon src/index.js" + "dev": "nodemon src/index.js & sass --watch src/public/themes:src/dist/style", + "watch-css": "sass --watch src/public/themes:src/dist/style", + "build": "sass src/public/themes:src/dist/style" }, "dependencies": { "ejs": "^3.1.8", "express": "^4.18.2", - "js-yaml": "^4.1.0" + "js-yaml": "^4.1.0", + "sass": "^1.55.0" }, "devDependencies": { "nodemon": "^2.0.20" diff --git a/src/dist/style/simple-orange.css b/src/dist/style/simple-orange.css new file mode 100644 index 0000000..2b734a3 --- /dev/null +++ b/src/dist/style/simple-orange.css @@ -0,0 +1,44 @@ +* { + margin: 0; + padding: 0; +} + +body { + min-height: 100vh; +} + +.container { + padding-top: 3rem; + display: flex; + flex-direction: column; + align-items: center; + gap: 0.5rem; +} + +.headingbox > h1 { + font-size: 1.5rem; + font-weight: 800; + font-family: monospace; +} + +.imgbox > img { + height: 10rem; + width: 10rem; + border-radius: 0.5rem; +} + +.linkbox { + display: flex; + flex-direction: column; + gap: 1rem; +} + +body { + background-image: linear-gradient(165deg, #c7a25c 0%, #ff9601 43%, #980d0d 100%); +} + +.headingbox { + color: #FFFFFF; +} + +/*# sourceMappingURL=simple-orange.css.map */ diff --git a/src/dist/style/simple-orange.css.map b/src/dist/style/simple-orange.css.map new file mode 100644 index 0000000..a199681 --- /dev/null +++ b/src/dist/style/simple-orange.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../public/util/main.scss","../../public/util/simple-basic.scss","../../public/themes/simple-orange.scss"],"names":[],"mappings":"AAAA;EACI;EACA;;;ACFJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;ACxBJ;EACI;;;AAGJ;EACI","file":"simple-orange.css"} \ No newline at end of file diff --git a/src/index.js b/src/index.js index 83a64c8..717540a 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,6 @@ import express from 'express' import yaml from 'js-yaml' -import fs, { cpSync } from 'node:fs' +import fs from 'node:fs' console.log('🔧 Configuring socialtree...') @@ -10,7 +10,7 @@ const engine = 'ejs' app.set('view engine', engine) app.set('views', './src/views') -app.use(express.static('src/public')) +app.use(express.static('src/dist')) app.use(express.static('src/assets')) app.get('/', (req, res) => { @@ -18,7 +18,8 @@ app.get('/', (req, res) => { res.render('index', { name: config.name, filenameProfilePic: config.profilePic ? config.profilePic : 'profilepic.jpg', - links: config.links + links: config.links, + theme: config.theme }) }) diff --git a/src/public/simple-orange.css b/src/public/themes/simple-orange.scss similarity index 66% rename from src/public/simple-orange.css rename to src/public/themes/simple-orange.scss index a3d7ac4..dd9be68 100644 --- a/src/public/simple-orange.css +++ b/src/public/themes/simple-orange.scss @@ -1,3 +1,6 @@ +@import '../util/main.scss'; +@import '../util/simple-basic.scss'; + body { background-image: linear-gradient(165deg, #c7a25c 0%, #ff9601 43%, #980d0d 100%); } diff --git a/src/public/main.css b/src/public/util/main.scss similarity index 100% rename from src/public/main.css rename to src/public/util/main.scss diff --git a/src/public/simple-basic.css b/src/public/util/simple-basic.scss similarity index 81% rename from src/public/simple-basic.css rename to src/public/util/simple-basic.scss index c5e2743..e4798e1 100644 --- a/src/public/simple-basic.css +++ b/src/public/util/simple-basic.scss @@ -20,4 +20,10 @@ body { height: 10rem; width: 10rem; border-radius: .5rem; +} + +.linkbox { + display: flex; + flex-direction: column; + gap: 1rem; } \ No newline at end of file diff --git a/src/views/index.ejs b/src/views/index.ejs index 0918a79..236d020 100644 --- a/src/views/index.ejs +++ b/src/views/index.ejs @@ -9,7 +9,7 @@
Hello World
+ <% }) %>