Updated fullscreen and started work for themes

This commit is contained in:
MathMan05 2024-06-08 11:14:00 -05:00
parent ca81f05665
commit dc8ba099da
6 changed files with 224 additions and 6 deletions

View file

@ -51,7 +51,9 @@ app.get('/fullscreen.js', (req, res) => {
app.get('/style.css', (req, res) => {
res.sendFile("./webpage/style.css", {root: __dirname})
})
app.get('/light.css', (req, res) => {
res.sendFile("./webpage/light.css", {root: __dirname})
})
app.get('/manifest.json', (req, res) => {
res.sendFile("./webpage/manifest.json", {root: __dirname})
})

View file

@ -131,6 +131,7 @@ class fullscreen{
const legend=document.createElement("legend");
legend.innerText=array[1];
fieldset.appendChild(legend);
let i=0;
for(const thing of array[2]){
const div=document.createElement("div");
const input=document.createElement("input");
@ -138,7 +139,9 @@ class fullscreen{
input.type="radio";
input.name=array[1];
input.value=thing;
if(i===array[4]){
input.checked=true;
}
const label=document.createElement("label");
label.appendChild(input);
@ -147,6 +150,7 @@ class fullscreen{
label.appendChild(span);
div.appendChild(label);
fieldset.appendChild(div);
i++
}
div.appendChild(fieldset);
return div;
@ -154,6 +158,23 @@ class fullscreen{
case "html":{
return array[1];
}
case "select":{
const div=document.createElement("div");
const label=document.createElement("label");
const select=document.createElement("select");
label.innerText=array[1];
div.append(label);
div.appendChild(select);
for(const thing of array[2]){
const option = document.createElement("option");
option.innerText=thing;
select.appendChild(option);
}
select.selectedIndex=array[4];
select.addEventListener("change",array[3]);
return div;
}
default:
console.error("can't find element:"+array[0]," full element:"+array)
return;

View file

@ -1,7 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link href="/style.css" rel="stylesheet" type="text/css" />
<link href="/light.css" rel="stylesheet" type="text/css" id="lightcss" disabled="true"/>
<link rel="manifest" href="/manifest.json" />
</head>
<body>

View file

@ -50,7 +50,7 @@ function lacechannel(c){
function createchannels(fincall){
let name="";
let catagory=1;
let catagory=2;
console.log(fincall)
channelselect=new fullscreen(
["vdiv",
@ -59,7 +59,8 @@ function createchannels(fincall){
function(e){
console.log(e)
catagory={"text":0,"voice":2,"announcement":5,"catagory":4}[e]
}
},
1
],
["textbox","Name of channel","",function(){
console.log(this)
@ -630,7 +631,10 @@ function genusersettings(){
if(newbio!==null){
thisuser.updatebio(newbio);
}
}]
}],
["select","Theme:",["Dark","Light"],e=>{
localStorage.setItem("theme",["Dark","Light"][e.target.selectedIndex]);
},["Dark","Light"].indexOf(localStorage.getItem("theme"))]
],
["vdiv",
["html",hypothetcialprofie]

186
webpage/light.css Normal file
View file

@ -0,0 +1,186 @@
.centeritem {
background: #a3b8e9;
}
.nonimagecenter{
border-color: #b1afd8;
}
.background{
background:#000000bf;
}
.messagediv:hover{
background:rgb(162 162 198);
}
pre{
background:#101014;
color: white;
}
samp{
background:#101014;
}
.contextbutton{
background:rgb(139 139 255);
color:#01021a;
}
.infosection{
background:#57577c;
}
.profile{
background:#a4a0bb;
}
.hypoprofile{
background:#a4a0bb;
}
.contextbutton:hover{
background:rgb(84 84 166);
}
.contextmenu{
background:#a4a2b1;
}
.blankserver{
background:#8b8b98;
}
body{
background:rgb(160 160 229);
color:black;
}
#channels{
background:rgb(123 123 196);
}
input{
background:rgb(163 163 210);
color:black;
}
.spoiler{
background:black;
color:black;
}
.spoiler:hover{
background:#111111;
color:#111111;
}
.unspoiled{
background:#454545;
color: black;
}
.unspoiled:before {
background-color: rgb(0 0 0);
background-clip: content-box;
}
.replying{
background:#5f68bb;
}
#typing{
background:#161616;
}
.lightbr{
border-color: #929292;
color:black;
background-color:#9ea7dd;
}
.Home{
background:#7ea6b9;
}
.timestamp{
color:#2c2b31;
}
.reply{
border-color:#000000;
}
.replytext{
padding:.05in;
color:#1f1f21;
}
::-webkit-scrollbar-track {
background: #978fae;
}
::-webkit-scrollbar-thumb {
background: #52515a;
box-shadow: 0px 2px 5px #000000;
}
::-webkit-scrollbar-thumb:hover {
background: #63636a;
box-shadow: 0px 2px 5px #000000;
}
.pronouns{
color: #111111;
}
textarea{
background:#9ea9e3;
}
.Channel:hover{
background:#5a4fb9;
}
.servertd{
background:#a5a5dc;
border-color:#8c8cb0;
}
.channeleffects:hover{
background:#554ab8;
}
.tag{
color:black;
}
#userdock{
background:#626292;
}
#settings:hover{
background:#473962;
}
#userinfo{
background:#4e3c8f;
}
button{
color:black;
background:#6363c6;
}
input::file-selector-button{
color:black;
background:#6363c6;
}
#logindiv{
background: #33363d;
border-color:#131315;
}
.addchannel:hover{
background:#524089;
}
input[type="checkbox"] {
accent-color:#5b5dbf;
color:black;
}
.quoteline{
background:#636274;
}
#loading{
background:#9ba0cd;
}
.unkownfile{
background:#a69cbb;
border-color:#474555;
}
.filename{
color:#47bbff;
}
.unread{
background:#ffffff;
border-color:black;
}
.pinged{
background:red;
}
.cunread{
box-shadow: inset .024in 0 white;
}
.startreply{
background: black;
}

View file

@ -617,7 +617,9 @@ span{
.notiunread{
transform:translate(0in,.2in);
}
.h2md{font-size: .25in;}
.h2md{
font-size: .25in;
}
.pinged{
aspect-ratio : 1 / 1;
transform:translate(0in,.4in);