File size: 1,518 Bytes
0069385
 
 
a7ac613
0069385
 
 
 
 
 
 
 
 
 
a7ac613
0069385
 
 
 
 
 
 
 
a7ac613
0069385
931b9d8
0069385
 
 
 
 
 
a7ac613
0069385
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d51fd39
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
head="""
    <script>
           function open_control() {
                var panel = document.querySelector('#gs_control_panel');

                var split_json = []
                var out_json = []
                split_json = panel.classList.value.split(' ')

                console.log(split_json.length)
                if (split_json.length === 2 || panel.classList.value.includes("  ")) {
                panel.classList.toggle('open');
                console.log('clicked')
                } else {
                panel.classList = '.contain #gs_control_panel'
                console.log('panel is open, closing')

                };
                };

        </script>
      """ 
css="""
.contain #gs_control_panel {
    position: fixed;
    right: 110%;
    z-index: 9999;
    width: 40%;
    top: 50px;
    box-shadow: 0 0 12px 0px black;
    transition: right 0.5s ease;
    }
.contain #gs_control_panel.open {
    right: 60%;
    }
#top_bar {
    height: 50px;
    width: 100%;
    position: fixed;
    background: #185991;
    top: 0px;
    left: 0px;
    z-index: 99999;
    }
#control_btn {
    height: 20px;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    color: white;
    position: fixed;
    z-index: 9999999999999999;
    top: 5px;
    left: 10px;
    background: #1e293b;
    height: fit-content;
    width: fit-content; 
}
  """
topbar="""<div id='top_bar'><div class='control_btn' name='control_btn' id='control_btn' onclick='open_control()'>Controls</div></div>"""