-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
176 lines (174 loc) · 7.09 KB
/
index.html
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="assets/favicon.png">
<title>OverGrowl by RogueSignal.io</title>
<style id="page_style">
body{
background: #000000;
background-repeat: repeat;
background-image: url('./assets/roguesignal_bg_green.png');
background-size: 40%;
font-family: Tahoma, sans-serif;
}
pre{
font-size:11px;
}
li{
font-size:11px;
}
a{
color: #000000;
}
button{
margin:3px;
padding: 4px;
cursor: pointer;
color: #9bae6b;
background-color: #2b3e2b88;
border-color: #4b5e4b88;
border-radius: 5px;
}
.details {
position: relative;
z-index: 1;
padding: 2px;
letter-spacing: 1px;
color: #00000088;
}
.modal {
background-color: #dbfedb33;
color: #fff;
border-radius: 15px;
padding: 2px;
}
.shadow {
box-shadow: 3px 3px 10px 4px rgba(0, 0, 0, 0.9);
}
</style>
<script src="over_growl.js"></script>
<script>
var ogrowler,ogrowler2,overgrowler3
document.addEventListener("DOMContentLoaded", () => {
ogrowler = new OverGrowl({type_config: { error: { duration: 0, close_button:true }}});
ogrowler3 = new OverGrowl({public: 'growler3', duration:0,});
ogrowler2 = new OverGrowl({public: 'growler2', unique: false, close_button: true, duration: 0, fade: 0, inline:false,
offset_x: 0,
css:`
#growler2-parent{
grid-row-gap: 1px;
opacity: 1;
background-color: #00000077;
border-radius: 15px;
left: 10px;
width: 300px;
}
.growler2-notice{
padding: 4px 0px 0px 0px;
border-width: 0px;
}
.growler2-notice>p{
font-size: 14px;
font-family: 'Brush Script MT', cursive;
font-weight: 400;
user-select: all;
cursor: copy;
}
`});
})
function add_think1(growly) {
window[growly].add_type('thinking',`
border-color: rgb(60, 60, 80);
background-color: #000000;
color: #DDDDDD;
`,`
width: 30px;
height: 30px;
background-image: url('./assets/overgrowl-gear.png');
background-size: cover;
`)
window[growly].success('Added "thinking" style to ' + growly + ' growler instance that will operate in the same display panel with different styles')
}
function add_think2(growly) {
window[growly].add_type('thinking',`
border-color: rgb(60, 60, 120);
background-color: #000030;
color: #DDDDFF;
`,`
background-image: url('./assets/overgrowl-gear.png');
background-size: cover;
`)
window[growly].success('Added "thinking" style to ' + growly + ' growler instance that will operate in the same display panel with different styles')
}
function change_css(growly) {
var obj = window[growly]
var outcss = `
.${obj.name}-notice {
border-width: 4px;
border-style: solid;
border-radius: 15px;
border-color: #667799;
background-color: #000000;
color: #7788AA;
}
`
obj.append_css(outcss);
}
var long_text = ''
+ '“You open the gates of the soul to let the dark flood of chaos flow into your order and meaning. If you marry the ordered to the chaos you produce the divine child, the supreme meaning beyond meaning and meaninglessness.”'
+ '<br>― C.G. Jung, The Red Book';
</script>
</head>
<body class="app">
<div class="grid">
<div class="item shadow modal">
<div class="details">
OverGrowl by <a href="http://www.roguesignal.io" target="_BLANK_">RogueSignal.IO</a><br>
MD5 Lib by <a href="https://github.com/blueimp/JavaScript-MD5" target="_BLANK_">blueimp</a><br><br>
Simple, clean and flexible Growler component.<br>
<ul>
<li> Default images and style all embedded in one JS file.
<li> Timing options & programmatic style overrides.
<li> Expand with new types beyond alert,error,info,success,system, and basic.
<li> Prevents (by default) duplication of messages in view.
<li> HTML content enabled. Text auto select for copy.
<li> Close on panel, close X button and/or timed close
</ul>
<button onclick="ogrowler.success('Well done, you won!');">Success</button>
<button onclick="ogrowler.info('We are here to inform you of important stuff.');">Info</button>
<button onclick="ogrowler.system('System going down for maintenance');">System</button>
<button onclick="ogrowler.alert('This is an alert');">Alert</button>
<button onclick="ogrowler.error('OMG! <span style=color:#FF0000;>Bad things!</span> Bad things! This error is unique and will not timeout.');">Error</button>
<button onclick="ogrowler.growl_type(null,'No style here, baby!');">No Style</button>
<br>
<button onclick="change_css('ogrowler'); ogrowler.growl_type(null,'New style here, baby!');">Change Style</button>
<button onclick="ogrowler.reset_css(); ogrowler.growl_type(null,'Old style here, baby!');">Reset Style</button>
<br>
<button onclick="ogrowler.info(long_text,{ duration: 9000});">Long text + custom duration</button>
<button onclick="ogrowler2.system('System going down for maintenance ... fast!');">NoUnique,NoFade,NoTimeout,CloseButton,CSS</button>
<br>
<button onclick="add_think1('ogrowler');">New "thinking" type w/style.</button> ➔➔
<button onclick="ogrowler.growl_type('thinking','Dave, I was thinking ... ',{ close_button: true });">Thinking (Safe)</button>
<button onclick="ogrowler.thinking('Dave? Can you hear me, Dave?',{ close_button: true });">Thinking (Unsafe)</button>
<br>
<button onclick="add_think2('ogrowler3');">New "thinking" type on 2nd instance.</button> ➔➔
<button onclick="ogrowler3.growl_type('thinking','Dave, I was thinking ... ',{ close_button: true });">Thinking (Safe)</button>
<button onclick="ogrowler3.thinking('Dave? Can you hear me, Dave?',{ close_button: true });">Thinking (Unsafe)</button>
<pre style="overflow:auto;width:100%;">
Basic Use:
var over_growler
document.addEventListener("DOMContentLoaded", () => {
over_growler = new OverGrowl();
over_growler.error('As an object method')
})
...
See <a href="https://github.com/roboyeti/overgrowl" target="_BLANK_">Git Project</a> for more.
</pre>
</div>
</div>
</div>
</body>
</html>