From 419933f6505caf4c5e685f8436b1ff735185e55a Mon Sep 17 00:00:00 2001 From: Vijay Raghavan Aravamudhan Date: Sun, 1 Aug 2021 11:07:57 +0000 Subject: Moved 'internal-server' into a sub-folder as opposed to a git submodule. (#1715) * Ignored tests in 'internal-server' folder since there are none. * Linter fixes --- src/internal-server/public/css/main.css | 69 +++++++++++++++ src/internal-server/public/css/vanilla.css | 138 +++++++++++++++++++++++++++++ src/internal-server/public/images/logo.png | Bin 0 -> 298671 bytes src/internal-server/public/js/transfer.js | 14 +++ 4 files changed, 221 insertions(+) create mode 100644 src/internal-server/public/css/main.css create mode 100644 src/internal-server/public/css/vanilla.css create mode 100644 src/internal-server/public/images/logo.png create mode 100644 src/internal-server/public/js/transfer.js (limited to 'src/internal-server/public') diff --git a/src/internal-server/public/css/main.css b/src/internal-server/public/css/main.css new file mode 100644 index 000000000..a1c5653d7 --- /dev/null +++ b/src/internal-server/public/css/main.css @@ -0,0 +1,69 @@ +input { + margin-bottom: 1rem; + width: 100%; + padding: 0.5rem; +} + +button, .button { + display: flex; + overflow: hidden; + padding: 12px 12px; + cursor: pointer; + width: 100%; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + transition: all 150ms linear; + text-align: center; + white-space: nowrap; + text-decoration: none !important; + text-transform: none; + text-transform: capitalize; + color: #fff !important; + border: 0 none; + border-radius: 4px; + font-size: 13px; + font-weight: 500; + line-height: 1.3; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + justify-content: center; + align-items: center; + flex: 0 0 160px; + box-shadow: 2px 5px 10px #e4e4e4; + color: #FFFFFF; + background: #161616; +} + +#dropzone { + width: 100%; + height: 30vh; + background-color: #ebebeb; + + display: flex; + align-items: center; + justify-content: center; + text-align: center; + + cursor: pointer; +} + +#dropzone p { + font-size: 0.85rem; +} + +#files { + display: none; +} + +.alert { + background-color: #e7a8a6; + padding: 0.8rem; + margin-bottom: 1rem; +} + +td { + word-break: break-all; +} \ No newline at end of file diff --git a/src/internal-server/public/css/vanilla.css b/src/internal-server/public/css/vanilla.css new file mode 100644 index 000000000..37bc051a2 --- /dev/null +++ b/src/internal-server/public/css/vanilla.css @@ -0,0 +1,138 @@ +/* Reset */ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +* { + box-sizing: border-box; +} + + + +/* Variables */ +:root { + --desktop-font-size: 1.3rem/1.5; + --mobile-font-size: 1.1rem/1.4; + --text-color: #2d2d2d; + --link-color: blue; + --primary-color: lightsteelblue; + --secondary-color: aliceblue; + --tertiary-color: whitesmoke; +} + + + + +/* Typography */ +body { + color: var(--text-color); + padding: 3rem; + font: var(--desktop-font-size) -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto, Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol"; +} + +h1,h2,h3,h4,h5,h6,p,blockquote,dl,img,figure { + margin: 2rem 0; +} + +h1,h2,h3,h4,h5,h6 { font-weight: bold; } +h1 { font-size: 200%; } +h2 { font-size: 150%; } +h3 { font-size: 120%; } +h4,h5,h6 { font-size: 100%; } +h5, h6 { text-transform: uppercase; } + +header h1 { border-bottom: 1px solid; } + +p { margin: 2rem 0; } + +a,a:visited { color: var(--link-color); } + +strong, time, b { font-weight: bold; } +em, dfn, i { font-style: italic; } +sub { font-size: 60%; vertical-align: bottom; } +small { font-size: 80%; } + +blockquote, q { + background: var(--secondary-color); + border-left: 10px solid var(--primary-color); + font-family: "Georgia", serif; + padding: 1rem; +} +blockquote p:first-child { margin-top: 0; } +cite { + font-family: "Georgia", serif; + font-style: italic; + font-weight: bold; +} + +kbd,code,samp,pre,var { font-family: monospace; font-weight: bold; } +code, pre { + background: var(--tertiary-color); + padding: 0.5rem 1rem; +} +code pre , pre code { padding: 0; } + + + +/* Elements */ +hr { + background: var(--text-color); + border: 0; + height: 1px; + margin: 4rem 0; +} + +img { max-width: 100%; } + +figure { + border: 1px solid var(--primary-color); + display: inline-block; + padding: 1rem; + width: auto; +} +figure img { margin: 0; } +figure figcaption { font-size: 80%; } + +ul, ol { margin: 2rem 0; padding: 0 0 0 4rem; } + +dl dd { padding-left: 2rem; } + +table { + border: 1px solid var(--primary-color); + border-collapse: collapse; + table-layout: fixed; + width: 100%; +} +table caption { margin: 2rem 0; } +table thead { text-align: center; } +table tbody { text-align: right; } +table tr { border-bottom: 1px solid var(--primary-color); } +table tbody tr:nth-child(even) { background: var(--tertiary-color); } +table th { background: var(--secondary-color); font-weight: bold; } +table th, table td { padding: 1rem; } +table th:not(last-of-type), table td:not(last-of-type) { border-right: 1px solid var(--primary-color); } + + + +/* Mobile Styling */ +@media screen and (max-width: 50rem) { + body { + font: var(--mobile-font-size) -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto, Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol" + } +} \ No newline at end of file diff --git a/src/internal-server/public/images/logo.png b/src/internal-server/public/images/logo.png new file mode 100644 index 000000000..4145a077a Binary files /dev/null and b/src/internal-server/public/images/logo.png differ diff --git a/src/internal-server/public/js/transfer.js b/src/internal-server/public/js/transfer.js new file mode 100644 index 000000000..c04a6d3b1 --- /dev/null +++ b/src/internal-server/public/js/transfer.js @@ -0,0 +1,14 @@ +/* eslint-env browser */ +const submitBtn = document.getElementById('submit'); +const fileInput = document.getElementById('file'); +const fileOutput = document.getElementById('fileoutput'); + +fileInput.addEventListener('change', () => { + const reader = new FileReader(); + reader.onload = function () { + const text = reader.result; + fileOutput.value = text; + submitBtn.disabled = false; + }; + reader.readAsText(fileInput.files[0]); +}); -- cgit v1.2.3-54-g00ecf