File: modal-container.html

package info (click to toggle)
wpewebkit 2.38.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 311,508 kB
  • sloc: cpp: 2,653,313; javascript: 289,013; ansic: 121,268; xml: 64,149; python: 35,534; ruby: 17,287; perl: 15,877; asm: 11,072; yacc: 2,326; sh: 1,863; lex: 1,319; java: 937; makefile: 146; pascal: 60
file content (98 lines) | stat: -rw-r--r-- 2,027 bytes parent folder | download | duplicates (3)
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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body, html {
    margin: 0;
    background-color: #EFEFEF;
    font-family: system-ui;
}

button {
    padding: 6px;
    border-radius: 6px;
    appearance: none;
    white-space: normal;
    width: auto;
    margin: 4px;
    border: none;
    font-size: 1em;
    cursor: pointer;
}

#neutral {
    color: rgb(88, 86, 214);
    background-color: rgba(88, 86, 214, 0.1);
}

#negative {
    color: rgb(255, 59, 48);
    background-color: rgba(255, 59, 48, 0.1);
}

#positive {
    color: rgb(76, 217, 100);
    background-color: rgba(76, 217, 100, 0.1);
}

#fixed {
    width: calc(min(300px, 80%));
    bottom: 10px;
    left: 10px;
    position: fixed;
    background-color: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 1px 1px 2px 2px #CCC;
}

#fixed > p {
    font-size: 14px;
}

#fixed > h4 {
    font-size: 16px;
    margin-top: 6px;
}

#fixed-controls {
    font-size: 16px;
    margin-bottom: 1em;
    text-align: center;
}

#result {
    font-size: 16px;
    font-weight: bold;
    font-family: monospace;
}
</style>
<script>
if (window.internals)
    internals.overrideModalContainerSearchTermForTesting("hello world");

addEventListener("DOMContentLoaded", event => {
    [negative, positive, neutral].forEach(control => {
        control.addEventListener("click", () => {
            fixed.remove();
            result.textContent = `Clicked on "${control.textContent}"`;
        });
    });
});
</script>
</head>
<body>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
<div id="fixed">
    <h4><span>This is a test</span></h4>
    <p>Hello world</p>
    <div class="fixed-controls">
        <button id="positive">Yes</button>
        <button id="negative">No</button>
        <button id="neutral">Maybe</button>
    </div>
</div>
<div id="result"><br></div>
</body>
</html>