monra commited on
Commit
3aa7f71
1 Parent(s): 35716ec

Modifies the position & style of the switch site theme button

Browse files
client/css/style.css CHANGED
@@ -14,3 +14,4 @@
14
  @import "./field.css";
15
  @import "./select.css";
16
  @import "./options.css";
 
 
14
  @import "./field.css";
15
  @import "./select.css";
16
  @import "./options.css";
17
+ @import "./theme-toggler.css";
client/css/theme-toggler.css ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .theme-toggler-container {
2
+ margin: 24px 0px 8px 0px;
3
+ justify-content: center;
4
+ }
5
+
6
+ .theme-toggler-container.checkbox input + label,
7
+ .theme-toggler-container.checkbox input:checked + label:after {
8
+ background: var(--colour-1);
9
+ }
10
+
11
+ .theme-toggler-container.checkbox input + label:after,
12
+ .theme-toggler-container.checkbox input:checked + label {
13
+ background: var(--colour-3);
14
+ }
15
+
16
+ .theme-toggler-container.checkbox span {
17
+ font-size: 0.75rem;
18
+ }
19
+
20
+ .theme-toggler-container.checkbox label {
21
+ width: 24px;
22
+ height: 16px;
23
+ }
24
+
25
+ .theme-toggler-container.checkbox label:after {
26
+ left: 2px;
27
+ width: 10px;
28
+ height: 10px;
29
+ }
30
+
31
+ .theme-toggler-container.checkbox input:checked + label:after {
32
+ left: calc(100% - 2px - 10px);
33
+ }
client/html/index.html CHANGED
@@ -37,11 +37,15 @@
37
  <i class="fa-regular fa-trash"></i>
38
  <span>Clear Conversations</span>
39
  </button>
 
 
 
 
 
40
  <a class="info" href="https://github.com/ramonvc/gptfree-jailbreak-webui" target="_blank">
41
  <i class="fa-brands fa-github"></i>
42
  <span class="conversation-title">
43
- Author: @ramonvc<br />
44
- Version: 0.0.9-Alpha<br />
45
  </span>
46
  </a>
47
  </div>
@@ -74,7 +78,9 @@
74
  <option value="gpt-3.5-turbo">GPT-3.5</option>
75
  <option value="gpt-3.5-turbo-0613">GPT-3.5-0613</option>
76
  <option value="gpt-3.5-turbo-16k">GPT-3.5-turbo-16k</option>
77
- <option value="gpt-3.5-turbo-16k-0613" selected>GPT-3.5-turbo-16k-0613</option>
 
 
78
  <option value="gpt-4" disabled>GPT-4 (offline)</option>
79
  </select>
80
  </div>
@@ -91,11 +97,6 @@
91
  <label for="switch"></label>
92
  <span>Web Access</span>
93
  </div>
94
- <div class="field checkbox">
95
- <input type="checkbox" id="theme-toggler" />
96
- <label for="theme-toggler"></label>
97
- <span>Light Mode</span>
98
- </div>
99
  </div>
100
  </div>
101
  </div>
 
37
  <i class="fa-regular fa-trash"></i>
38
  <span>Clear Conversations</span>
39
  </button>
40
+ <div class="field checkbox theme-toggler-container">
41
+ <input type="checkbox" id="theme-toggler" />
42
+ <label for="theme-toggler"></label>
43
+ <span>Dark Mode</span>
44
+ </div>
45
  <a class="info" href="https://github.com/ramonvc/gptfree-jailbreak-webui" target="_blank">
46
  <i class="fa-brands fa-github"></i>
47
  <span class="conversation-title">
48
+ Version: 0.0.9-Alpha
 
49
  </span>
50
  </a>
51
  </div>
 
78
  <option value="gpt-3.5-turbo">GPT-3.5</option>
79
  <option value="gpt-3.5-turbo-0613">GPT-3.5-0613</option>
80
  <option value="gpt-3.5-turbo-16k">GPT-3.5-turbo-16k</option>
81
+ <option value="gpt-3.5-turbo-16k-0613" selected>
82
+ GPT-3.5-turbo-16k-0613
83
+ </option>
84
  <option value="gpt-4" disabled>GPT-4 (offline)</option>
85
  </select>
86
  </div>
 
97
  <label for="switch"></label>
98
  <span>Web Access</span>
99
  </div>
 
 
 
 
 
100
  </div>
101
  </div>
102
  </div>
client/js/theme-toggler.js CHANGED
@@ -12,11 +12,11 @@ function toggleTheme() {
12
  var newTheme = currentTheme === "theme-dark" ? "theme-light" : "theme-dark";
13
 
14
  setTheme(newTheme);
15
- switch_theme_toggler.checked = newTheme === "theme-light";
16
  }
17
 
18
  (function () {
19
  var currentTheme = localStorage.getItem("theme") || "theme-dark";
20
  setTheme(currentTheme);
21
- switch_theme_toggler.checked = currentTheme === "theme-light";
22
  })();
 
12
  var newTheme = currentTheme === "theme-dark" ? "theme-light" : "theme-dark";
13
 
14
  setTheme(newTheme);
15
+ switch_theme_toggler.checked = newTheme === "theme-dark";
16
  }
17
 
18
  (function () {
19
  var currentTheme = localStorage.getItem("theme") || "theme-dark";
20
  setTheme(currentTheme);
21
+ switch_theme_toggler.checked = currentTheme === "theme-dark";
22
  })();