diff --git a/img/button.png b/img/button.png new file mode 100644 index 0000000..a296adc Binary files /dev/null and b/img/button.png differ diff --git a/img/button.xcf b/img/button.xcf new file mode 100644 index 0000000..3d5f7cb Binary files /dev/null and b/img/button.xcf differ diff --git a/img/button_long.png b/img/button_long.png new file mode 100644 index 0000000..a03a057 Binary files /dev/null and b/img/button_long.png differ diff --git a/img/button_long.xcf b/img/button_long.xcf new file mode 100644 index 0000000..04b1db9 Binary files /dev/null and b/img/button_long.xcf differ diff --git a/index.php b/index.php index 34af5e9..539ecb5 100644 --- a/index.php +++ b/index.php @@ -61,13 +61,24 @@ if (!isset($_SESSION['modname']) || (!file_exists(APP_DB)) || (!file_exists($_SE } else { PDO_Connect("sqlite:" . APP_DB); - $sql = "SELECT * FROM D2Modder ORDER BY lastused LIMIT 1"; + $sql = "SELECT * FROM D2Modder ORDER BY lastused LIMIT 1"; $lastUsedMod = PDO_FetchRow($sql); $_SESSION['modname'] = $lastUsedMod['modname']; $_SESSION['path'] = $lastUsedMod['path']; + $sql = "SELECT theme FROM `D2Modder` WHERE `modname`='{$_SESSION['modname']}'"; + $res = PDO_FetchAll($sql); + + if($res[0]['theme'] == 1) { + $css = 'dark.css'; + } else { + $css = ''; + } + + + define('FILTER_PROPERTIES_FILE', 'filterProperties.txt'); define('DB_FILE', $_SESSION['modname'] . ".db"); define('TXT_PATH', $_SESSION['path']); diff --git a/res/app.js b/res/app.js index 74419c0..e8fae16 100644 --- a/res/app.js +++ b/res/app.js @@ -169,7 +169,20 @@ $(document).ready(function () { searchbox.addEventListener('input', search); - + $('input[name="theme"]').change(function(){ + modname = $('input[name="modname"]').val(); + $.get("/res/css.php?theme="+this.value+"&modname="+modname, function(data){ + location.reload(); + }); + + +// $('body').toggleClass("body-dark"); +// $('.container-top').toggleClass("container-top-dark"); +// $('input').toggleClass("input-dark"); +// $('select').toggleClass("select-dark"); +// $('option').toggleClass("option-dark"); +// $('.col-2,.col-3,.col-4').attr({"style":""}); + }); }); \ No newline at end of file diff --git a/res/css.php b/res/css.php new file mode 100644 index 0000000..6e1ab84 --- /dev/null +++ b/res/css.php @@ -0,0 +1,56 @@ + p { @@ -135,13 +135,9 @@ h1,h2,h3,h4,h5,h6, div > p { } select { - font-size: 18px; - border: 1px solid #CCC; - height: 34px; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - background: url(https://stackoverflow.com/favicon.ico) 96% / 15% no-repeat #EEE; + font-size: 18px; + border: 1px solid #CCC; + height: 34px; } @@ -161,6 +157,10 @@ select::-ms-expand { } option { - -webkit-appearance: none; - -moz-appearance: none; + -webkit-appearance: none; + -moz-appearance: none; +} + +.props input { + margin: 15px 0; } \ No newline at end of file diff --git a/src/D2Config.php b/src/D2Config.php index b01cf30..2870080 100644 --- a/src/D2Config.php +++ b/src/D2Config.php @@ -61,7 +61,8 @@ if (!empty($_POST)) { $sql = "CREATE TABLE IF NOT EXISTS D2Modder ( modname VARCHAR(255), path VARCHAR(255), - lastused INT + lastused INT, + theme INT )"; PDO_Execute($sql); @@ -90,7 +91,8 @@ ERROR: INVALID PATH'; $sql = "CREATE TABLE IF NOT EXISTS D2Modder ( modname VARCHAR(255), path VARCHAR(255), - lastused INT + lastused INT, + theme INT )"; PDO_Execute($sql); diff --git a/src/footer.php b/src/footer.php index bae106d..8b210ef 100644 --- a/src/footer.php +++ b/src/footer.php @@ -1,11 +1,24 @@
-
-
+
+
Setup New Mod Switch Mods +

+
+ + +
+
+ + +
+ + +
+ + Theme
-
-
+
-
- Sort By: +
+

Sort By:

@@ -33,10 +33,8 @@
-
- -
- View Only: +
+

View Only:

@@ -79,15 +77,15 @@

Version:

- +
- +
- +

@@ -98,11 +96,11 @@

Enabled:

- +
- +

@@ -114,11 +112,11 @@

Ladder:

- +
- +

@@ -228,7 +226,7 @@
-
+

CostAdd

@@ -236,14 +234,13 @@
-
+

CharTransform

ChrTransform: palette shift to apply to the the DCC component-file and the DC6 flippy-file (whenever or not the color shift will apply is determined by Weapons.txt, Armor.txt or Misc.txt). This is an ID pointer from Colors.txt.
-
-
+

InvTransform

@@ -290,7 +287,7 @@ UseSound: overrides the usesound (the sound played when the item is consumed by the player) specified in Weapons.txt, Armor.txt or Misc.txt for the base item. This field contains an ID pointer from Sounds.txt.
-
+
-
- +
\ No newline at end of file