-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
361 lines (311 loc) · 9.77 KB
/
Copy pathindex.html
File metadata and controls
361 lines (311 loc) · 9.77 KB
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>HR Action Sanity Check</title>
<meta name="description" content="A quick, private confidence check for everyday people-management decisions. Runs locally. No data stored." />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
:root{
--bg:#020617;
--panel:#071428;
--text:#f8fafc;
--muted:#9aa5b1;
--accent:#22c1ff;
--good:#34d399;
--warn:#fbbf24;
--risk:#fb7185;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
margin:0;
font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial;
background:linear-gradient(180deg,#020617 0%, #071026 100%);
color:var(--text);
display:flex;
justify-content:center;
padding:18px;
}
.wrap{width:100%;max-width:900px}
.card{
background:linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01));
border-radius:18px;
padding:28px;
border:1px solid rgba(255,255,255,0.06);
box-shadow:0 18px 40px rgba(2,6,23,0.7);
}
header{
display:flex;
gap:16px;
align-items:center;
padding-bottom:18px;
border-bottom:1px solid rgba(255,255,255,0.06);
margin-bottom:22px;
}
.logo{
width:56px;height:56px;
border-radius:14px;
background:linear-gradient(135deg,var(--accent),#6ee7b7);
display:flex;
align-items:center;
justify-content:center;
font-weight:700;
font-size:20px;
color:#02111a;
}
h1{margin:0;font-size:1.45rem}
.lead{margin-top:6px;color:var(--muted);font-size:0.95rem}
.section-title{
font-size:0.82rem;
letter-spacing:0.06em;
text-transform:uppercase;
color:var(--muted);
margin-bottom:10px;
}
/* ===== Scenario cards (FINAL) ===== */
.grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
gap:14px;
margin-bottom:26px;
}
.option{
display:flex;
align-items:center;
justify-content:center;
gap:10px;
padding:18px;
border-radius:14px;
background:rgba(255,255,255,0.045);
border:1px solid rgba(255,255,255,0.12);
font-size:0.95rem;
font-weight:600;
letter-spacing:0.01em;
color:#f8fafc;
cursor:pointer;
box-shadow:
inset 0 1px 0 rgba(255,255,255,0.05),
0 8px 22px rgba(2,6,23,0.65);
transition:
transform .15s ease,
box-shadow .15s ease,
background .15s ease,
border .15s ease;
}
.option:hover{
transform:translateY(-3px);
box-shadow:0 14px 30px rgba(2,6,23,0.7);
}
.option.active{
background:linear-gradient(
135deg,
rgba(34,193,255,0.25),
rgba(110,231,183,0.18)
);
border-color:rgba(34,193,255,0.65);
color:#ffffff;
}
/* ===== Questions ===== */
.q{
display:flex;
justify-content:space-between;
gap:14px;
padding:14px;
border-radius:12px;
background:rgba(255,255,255,0.025);
border:1px solid rgba(255,255,255,0.06);
margin-bottom:12px;
transition:background .2s ease,border .2s ease;
}
.q.yes{
background:rgba(52,211,153,0.07);
border-color:rgba(52,211,153,0.35);
}
.q.no{
background:rgba(251,113,133,0.07);
border-color:rgba(251,113,133,0.35);
}
.q-text{flex:1;font-size:0.95rem}
.q-actions{display:flex;gap:8px}
.btn{
padding:8px 16px;
border-radius:999px;
border:1px solid rgba(255,255,255,0.1);
background:transparent;
color:var(--text);
cursor:pointer;
font-weight:600;
font-size:0.85rem;
min-width:64px;
}
.btn.active{
background:var(--accent);
color:#02111a;
border-color:var(--accent);
}
/* ===== Result ===== */
.result{
display:none;
padding:18px;
border-radius:14px;
margin-top:18px;
line-height:1.45;
}
.result.good{background:rgba(52,211,153,0.14);color:var(--good)}
.result.warn{background:rgba(251,191,36,0.14);color:var(--warn)}
.result.risk{background:rgba(251,113,133,0.14);color:var(--risk)}
.meta{
margin-top:18px;
font-size:0.85rem;
color:var(--muted);
}
footer{
margin-top:18px;
text-align:center;
font-size:0.8rem;
color:var(--muted);
}
@media(max-width:480px){
header{flex-direction:column;align-items:flex-start}
.logo{width:48px;height:48px;font-size:18px}
h1{font-size:1.25rem}
.q{flex-direction:column}
.q-actions{width:100%;justify-content:space-between}
}
</style>
</head>
<body>
<div class="wrap">
<div class="card">
<header>
<div class="logo">HR✓</div>
<div>
<h1>HR Action Sanity Check</h1>
<p class="lead">A calm confidence check for everyday people-management decisions. Runs locally. No data stored.</p>
</div>
</header>
<div class="section-title">What situation are you dealing with?</div>
<div id="scenarios" class="grid"></div>
<div class="section-title">Consider the following</div>
<div id="questions"></div>
<div id="result" class="result"></div>
<div class="meta">
Tip: Answer honestly. If facts change, re-run this check.
</div>
<footer>
General guidance only — not legal advice.<br>
Designed to support everyday people decisions. Built by Samir Saad.
</footer>
</div>
</div>
<script>
const ICONS={
"Performance Decline":"📉",
"Attendance Issue":"⏰",
"Interpersonal Conflict":"🤝",
"Policy Violation":"⚠️",
"Termination Consideration":"🚪"
};
const SCENARIOS={
"Performance Decline":[
"Have expectations been clearly communicated?",
"Has this issue been documented previously?",
"Has the employee been given a chance to respond?",
"Is the decline consistent over time?",
"Are there known leave or accommodation factors?"
],
"Attendance Issue":[
"Is there a clear attendance policy?",
"Has this happened more than once?",
"Was the employee notified of the issue?",
"Is there protected leave involved?",
"Is documentation up to date?"
],
"Interpersonal Conflict":[
"Have you verified facts with multiple perspectives?",
"Have all impacted employees been heard?",
"Is the behavior materially affecting work?",
"Are there prior related incidents?",
"Is this escalating?"
],
"Policy Violation":[
"Is the policy clear and accessible?",
"Has it been applied consistently?",
"Would the employee reasonably know the policy?",
"Is this a first offense?",
"Are there mitigating circumstances?"
],
"Termination Consideration":[
"Has progressive documentation been provided?",
"Was the employee given opportunity to improve?",
"Are you following written process?",
"Is there legal or protected-leave exposure?",
"Has HR/legal been consulted if required?"
]
};
const scenariosEl=document.getElementById('scenarios');
const questionsEl=document.getElementById('questions');
const resultEl=document.getElementById('result');
Object.keys(SCENARIOS).forEach(name=>{
const btn=document.createElement('button');
btn.className='option';
btn.innerText=`${ICONS[name]} ${name}`;
btn.onclick=()=>selectScenario(name,btn);
scenariosEl.appendChild(btn);
});
let currentAnswers=[],currentQs=[];
function selectScenario(name,el){
document.querySelectorAll('.option').forEach(o=>o.classList.remove('active'));
el.classList.add('active');
questionsEl.innerHTML='';
resultEl.style.display='none';
resultEl.className='result';
currentQs=SCENARIOS[name];
currentAnswers=new Array(currentQs.length).fill(null);
currentQs.forEach((q,idx)=>{
const row=document.createElement('div');
row.className='q';
const text=document.createElement('div');
text.className='q-text';
text.innerText=`${idx+1}. ${q}`;
const actions=document.createElement('div');
actions.className='q-actions';
["Yes","No"].forEach(val=>{
const b=document.createElement('button');
b.className='btn';
b.innerText=val;
b.onclick=()=>{
currentAnswers[idx]=val;
row.classList.toggle('yes',val==="Yes");
row.classList.toggle('no',val==="No");
Array.from(actions.children).forEach(c=>c.classList.remove('active'));
b.classList.add('active');
evaluate();
};
actions.appendChild(b);
});
row.append(text,actions);
questionsEl.appendChild(row);
});
}
function evaluate(){
if(currentAnswers.includes(null)) return;
const noCount=currentAnswers.filter(a=>a==="No").length;
resultEl.style.display='block';
if(noCount<=1){
resultEl.className='result good';
resultEl.innerHTML='<strong>Assessment:</strong><br>Routine management action. Proceed thoughtfully and document the steps.';
}else if(noCount<=3){
resultEl.className='result warn';
resultEl.innerHTML='<strong>Assessment:</strong><br>Elevated risk. Pause, clarify facts, and document before acting.';
}else{
resultEl.className='result risk';
resultEl.innerHTML='<strong>Assessment:</strong><br>High risk. Additional HR or legal review recommended.';
}
}
document.querySelector('.option')?.click();
</script>
</body>
</html>