File size: 2,892 Bytes
8b7b267
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112

<div class="sidebar">
    <button id="monitorButton" title="Real-Time System Monitor" class="fab-button">
        <span>📊</span>
    </button>
    <button id="helpButton" title="راهنما">
        <span></span>
    </button>
</div>

<div id="popup" class="popup">
    <div class="popup-content">
        <span class="close-btn">&times;</span>
        <iframe src="/static/docs/guide.html" width="100%" height="100%"></iframe>
    </div>
</div>

<style>
    .sidebar {
        position: fixed;
        top: 20%;
        right: 0;
        padding: 10px;
        background-color: #2c3e50;
        color: white;
        border-radius: 5px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        z-index: 1000;
    }
    .fab-button {
        font-size: 24px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        color: white;
        cursor: pointer;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        transition: transform 0.3s, box-shadow 0.3s;
        animation: pulse-glow 2s infinite;
    }
    .fab-button:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    }
    @keyframes pulse-glow {
        0%, 100% {
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        }
        50% {
            box-shadow: 0 4px 20px rgba(102, 126, 234, 0.7);
        }
    }
    #helpButton {
        font-size: 24px;
        background: none;
        border: none;
        color: white;
        cursor: pointer;
    }
    #popup {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
    }
    .popup-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: white;
        padding: 20px;
        width: 80%;
        height: 80%;
        overflow-y: auto;
    }
    .close-btn {
        font-size: 30px;
        color: #aaa;
        position: absolute;
        top: 10px;
        right: 20px;
        cursor: pointer;
    }
</style>

<script>
    // Monitor button - open in new window/tab
    document.getElementById("monitorButton").addEventListener("click", function() {
        window.open("/system-monitor", "_blank", "width=1400,height=900");
    });

    document.getElementById("helpButton").addEventListener("click", function() {
        document.getElementById("popup").style.display = "block";
    });

    document.querySelector(".close-btn").addEventListener("click", function() {
        document.getElementById("popup").style.display = "none";
    });
</script>