custom profile card themes

colours are all stored in the member table so they can be personal. maybe the form can be expanded so hex codes can be copy pasted between member profiles. idc about that rn though. also the style tag inside the index.html and full.html will flag a gazillion errors in vscode or any competent editor because it isnt technically valid css but ignore all of that. god bless
This commit is contained in:
cube
2026-03-18 00:53:30 +00:00
parent dcc470e385
commit 5ec6a62aa7
8 changed files with 151 additions and 43 deletions

View File

@@ -4,8 +4,6 @@ DROP TABLE IF EXISTS icons;
DROP TABLE IF EXISTS groups;
DROP TABLE IF EXISTS group_members;
DROP TABLE IF EXISTS pages;
DROP TABLE IF EXISTS themes;
DROP TABLE IF EXISTS member_themes;
CREATE TABLE user (
id INTEGER PRIMARY KEY AUTOINCREMENT,
@@ -23,6 +21,20 @@ CREATE TABLE member (
main_icon INTEGER,
homepage BOOLEAN NOT NULL DEFAULT 0,
front BOOLEAN NOT NULL DEFAULT 0,
card_border TEXT NOT NULL DEFAULT '#99dfff',
card_bg TEXT NOT NULL DEFAULT '#e6f7ff',
heading_bg TEXT NOT NULL DEFAULT '#b3e7ff',
heading_border TEXT NOT NULL DEFAULT '#008bcc',
heading_name TEXT NOT NULL DEFAULT 'black',
heading_subtitle TEXT NOT NULL DEFAULT 'black',
card_text TEXT NOT NULL DEFAULT 'black',
icon_border TEXT NOT NULL DEFAULT '#008bcc',
page_bg TEXT NOT NULL DEFAULT '#00b7ff',
gradient1 TEXT NOT NULL DEFAULT '#00b7ff',
gradient2 TEXT NOT NULL DEFAULT '#57c785',
gradient3 TEXT NOT NULL DEFAULT '#eddd53',
a1 TEXT NOT NULL DEFAULT '#008bcc',
a2 TEXT NOT NULL DEFAULT '#026897',
FOREIGN KEY (user_id) REFERENCES user (id),
FOREIGN KEY (main_icon) REFERENCES icons (id)
);
@@ -53,22 +65,4 @@ CREATE TABLE pages (
member_id INTEGER NOT NULL,
page_location TEXT NOT NULL,
FOREIGN KEY (member_id) REFERENCES member (id)
);
CREATE TABLE themes (
id INTEGER PRIMARY KEY AUTOINCREMENT,
theme_name TEXT NOT NULL,
color1 TEXT NOT NULL,
color2 TEXT NOT NULL,
color3 TEXT NOT NULL,
color4 TEXT NOT NULL,
color5 TEXT NOT NULL
);
CREATE TABLE member_themes (
id INTEGER PRIMARY KEY AUTOINCREMENT,
theme_id INTEGER NOT NULL,
member_id INTEGER NOT NULL,
FOREIGN KEY (theme_id) REFERENCES themes (id),
FOREIGN KEY (member_id) REFERENCES member (id)
);