diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 14b3c8c..84ef7db 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -4,6 +4,7 @@ on:
branches:
- "*"
paths-ignore:
+ - 'client/web/**'
- "backend/**"
jobs:
build:
diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml
index ca11f47..00e557d 100644
--- a/.github/workflows/pytest.yml
+++ b/.github/workflows/pytest.yml
@@ -5,6 +5,7 @@ on:
branches:
- "*"
paths-ignore:
+ - 'client/web/**'
- "backend/**"
jobs:
test:
diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml
index 02cec07..f63ed19 100644
--- a/.github/workflows/terraform.yml
+++ b/.github/workflows/terraform.yml
@@ -6,6 +6,7 @@ on:
- synchronize
- closed
paths-ignore:
+ - 'client/web/**'
- "backend/**"
permissions:
id-token: write # This is required for aws oidc connection
diff --git a/client/web/index.html b/client/web/index.html
index 32ffd74..83a2fc6 100644
--- a/client/web/index.html
+++ b/client/web/index.html
@@ -1,7 +1,7 @@
-
+
Pastebin
@@ -11,6 +11,9 @@
--text-color: black;
--button-bg: #007bff;
--button-hover: #0056b3;
+ --submit-bg: #007bff; /* Blue color for Submit (default) */
+ --submit-hover: #0056b3; /* Darker blue for hover */
+ --font-size: 16px;
}
body.dark-mode {
@@ -18,6 +21,8 @@
--text-color: #ffffff;
--button-bg: #ff9800;
--button-hover: #e68900;
+ --submit-bg: #ff9800; /* Dark mode submit color */
+ --submit-hover: #e68900;
}
body {
@@ -82,6 +87,28 @@
#toggleModeButton:hover {
background-color: var(--button-hover);
}
+
+ /* Submit Button Styling */
+ button {
+ font-size: 18px;
+ padding: 12px 20px;
+ margin-top: 10px;
+ background-color: var(--submit-bg);
+ color: white;
+ border: none;
+ border-radius: 8px;
+ cursor: pointer;
+ transition: background-color 0.3s ease, transform 0.2s ease;
+ }
+
+ button:hover {
+ background-color: var(--submit-hover);
+ transform: scale(1.05);
+ }
+
+ button:active {
+ transform: scale(1);
+ }
@@ -92,13 +119,12 @@ Pastebin
latest pastes
-
+
diff --git a/client/web/script.js b/client/web/script.js
index 7ae5cdf..3a51f05 100644
--- a/client/web/script.js
+++ b/client/web/script.js
@@ -24,7 +24,6 @@ async function submitText() {
let content;
if (textData) {
content = textData;
- console.log(`content: {content}`);
} else {
alert("Please enter text to be saved");
return;
@@ -118,11 +117,6 @@ async function displayPasteUrls() {
}
}
-async function paste(input) {
- const text = await navigator.clipboard.readText();
- input.value = text;
-}
-
function toggleMode() {
document.body.classList.toggle("dark-mode");
const isDark = document.body.classList.contains("dark-mode");
@@ -134,15 +128,6 @@ function toggleMode() {
document.getElementById("toggleModeButton").innerHTML = isDark ? "☀️" : "🌙";
}
-document
- .getElementById("pasteContent")
- .addEventListener("keydown", function (event) {
- if (event.key === "Enter" && !event.shiftKey) {
- event.preventDefault(); // Prevents adding a new line
- submitText(); // Triggers submit
- }
- });
-
window.onload = function () {
displayPasteUrls();
const darkModeSetting = localStorage.getItem("darkMode");
@@ -153,4 +138,5 @@ window.onload = function () {
} else {
document.getElementById("toggleModeButton").innerHTML = "🌙";
}
+ document.getElementById("pasteContent").focus();
};