-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
146 lines (127 loc) · 3.94 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
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Share+Tech+Mono" rel="stylesheet" type="text/css">
<link href="dist/index.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="flex">
<div class="box">
<h2>Box Title</h2>
<div class="box-body">
<p>Some stuff here</p>
<p>Something with a <a href="https://www.google.com">link to google.com</a> here</p>
<p>Some stuff here</p>
<p>What about a button link? <a href="https://www.google.com" class="button primary">link to google.com</a></p>
<p>And a <mark>mark<mark> in the text</p>
<p>Some stuff here</p>
</div>
</div>
<div class="box turquoise text-dark">
<h2>Box Title</h2>
<div class="box-body">
<p>Some stuff here</p>
<p>Some stuff here</p>
<p>Some stuff here</p>
</div>
</div>
</div>
<div class="flex">
<div class="box">
<h2>Menu</h2>
<div class="box-body">
<p>Some stuff here</p>
</div>
</div>
<div class="box" style="width: 60%">
<h2>Main Content</h2>
<div class="box-body">
<p>Some stuff here</p>
</div>
</div>
</div>
<div class="box">
<h2>Form Elements</h2>
<div class="box-body">
<form>
<div class="form-control">
<label><input type="email" placeholder="Email"></label>
</div>
<div class="form-control">
<label><input type="password" placeholder="Password"></label>
</div>
<div class="form-control">
<label>
<select>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
<option>Option 4</option>
<option>Option 5</option>
<option>Option 6</option>
</select>
</label>
</div>
<div class="form-control">
<label><input type="file" placeholder="Select a File..."></label>
</div>
<div class="form-control">
<textarea placeholder="Textarea"></textarea>
</div>
<div class="form-control">
<label><button type="submit">Submit Button</button></label>
<label><input type="submit" value="Submit Input" /></label>
<label><input type="button" value="Input Button" /></label>
</div>
<div class="form-control">
<label><button type="submit" class="primary">Submit</button></label>
<label><button type="submit" class="positive">Submit</button></label>
<label><button type="reset" class="negative">Cancel</button></label>
<label><button class="turquoise">Other</button></label>
</div>
</form>
</div>
</div>
<div class="box">
<div class="box-body">
<p>This is a box without a heading</p>
</div>
</div>
<div class="box">
<h2>Progress Bar</h2>
<div class="box-body">
<div class="progress-box">
<p class="text-center">Loading Floppy Disk 1 of 4,273...</p>
<div class="progress-bar"><span style="width:70%"></div>
</div>
</div>
</div>
<div class="box">
<h2>Code Box</h2>
<div class="box-body">
<code><pre>
'use strict';
const crypto = require('crypto');
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bytes (32 characters)
const IV_LENGTH = 16; // For AES, this is always 16
function encrypt(text) {
let iv = crypto.randomBytes(IV_LENGTH);
let cipher = crypto.createCipheriv('aes-256-cbc', new Buffer(ENCRYPTION_KEY), iv);
let encrypted = cipher.update(text);
encrypted = Buffer.concat([encrypted, cipher.final()]);
return iv.toString('hex') + ':' + encrypted.toString('hex');
}
function decrypt(text) {
let textParts = text.split(':');
let iv = new Buffer(textParts.shift(), 'hex');
let encryptedText = new Buffer(textParts.join(':'), 'hex');
let decipher = crypto.createDecipheriv('aes-256-cbc', new Buffer(ENCRYPTION_KEY), iv);
let decrypted = decipher.update(encryptedText);
decrypted = Buffer.concat([decrypted, decipher.final()]);
return decrypted.toString();
}
module.exports = { decrypt, encrypt };
</pre></code>
</div>
</div>
</body>
</html>