diff --git a/web/root/members/picktheme.ssjs b/web/root/members/picktheme.ssjs new file mode 100644 index 0000000000000000000000000000000000000000..56cb72368d685bec9ade1f79aed12ca420f6cf74 --- /dev/null +++ b/web/root/members/picktheme.ssjs @@ -0,0 +1,21 @@ +/* + * Write new theme file BEFORE loading the template lib so the + * new theme is used here + */ + +var sq="'"; +var dq='"'; +var pl='+'; +themefile=new File(system.data_dir+'user/'+format("%04d.html_theme",user.number)); +themefile.open("w",false); +ctheme=http_request.query.theme[0]; +ctheme=ctheme.replace(/"/g,dq+pl+sq+dq+sq+pl+dq); /* "+'"'+" */ +themefile.writeln('CurrTheme="'+ctheme+'";'); +themefile.close(); + +load('html_inc/template.ssjs'); +template.theme=Themes[CurrTheme]; + +write_template("header.inc"); +write_template("picktheme.inc"); +write_template("footer.inc"); diff --git a/web/root/members/themes.ssjs b/web/root/members/themes.ssjs new file mode 100644 index 0000000000000000000000000000000000000000..d5f4e77402e0abbd31d0ad7a6d16b8505f3c0005 --- /dev/null +++ b/web/root/members/themes.ssjs @@ -0,0 +1,13 @@ +load("html_inc/template.ssjs"); + +template.theme_list='<select name="theme">'; +for(tname in Themes) { + template.theme_list+='<option value="'+html_encode(tname,true,true,false,false)+'"'; + if(tname==CurrTheme) + template.theme_list+=' selected'; + template.theme_list+='>'+html_encode(Themes[tname].desc,true,true,false,false)+'</option>'; +} +template.theme_list+='</select>'; +write_template("header.inc"); +write_template("themes.inc"); +write_template("footer.inc"); diff --git a/web/root/syncblue.css b/web/root/syncblue.css new file mode 100644 index 0000000000000000000000000000000000000000..ce53d985c94d9db56aa59f4fb01065bfd065acc4 --- /dev/null +++ b/web/root/syncblue.css @@ -0,0 +1,86 @@ +a:link { color: #42C8FD; } +a:visited { color: #2CE4D8; } +a:hover { color: #ffffff; } + +body { background-color: #0080f0; color: white; font-family: Arial, Helvetica, sans-serif; } + +p.title { text-align: center; font-size: x-large; font-weight: bolder; } + +table.main { width: 90%; background-color: #117766; margin-left: auto; margin-right: auto; margin-top: 0; margin-bottom: 0; } +td.main { background-color: #0040f0; } + +table.member { width: 90%; background-color: #117766; margin-left: auto; margin-right: auto; margin-top: 0; margin-bottom: 0; } +td.member { background-color: #0040f0; } + +table.info { width: 90%; background-color: #117766; margin-left: auto; margin-right: auto; margin-top: 0; margin-bottom: 0; } +td.info { background-color: #0040f0; } + +pre { background-color: black; color: #aaaaaa; font-family: monospace; } +pre.leftalign { background-color: black; color: #aaaaaa; text-align: left; } + +table.newuser { margin-left: auto; margin-right: auto; background-color: #117766; } +td.newuser { background-color: #0040f0; } + +table.userlist { margin-left: auto; margin-right: auto; background-color: #117766; } +th.userlist { background-color: #0040f0; color: black; } +td.userlist { background-color: #0040f0; } +a.userlist { text-decoration: none; color: black; } +a.userlist:hover { text-decoration: underline; } + +table.userstats { margin-left: auto; margin-right: auto; background-color: #117766; } +td.userstats { background-color: #0040f0; } + +table.sysinfo { margin-left: auto; margin-right: auto; background-color: #117766; } +td.sysinfo { background-color: #0040f0; } + +table.grouplist { margin-left: auto; margin-right: auto; background-color: #117766; } +th.grouplist { background-color: #0040f0; color: black; } +td.grouplist { background-color: #0040f0; } + +table.sublist { margin-left: auto; margin-right: auto; background-color: #117766; } +th.sublist { background-color: #0040f0; color: black; } +th.sublistlft { text-align: left; background-color: #0040f0; color: black; } +td.sublist { background-color: #0040f0; } +td.sublistcntr { text-align: center; background-color: #0040f0; } + +table.msglist { margin-left: auto; margin-right: auto; background-color: #117766; } +tr.msglist1 { background-color: #0060f1; } +tr.msglist2 { background-color: #0040f1; } +th.msglist { background-color: #0040f0; color: black; } +a.msglistnu { text-decoration: none; } + +table.subinfo { width: 45%; margin-left: auto; margin-right: auto; background-color: #117766; } +tr.subinfo { white-space: nowrap; background-color: #0040f0; } +td.subinfbold { width: 1%; font-weight: bold; } +td.subinfo { white-space: nowrap; font-weight: bold; } +td.subinfonwr { white-space: nowrap; } + +body.msg { background-color: black; } +table.msg { color: black; margin-left: auto; margin-right: auto; background-color: #117766; } +tr.msg { background-color: #0040f0; } +td.msgnavleft { width: 25%; background-color: #0040f0; text-align: left; } +td.msgnavmid { width: 25%; text-align: center; background-color: #0040f0; } +td.msgnavright { width: 25%; background-color: #0040f0; text-align: right; } +td.msgheader { font-weight: bold; } +object.msg { margin: 0%; background-color: black; color: #aaaaaa; } +p.msgcenter { text-align: center; } + +table.postmsg { margin-left: auto; margin-right: auto; background-color: #117766; } +td.postmsg { background-color: #0040f0; } +textarea.postmsg { background-color: black; color: #aaaaaa; } +input.postmsg { background-color: black; color: #aaaaaa; } + +table.posted { margin-left: auto; margin-right: auto; background-color: #117766; } +td.posted { background-color: #0040f0; } +p.posted { text-align: center; } + +table.replymsg { margin-left: auto; margin-right: auto; background-color: #117766; } +td.replymsg { background-color: #0040f0; } +textarea.replymsg { background-color: black; color: #aaaaaa; } +input.replymsg { background-color: black; color: #aaaaaa; } + +p.navigation { text-align: center; font-style: italic; font-weight: bold; } +a.navigation { font-style: normal; font-weight: normal; } +a.navigation:hover { font-style: normal; font-weight: normal; } + + diff --git a/web/templates/default/memberindex.inc b/web/templates/default/memberindex.inc index 7512c127288d9b3f8c24f1c92abb970e2666de14..c2034efcb6fee1a808a46170a082e2817c376ae7 100644 --- a/web/templates/default/memberindex.inc +++ b/web/templates/default/memberindex.inc @@ -9,6 +9,7 @@ <a href="msgs/">Message Areas</a><br /> <a href="info.ssjs">Information menu</a><br /> <a href="@@ftplink@@">File areas</a><br /><br /> + <a href="themes.ssjs">Change your HTML theme</a><br /><br /> </td> </tr> </tbody> diff --git a/web/templates/default/picktheme.inc b/web/templates/default/picktheme.inc new file mode 100644 index 0000000000000000000000000000000000000000..2e5dc067d600e3c7ed6f211f0767ef15e285b503 --- /dev/null +++ b/web/templates/default/picktheme.inc @@ -0,0 +1 @@ +Current theme set to: %%theme:desc%% diff --git a/web/templates/default/themes.inc b/web/templates/default/themes.inc new file mode 100644 index 0000000000000000000000000000000000000000..4282d051df6036baac7174bcb6754bef98828f77 --- /dev/null +++ b/web/templates/default/themes.inc @@ -0,0 +1,4 @@ +<form action="picktheme.ssjs" method="post"> +@@theme_list@@<br> +<input type="submit" name="Select Theme" value="Select Theme"> +</form> diff --git a/web/templates/html_themes.ssjs b/web/templates/html_themes.ssjs index aa035235800051f15e9dbfc6bb3eef0b267f06a9..39a5d1ea439b0d461881f9efe108dffc7339ac0c 100644 --- a/web/templates/html_themes.ssjs +++ b/web/templates/html_themes.ssjs @@ -3,3 +3,7 @@ Themes["Default"]=new Object; Themes["Default"].desc="Default Synchronet Theme"; Themes["Default"].dir="default"; Themes["Default"].css="/synchronet.css"; +Themes["Blue"]=new Object; +Themes["Blue"].desc="Default Synchronet Theme (Blue)"; +Themes["Blue"].dir="default"; +Themes["Blue"].css="/syncblue.css";