Showing
27 changed files
with
132 additions
and
241 deletions
This diff could not be displayed because it is too large.
public/javascripts/bootstrap.bundle.js.map
0 → 100644
This diff could not be displayed because it is too large.
public/javascripts/bootstrap.bundle.min.js
0 → 100644
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
public/javascripts/bootstrap.esm.js
deleted
100644 → 0
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
public/javascripts/bootstrap.js.map
0 → 100644
This diff could not be displayed because it is too large.
public/javascripts/bootstrap.min.js
0 → 100644
This diff is collapsed. Click to expand it.
public/javascripts/bootstrap.min.js.map
0 → 100644
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
public/stylesheets/bootstrap-grid.css.map
0 → 100644
This diff could not be displayed because it is too large.
public/stylesheets/bootstrap-grid.min.css
0 → 100644
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
1 | /*! | 1 | /*! |
2 | - * Bootstrap Reboot v5.0.0-alpha1 (https://getbootstrap.com/) | 2 | + * Bootstrap Reboot v4.4.1 (https://getbootstrap.com/) |
3 | - * Copyright 2011-2020 The Bootstrap Authors | 3 | + * Copyright 2011-2019 The Bootstrap Authors |
4 | - * Copyright 2011-2020 Twitter, Inc. | 4 | + * Copyright 2011-2019 Twitter, Inc. |
5 | - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | 5 | + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) |
6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) | 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) |
7 | */ | 7 | */ |
8 | *, | 8 | *, |
... | @@ -11,16 +11,26 @@ | ... | @@ -11,16 +11,26 @@ |
11 | box-sizing: border-box; | 11 | box-sizing: border-box; |
12 | } | 12 | } |
13 | 13 | ||
14 | +html { | ||
15 | + font-family: sans-serif; | ||
16 | + line-height: 1.15; | ||
17 | + -webkit-text-size-adjust: 100%; | ||
18 | + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); | ||
19 | +} | ||
20 | + | ||
21 | +article, aside, figcaption, figure, footer, header, hgroup, main, nav, section { | ||
22 | + display: block; | ||
23 | +} | ||
24 | + | ||
14 | body { | 25 | body { |
15 | margin: 0; | 26 | margin: 0; |
16 | - font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; | 27 | + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; |
17 | font-size: 1rem; | 28 | font-size: 1rem; |
18 | font-weight: 400; | 29 | font-weight: 400; |
19 | line-height: 1.5; | 30 | line-height: 1.5; |
20 | color: #212529; | 31 | color: #212529; |
32 | + text-align: left; | ||
21 | background-color: #fff; | 33 | background-color: #fff; |
22 | - -webkit-text-size-adjust: 100%; | ||
23 | - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); | ||
24 | } | 34 | } |
25 | 35 | ||
26 | [tabindex="-1"]:focus:not(:focus-visible) { | 36 | [tabindex="-1"]:focus:not(:focus-visible) { |
... | @@ -28,70 +38,14 @@ body { | ... | @@ -28,70 +38,14 @@ body { |
28 | } | 38 | } |
29 | 39 | ||
30 | hr { | 40 | hr { |
31 | - margin: 1rem 0; | 41 | + box-sizing: content-box; |
32 | - color: inherit; | 42 | + height: 0; |
33 | - background-color: currentColor; | 43 | + overflow: visible; |
34 | - border: 0; | ||
35 | - opacity: 0.25; | ||
36 | -} | ||
37 | - | ||
38 | -hr:not([size]) { | ||
39 | - height: 1px; | ||
40 | } | 44 | } |
41 | 45 | ||
42 | h1, h2, h3, h4, h5, h6 { | 46 | h1, h2, h3, h4, h5, h6 { |
43 | margin-top: 0; | 47 | margin-top: 0; |
44 | margin-bottom: 0.5rem; | 48 | margin-bottom: 0.5rem; |
45 | - font-weight: 500; | ||
46 | - line-height: 1.2; | ||
47 | -} | ||
48 | - | ||
49 | -h1 { | ||
50 | - font-size: calc(1.375rem + 1.5vw); | ||
51 | -} | ||
52 | - | ||
53 | -@media (min-width: 1200px) { | ||
54 | - h1 { | ||
55 | - font-size: 2.5rem; | ||
56 | - } | ||
57 | -} | ||
58 | - | ||
59 | -h2 { | ||
60 | - font-size: calc(1.325rem + 0.9vw); | ||
61 | -} | ||
62 | - | ||
63 | -@media (min-width: 1200px) { | ||
64 | - h2 { | ||
65 | - font-size: 2rem; | ||
66 | - } | ||
67 | -} | ||
68 | - | ||
69 | -h3 { | ||
70 | - font-size: calc(1.3rem + 0.6vw); | ||
71 | -} | ||
72 | - | ||
73 | -@media (min-width: 1200px) { | ||
74 | - h3 { | ||
75 | - font-size: 1.75rem; | ||
76 | - } | ||
77 | -} | ||
78 | - | ||
79 | -h4 { | ||
80 | - font-size: calc(1.275rem + 0.3vw); | ||
81 | -} | ||
82 | - | ||
83 | -@media (min-width: 1200px) { | ||
84 | - h4 { | ||
85 | - font-size: 1.5rem; | ||
86 | - } | ||
87 | -} | ||
88 | - | ||
89 | -h5 { | ||
90 | - font-size: 1.25rem; | ||
91 | -} | ||
92 | - | ||
93 | -h6 { | ||
94 | - font-size: 1rem; | ||
95 | } | 49 | } |
96 | 50 | ||
97 | p { | 51 | p { |
... | @@ -105,6 +59,7 @@ abbr[data-original-title] { | ... | @@ -105,6 +59,7 @@ abbr[data-original-title] { |
105 | -webkit-text-decoration: underline dotted; | 59 | -webkit-text-decoration: underline dotted; |
106 | text-decoration: underline dotted; | 60 | text-decoration: underline dotted; |
107 | cursor: help; | 61 | cursor: help; |
62 | + border-bottom: 0; | ||
108 | -webkit-text-decoration-skip-ink: none; | 63 | -webkit-text-decoration-skip-ink: none; |
109 | text-decoration-skip-ink: none; | 64 | text-decoration-skip-ink: none; |
110 | } | 65 | } |
... | @@ -116,11 +71,6 @@ address { | ... | @@ -116,11 +71,6 @@ address { |
116 | } | 71 | } |
117 | 72 | ||
118 | ol, | 73 | ol, |
119 | -ul { | ||
120 | - padding-left: 2rem; | ||
121 | -} | ||
122 | - | ||
123 | -ol, | ||
124 | ul, | 74 | ul, |
125 | dl { | 75 | dl { |
126 | margin-top: 0; | 76 | margin-top: 0; |
... | @@ -153,18 +103,13 @@ strong { | ... | @@ -153,18 +103,13 @@ strong { |
153 | } | 103 | } |
154 | 104 | ||
155 | small { | 105 | small { |
156 | - font-size: 0.875em; | 106 | + font-size: 80%; |
157 | -} | ||
158 | - | ||
159 | -mark { | ||
160 | - padding: 0.2em; | ||
161 | - background-color: #fcf8e3; | ||
162 | } | 107 | } |
163 | 108 | ||
164 | sub, | 109 | sub, |
165 | sup { | 110 | sup { |
166 | position: relative; | 111 | position: relative; |
167 | - font-size: 0.75em; | 112 | + font-size: 75%; |
168 | line-height: 0; | 113 | line-height: 0; |
169 | vertical-align: baseline; | 114 | vertical-align: baseline; |
170 | } | 115 | } |
... | @@ -178,15 +123,22 @@ sup { | ... | @@ -178,15 +123,22 @@ sup { |
178 | } | 123 | } |
179 | 124 | ||
180 | a { | 125 | a { |
181 | - color: #0d6efd; | 126 | + color: #007bff; |
182 | - text-decoration: underline; | 127 | + text-decoration: none; |
128 | + background-color: transparent; | ||
183 | } | 129 | } |
184 | 130 | ||
185 | a:hover { | 131 | a:hover { |
186 | - color: #024dbc; | 132 | + color: #0056b3; |
133 | + text-decoration: underline; | ||
187 | } | 134 | } |
188 | 135 | ||
189 | -a:not([href]):not([class]), a:not([href]):not([class]):hover { | 136 | +a:not([href]) { |
137 | + color: inherit; | ||
138 | + text-decoration: none; | ||
139 | +} | ||
140 | + | ||
141 | +a:not([href]):hover { | ||
190 | color: inherit; | 142 | color: inherit; |
191 | text-decoration: none; | 143 | text-decoration: none; |
192 | } | 144 | } |
... | @@ -200,83 +152,44 @@ samp { | ... | @@ -200,83 +152,44 @@ samp { |
200 | } | 152 | } |
201 | 153 | ||
202 | pre { | 154 | pre { |
203 | - display: block; | ||
204 | margin-top: 0; | 155 | margin-top: 0; |
205 | margin-bottom: 1rem; | 156 | margin-bottom: 1rem; |
206 | overflow: auto; | 157 | overflow: auto; |
207 | - font-size: 0.875em; | ||
208 | - -ms-overflow-style: scrollbar; | ||
209 | -} | ||
210 | - | ||
211 | -pre code { | ||
212 | - font-size: inherit; | ||
213 | - color: inherit; | ||
214 | - word-break: normal; | ||
215 | -} | ||
216 | - | ||
217 | -code { | ||
218 | - font-size: 0.875em; | ||
219 | - color: #d63384; | ||
220 | - word-wrap: break-word; | ||
221 | -} | ||
222 | - | ||
223 | -a > code { | ||
224 | - color: inherit; | ||
225 | -} | ||
226 | - | ||
227 | -kbd { | ||
228 | - padding: 0.2rem 0.4rem; | ||
229 | - font-size: 0.875em; | ||
230 | - color: #fff; | ||
231 | - background-color: #212529; | ||
232 | - border-radius: 0.2rem; | ||
233 | -} | ||
234 | - | ||
235 | -kbd kbd { | ||
236 | - padding: 0; | ||
237 | - font-size: 1em; | ||
238 | - font-weight: 700; | ||
239 | } | 158 | } |
240 | 159 | ||
241 | figure { | 160 | figure { |
242 | margin: 0 0 1rem; | 161 | margin: 0 0 1rem; |
243 | } | 162 | } |
244 | 163 | ||
245 | -img, | 164 | +img { |
165 | + vertical-align: middle; | ||
166 | + border-style: none; | ||
167 | +} | ||
168 | + | ||
246 | svg { | 169 | svg { |
170 | + overflow: hidden; | ||
247 | vertical-align: middle; | 171 | vertical-align: middle; |
248 | } | 172 | } |
249 | 173 | ||
250 | table { | 174 | table { |
251 | - caption-side: bottom; | ||
252 | border-collapse: collapse; | 175 | border-collapse: collapse; |
253 | } | 176 | } |
254 | 177 | ||
255 | caption { | 178 | caption { |
256 | - padding-top: 0.5rem; | 179 | + padding-top: 0.75rem; |
257 | - padding-bottom: 0.5rem; | 180 | + padding-bottom: 0.75rem; |
258 | color: #6c757d; | 181 | color: #6c757d; |
259 | text-align: left; | 182 | text-align: left; |
183 | + caption-side: bottom; | ||
260 | } | 184 | } |
261 | 185 | ||
262 | th { | 186 | th { |
263 | text-align: inherit; | 187 | text-align: inherit; |
264 | - text-align: -webkit-match-parent; | ||
265 | -} | ||
266 | - | ||
267 | -thead, | ||
268 | -tbody, | ||
269 | -tfoot, | ||
270 | -tr, | ||
271 | -td, | ||
272 | -th { | ||
273 | - border-color: inherit; | ||
274 | - border-style: solid; | ||
275 | - border-width: 0; | ||
276 | } | 188 | } |
277 | 189 | ||
278 | label { | 190 | label { |
279 | display: inline-block; | 191 | display: inline-block; |
192 | + margin-bottom: 0.5rem; | ||
280 | } | 193 | } |
281 | 194 | ||
282 | button { | 195 | button { |
... | @@ -309,18 +222,10 @@ select { | ... | @@ -309,18 +222,10 @@ select { |
309 | text-transform: none; | 222 | text-transform: none; |
310 | } | 223 | } |
311 | 224 | ||
312 | -[role="button"] { | ||
313 | - cursor: pointer; | ||
314 | -} | ||
315 | - | ||
316 | select { | 225 | select { |
317 | word-wrap: normal; | 226 | word-wrap: normal; |
318 | } | 227 | } |
319 | 228 | ||
320 | -[list]::-webkit-calendar-picker-indicator { | ||
321 | - display: none; | ||
322 | -} | ||
323 | - | ||
324 | button, | 229 | button, |
325 | [type="button"], | 230 | [type="button"], |
326 | [type="reset"], | 231 | [type="reset"], |
... | @@ -335,12 +240,29 @@ button:not(:disabled), | ... | @@ -335,12 +240,29 @@ button:not(:disabled), |
335 | cursor: pointer; | 240 | cursor: pointer; |
336 | } | 241 | } |
337 | 242 | ||
338 | -::-moz-focus-inner { | 243 | +button::-moz-focus-inner, |
244 | +[type="button"]::-moz-focus-inner, | ||
245 | +[type="reset"]::-moz-focus-inner, | ||
246 | +[type="submit"]::-moz-focus-inner { | ||
339 | padding: 0; | 247 | padding: 0; |
340 | border-style: none; | 248 | border-style: none; |
341 | } | 249 | } |
342 | 250 | ||
251 | +input[type="radio"], | ||
252 | +input[type="checkbox"] { | ||
253 | + box-sizing: border-box; | ||
254 | + padding: 0; | ||
255 | +} | ||
256 | + | ||
257 | +input[type="date"], | ||
258 | +input[type="time"], | ||
259 | +input[type="datetime-local"], | ||
260 | +input[type="month"] { | ||
261 | + -webkit-appearance: listbox; | ||
262 | +} | ||
263 | + | ||
343 | textarea { | 264 | textarea { |
265 | + overflow: auto; | ||
344 | resize: vertical; | 266 | resize: vertical; |
345 | } | 267 | } |
346 | 268 | ||
... | @@ -352,50 +274,33 @@ fieldset { | ... | @@ -352,50 +274,33 @@ fieldset { |
352 | } | 274 | } |
353 | 275 | ||
354 | legend { | 276 | legend { |
355 | - float: left; | 277 | + display: block; |
356 | width: 100%; | 278 | width: 100%; |
279 | + max-width: 100%; | ||
357 | padding: 0; | 280 | padding: 0; |
358 | - margin-bottom: 0.5rem; | 281 | + margin-bottom: .5rem; |
359 | - font-size: calc(1.275rem + 0.3vw); | 282 | + font-size: 1.5rem; |
360 | line-height: inherit; | 283 | line-height: inherit; |
284 | + color: inherit; | ||
361 | white-space: normal; | 285 | white-space: normal; |
362 | } | 286 | } |
363 | 287 | ||
364 | -@media (min-width: 1200px) { | 288 | +progress { |
365 | - legend { | 289 | + vertical-align: baseline; |
366 | - font-size: 1.5rem; | ||
367 | - } | ||
368 | -} | ||
369 | - | ||
370 | -legend + * { | ||
371 | - clear: left; | ||
372 | -} | ||
373 | - | ||
374 | -::-webkit-datetime-edit-fields-wrapper, | ||
375 | -::-webkit-datetime-edit-text, | ||
376 | -::-webkit-datetime-edit-minute, | ||
377 | -::-webkit-datetime-edit-hour-field, | ||
378 | -::-webkit-datetime-edit-day-field, | ||
379 | -::-webkit-datetime-edit-month-field, | ||
380 | -::-webkit-datetime-edit-year-field { | ||
381 | - padding: 0; | ||
382 | } | 290 | } |
383 | 291 | ||
384 | -::-webkit-inner-spin-button { | 292 | +[type="number"]::-webkit-inner-spin-button, |
293 | +[type="number"]::-webkit-outer-spin-button { | ||
385 | height: auto; | 294 | height: auto; |
386 | } | 295 | } |
387 | 296 | ||
388 | [type="search"] { | 297 | [type="search"] { |
389 | outline-offset: -2px; | 298 | outline-offset: -2px; |
390 | - -webkit-appearance: textfield; | ||
391 | -} | ||
392 | - | ||
393 | -::-webkit-search-decoration { | ||
394 | -webkit-appearance: none; | 299 | -webkit-appearance: none; |
395 | } | 300 | } |
396 | 301 | ||
397 | -::-webkit-color-swatch-wrapper { | 302 | +[type="search"]::-webkit-search-decoration { |
398 | - padding: 0; | 303 | + -webkit-appearance: none; |
399 | } | 304 | } |
400 | 305 | ||
401 | ::-webkit-file-upload-button { | 306 | ::-webkit-file-upload-button { |
... | @@ -407,17 +312,13 @@ output { | ... | @@ -407,17 +312,13 @@ output { |
407 | display: inline-block; | 312 | display: inline-block; |
408 | } | 313 | } |
409 | 314 | ||
410 | -iframe { | ||
411 | - border: 0; | ||
412 | -} | ||
413 | - | ||
414 | summary { | 315 | summary { |
415 | display: list-item; | 316 | display: list-item; |
416 | cursor: pointer; | 317 | cursor: pointer; |
417 | } | 318 | } |
418 | 319 | ||
419 | -progress { | 320 | +template { |
420 | - vertical-align: baseline; | 321 | + display: none; |
421 | } | 322 | } |
422 | 323 | ||
423 | [hidden] { | 324 | [hidden] { | ... | ... |
public/stylesheets/bootstrap-reboot.css.map
0 → 100644
This diff is collapsed. Click to expand it.
public/stylesheets/bootstrap-reboot.min.css
0 → 100644
1 | +/*! | ||
2 | + * Bootstrap Reboot v4.4.1 (https://getbootstrap.com/) | ||
3 | + * Copyright 2011-2019 The Bootstrap Authors | ||
4 | + * Copyright 2011-2019 Twitter, Inc. | ||
5 | + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
6 | + * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) | ||
7 | + */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]){color:inherit;text-decoration:none}a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} | ||
8 | +/*# sourceMappingURL=bootstrap-reboot.min.css.map */ | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
public/stylesheets/bootstrap.css.map
0 → 100644
This diff could not be displayed because it is too large.
public/stylesheets/bootstrap.min.css
0 → 100644
This diff could not be displayed because it is too large.
public/stylesheets/bootstrap.min.css.map
0 → 100644
This diff could not be displayed because it is too large.
... | @@ -9,19 +9,17 @@ var CLIENT_ID = | ... | @@ -9,19 +9,17 @@ var CLIENT_ID = |
9 | "94679084723-s5f0686p2porp9mkakrp1p89a48n24nj.apps.googleusercontent.com"; | 9 | "94679084723-s5f0686p2porp9mkakrp1p89a48n24nj.apps.googleusercontent.com"; |
10 | var client = new OAuth2Client(CLIENT_ID); | 10 | var client = new OAuth2Client(CLIENT_ID); |
11 | var mysql = require("mysql"); | 11 | var mysql = require("mysql"); |
12 | -var session = require("express-session"); | 12 | +const session = require("express-session"); |
13 | -var FileStore = require("session-file-store")(session); | 13 | +const FileStore = require("session-file-store")(session); |
14 | 14 | ||
15 | router.use(bodyParser.urlencoded({ extended: false })); //url인코딩 x | 15 | router.use(bodyParser.urlencoded({ extended: false })); //url인코딩 x |
16 | router.use(bodyParser.json()); //json방식으로 파싱 | 16 | router.use(bodyParser.json()); //json방식으로 파싱 |
17 | -router.use( | 17 | +router.use(session({ |
18 | - session({ | 18 | + secret: '209', // 암호화 |
19 | - secret: "209", // 암호화 | 19 | + resave: false, |
20 | - resave: false, | 20 | + saveUninitialized: true, |
21 | - saveUninitialized: true, | 21 | + store: new FileStore() |
22 | - store: new FileStore(), | 22 | +})) |
23 | - }) | ||
24 | -); | ||
25 | 23 | ||
26 | var connection = mysql.createConnection({ | 24 | var connection = mysql.createConnection({ |
27 | host: "localhost", | 25 | host: "localhost", |
... | @@ -62,8 +60,9 @@ router.post("/index", (req, res) => { | ... | @@ -62,8 +60,9 @@ router.post("/index", (req, res) => { |
62 | }); | 60 | }); |
63 | 61 | ||
64 | router.get("/login", checkAuthenticated, (req, res) => { | 62 | router.get("/login", checkAuthenticated, (req, res) => { |
65 | - let user = req.user; | 63 | + req.session.user =req.user; |
66 | - req.session.user = user; | 64 | + req.session.user.email = req.user.email; |
65 | + req.session.user.name=req.user.name; | ||
67 | var sql = "SELECT * FROM USER WHERE EMAIL=?"; | 66 | var sql = "SELECT * FROM USER WHERE EMAIL=?"; |
68 | var parameter = [req.session.user.email]; | 67 | var parameter = [req.session.user.email]; |
69 | connection.query(sql, parameter, function (err, row) { | 68 | connection.query(sql, parameter, function (err, row) { | ... | ... |
1 | +{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"__lastAccess":1622063531297} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"__lastAccess":1622066597250,"user":{"name":"최정민","email":"cjm104174@gmail.com","nickname":"Mayf","age":"24","gender":"male"}} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -63,6 +63,32 @@ | ... | @@ -63,6 +63,32 @@ |
63 | 63 | ||
64 | 64 | ||
65 | <script> | 65 | <script> |
66 | + function onSignIn(googleUser) { | ||
67 | + // var profile = googleUser.getBasicProfile(); | ||
68 | + // console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead. | ||
69 | + // console.log('Name: ' + profile.getName()); | ||
70 | + // console.log('Image URL: ' + profile.getImageUrl()); | ||
71 | + // console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present. | ||
72 | + var id_token = googleUser.getAuthResponse().id_token; | ||
73 | + // console.log(id_token); | ||
74 | + var xhr = new XMLHttpRequest(); | ||
75 | + xhr.open('POST', '/index'); | ||
76 | + xhr.setRequestHeader('Content-Type', 'application/json'); | ||
77 | + xhr.onload = function() { | ||
78 | + console.log('Signed in as: ' + xhr.responseText); | ||
79 | + if(xhr.responseText == 'success'){ | ||
80 | + signOut(); | ||
81 | + location.assign('/login') | ||
82 | + } | ||
83 | + }; | ||
84 | + xhr.send(JSON.stringify({token : id_token})); | ||
85 | + } | ||
86 | + function signOut() { | ||
87 | + var auth2 = gapi.auth2.getAuthInstance(); | ||
88 | + auth2.signOut().then(function () { | ||
89 | + console.log("User signed out."); | ||
90 | + }); | ||
91 | + } | ||
66 | </script> | 92 | </script> |
67 | <script src="javascripts/bootstrap.js"></script> | 93 | <script src="javascripts/bootstrap.js"></script> |
68 | </html> | 94 | </html> | ... | ... |
... | @@ -43,28 +43,14 @@ | ... | @@ -43,28 +43,14 @@ |
43 | <a class="navbar-brand" href="/" | 43 | <a class="navbar-brand" href="/" |
44 | ><img src="images/home.png" width="40" height="40" alt="" /> | 44 | ><img src="images/home.png" width="40" height="40" alt="" /> |
45 | </a> | 45 | </a> |
46 | - <button | 46 | + <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> |
47 | - class="navbar-toggler" | ||
48 | - type="button" | ||
49 | - data-toggle="collapse" | ||
50 | - data-target="#navbarSupportedContent" | ||
51 | - aria-controls="navbarSupportedContent" | ||
52 | - aria-expanded="false" | ||
53 | - aria-label="Toggle navigation" | ||
54 | - > | ||
55 | <span class="navbar-toggler-icon"></span> | 47 | <span class="navbar-toggler-icon"></span> |
56 | </button> | 48 | </button> |
57 | <div class="collapse navbar-collapse" id="navbarSupportedContent"> | 49 | <div class="collapse navbar-collapse" id="navbarSupportedContent"> |
58 | <a class="navbar-brand" href="/"><strong>Home</strong></a> | 50 | <a class="navbar-brand" href="/"><strong>Home</strong></a> |
59 | <ul class="navbar-nav mr-auto mt-2 mt-lg-0"> | 51 | <ul class="navbar-nav mr-auto mt-2 mt-lg-0"> |
60 | <li class="nav-item active"> | 52 | <li class="nav-item active"> |
61 | - <a | 53 | + <a class="nav-link" style="color: #ffffff" href="/" onclick="signOut();">Logout<span class="sr-only">(current)</span></a> |
62 | - class="nav-link" | ||
63 | - style="color: #ffffff" | ||
64 | - href="/" | ||
65 | - onclick="signOut();" | ||
66 | - >Logout<span class="sr-only">(current)</span></a | ||
67 | - > | ||
68 | </li> | 54 | </li> |
69 | </ul> | 55 | </ul> |
70 | </div> | 56 | </div> |
... | @@ -78,54 +64,29 @@ | ... | @@ -78,54 +64,29 @@ |
78 | <div class="row"> | 64 | <div class="row"> |
79 | <div class="col-2"></div> | 65 | <div class="col-2"></div> |
80 | <div class="col-8"> | 66 | <div class="col-8"> |
81 | - <hr class="my-4" style="background-color: white" /> | 67 | + <hr class="my-4" style="background-color: white"> |
82 | <form method="post"> | 68 | <form method="post"> |
83 | <div class="form-group"> | 69 | <div class="form-group"> |
84 | <label for="id_input">닉네임을 입력하세요</label> | 70 | <label for="id_input">닉네임을 입력하세요</label> |
85 | - <input | 71 | + <input type="text" class="form-control form-control-lg" name="nickname" aria-describedby="idHelp" placeholder="ID"> |
86 | - type="text" | 72 | + <small id="idHelp" class="form-text text-muted">중복이 허용되지 않습니다.</small> |
87 | - class="form-control form-control-lg" | ||
88 | - name="nickname" | ||
89 | - aria-describedby="idHelp" | ||
90 | - placeholder="ID" | ||
91 | - /> | ||
92 | - <small id="idHelp" class="form-text text-muted" | ||
93 | - >중복이 허용되지 않습니다.</small | ||
94 | - > | ||
95 | </div> | 73 | </div> |
96 | - <hr class="my-3" style="background-color: white" /> | 74 | + <hr class="my-3" style="background-color: white" > |
97 | <div class="form-group"> | 75 | <div class="form-group"> |
98 | <label for="age_input">나이를 입력하세요</label> | 76 | <label for="age_input">나이를 입력하세요</label> |
99 | - <input | 77 | + <input class="form-control form-control-lg" type="number" name="age" placeholder="Age"> |
100 | - class="form-control form-control-lg" | ||
101 | - type="number" | ||
102 | - name="age" | ||
103 | - placeholder="Age" | ||
104 | - /> | ||
105 | </div> | 78 | </div> |
106 | - <hr class="my-3" style="background-color: white" /> | 79 | + <hr class="my-3" style="background-color: white" > |
107 | 80 | ||
108 | <label for="gender" class="form-label">성별을 입력하세요</label> | 81 | <label for="gender" class="form-label">성별을 입력하세요</label> |
109 | - <select | 82 | + <select class="form-select form-select-lg" id="gender" name="gender" required> |
110 | - class="form-select form-select-lg" | ||
111 | - id="gender" | ||
112 | - name="gender" | ||
113 | - required | ||
114 | - > | ||
115 | <option selected disabled value="">Choose...</option> | 83 | <option selected disabled value="">Choose...</option> |
116 | <option value="male">Male</option> | 84 | <option value="male">Male</option> |
117 | <option value="female">Female</option> | 85 | <option value="female">Female</option> |
118 | </select> | 86 | </select> |
119 | 87 | ||
120 | <hr class="my-4" style="background-color: white" /> | 88 | <hr class="my-4" style="background-color: white" /> |
121 | - <button | 89 | + <button type="submit" style="float: right" class="btn btn-primary btn-lg" id="please">Submit</button> |
122 | - type="submit" | ||
123 | - style="float: right" | ||
124 | - class="btn btn-primary btn-lg" | ||
125 | - id="please" | ||
126 | - > | ||
127 | - Submit | ||
128 | - </button> | ||
129 | </form> | 90 | </form> |
130 | </div> | 91 | </div> |
131 | <div class="col-2"></div> | 92 | <div class="col-2"></div> |
... | @@ -149,12 +110,6 @@ | ... | @@ -149,12 +110,6 @@ |
149 | console.log("User signed out."); | 110 | console.log("User signed out."); |
150 | }); | 111 | }); |
151 | } | 112 | } |
152 | - function signOut() { | ||
153 | - var auth2 = gapi.auth2.getAuthInstance(); | ||
154 | - auth2.signOut().then(function () { | ||
155 | - console.log("User signed out."); | ||
156 | - }); | ||
157 | - } | ||
158 | </script> | 113 | </script> |
159 | <script src="javascripts/bootstrap.js"></script> | 114 | <script src="javascripts/bootstrap.js"></script> |
160 | </html> | 115 | </html> | ... | ... |
-
Please register or login to post a comment