diff --git a/Dockerfile b/Dockerfile index 0d2acdb..db5e253 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ FROM nginx:latest WORKDIR /usr/share/nginx/html -ADD index.html style.css script.js ./ +ADD index.html ./ diff --git a/Makefile b/Makefile index b6eabba..025dda3 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ ci: .PHONY: release # Release the latest version of the application release: - @echo "⚠️ 'release' unimplemented" + @kubectl --namespace base64 set image deployment base64 web=docker.cluster.fun/averagemarcus/base64:$(SHA) .PHONY: help # Show this list of commands help: diff --git a/README.md b/README.md index 135f2e7..16d07fa 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,20 @@ -# base64 +![Base64 Encode / Decode](logo.png) Web app to base64 encode and decode +Available at https://base64.cluster.fun/ + +## Building from source + +With Docker: + +```sh +make docker-build +``` + ## Contributing -If you find a bug or have an idea for a new feature please raise an issue to discuss it. +If you find a bug or have an idea for a new feature please [raise an issue](issues/new) to discuss it. Pull requests are welcomed but please try and follow similar code style as the rest of the project and ensure all tests and code checkers are passing. diff --git a/index.html b/index.html index 3bcd3a6..37de113 100644 --- a/index.html +++ b/index.html @@ -1,31 +1,100 @@ - - - - - - Base64 Encode / Decode - - - - -

+ + + + + + Base64 Encode / Decode + + + + + + + + + + + + + + + + + + +
+

Base64 Encode / Decode +

-
-
-

- Encoded -

+ +
+ Encodes and decodes between text and base64 as you type +
+ +
+
+

Encoded

- -
-

- Decoded -

+ +
+

Decoded

- + +
+ Source code available on GitHub, GitLab, Bitbucket & my own Gitea server. +
+
+ +
+
+
+ +
+
+
+ + + diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..d954b31 Binary files /dev/null and b/logo.png differ diff --git a/script.js b/script.js deleted file mode 100644 index 41baa71..0000000 --- a/script.js +++ /dev/null @@ -1,14 +0,0 @@ -document.getElementById("encoded").addEventListener("change", function() { - try { - document.getElementById("decoded").value = atob(this.value); - } catch (ex) { - document.getElementById("decoded").value = "⚠️ INVALID!!!" - } -}); -document.getElementById("decoded").addEventListener("change", function() { - try { - document.getElementById("encoded").value = btoa(this.value); - } catch (ex) { - document.getElementById("decoded").value = "⚠️ INVALID!!!" - } -}); diff --git a/style.css b/style.css deleted file mode 100644 index 9e2d597..0000000 --- a/style.css +++ /dev/null @@ -1,42 +0,0 @@ -body { - font-family: helvetica, arial, sans-serif; - margin: 0; - padding: 0; - width: 100%; - text-align: center; - background-color: #dbe3e5; - background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2392aca0' fill-opacity='0.4'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); -} - -.main { - display:flex; - width: 100%; - justify-content: space-evenly; -} - -textarea { - width: 40vw; - height: 50vh; - background-color: #ffffffbb; - font-size: 1.5em; - border: none; - padding: 4px; -} - -button { - height: 50px; - align-self: center; - font-size: 3em; - background: none; - border: none; -} - -@media(max-width: 700px) { - .main { - flex-direction: column; - } - - textarea { - width: 90vw; - } -}