Sebastiankay commited on
Commit
4396926
·
1 Parent(s): a618ce5

28. Sept. 2024, 12:07

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. custom.css +53 -0
app.py CHANGED
@@ -289,7 +289,7 @@ with gr.Blocks(theme=theme, css="custom.css", js="javascript.js") as demo:
289
  with gr.Row():
290
  with gr.Column():
291
  preprocessor_name = gr.Radio(label="Preprocessor", show_label=False, choices=["Lineart", "Lineart Coarse", "Lineart Anime"], type="value", value="Lineart")
292
- invert = gr.Checkbox(label="Invert", value=True)
293
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
294
  run_btn_lineart = gr.Button("Run")
295
 
 
289
  with gr.Row():
290
  with gr.Column():
291
  preprocessor_name = gr.Radio(label="Preprocessor", show_label=False, choices=["Lineart", "Lineart Coarse", "Lineart Anime"], type="value", value="Lineart")
292
+ invert = gr.Checkbox(label="Invertiert", value=True)
293
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
294
  run_btn_lineart = gr.Button("Run")
295
 
custom.css CHANGED
@@ -33,4 +33,57 @@ div.tabs div.tabitem {
33
  .top-description h1 {
34
  color: var(--neutral-400);
35
  font-size: 2rem;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  }
 
33
  .top-description h1 {
34
  color: var(--neutral-400);
35
  font-size: 2rem;
36
+ }
37
+
38
+ /* MARK: Toggle Button Checkbox */
39
+ /* INFO: gr.Checkbox elem_classes".toggle-btn" */
40
+
41
+ .toggle-btn {
42
+ &>label {
43
+ position: relative;
44
+ width: 57px;
45
+ height: 27px;
46
+ display: inline-block;
47
+ border-radius: var(--radius-xxl);
48
+ background: var(--neutral-700);
49
+ box-shadow: var(--shadow-inset);
50
+ transition: background-color .3s, cursor .3s;
51
+ border: solid .4px var(--border-color-primary);
52
+ cursor: pointer;
53
+
54
+ &>input[type="checkbox"] {
55
+ width: 0;
56
+ height: 0;
57
+ opacity: 0;
58
+ }
59
+
60
+ &>span {
61
+ position: absolute;
62
+ left: 60px;
63
+ height: 27px;
64
+ line-height: 27px;
65
+ }
66
+ }
67
+
68
+ &>label:has(input[type="checkbox"])::after {
69
+ content: "";
70
+ position: absolute;
71
+ top: 0;
72
+ left: 0;
73
+ width: 26px;
74
+ height: 26px;
75
+ border: 2px solid var(--neutral-700);
76
+ border-radius: 50%;
77
+ background: var(--neutral-900);
78
+ box-shadow: var(--shadow-inset);
79
+ transition: left .2s ease-in-out, background .2s ease-in-out;
80
+
81
+ }
82
+
83
+ &>label:has(input[type="checkbox"]:checked)::after {
84
+ content: "";
85
+ position: absolute;
86
+ background: var(--primary-600);
87
+ left: 33px;
88
+ }
89
  }