Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Pang78 authored Nov 10, 2024
1 parent 78e66d6 commit d8bec08
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pre-filled URL Generator</title>
<style>
/* General Styles and Night Mode */
body {
font-family: Arial, sans-serif;
padding: 20px;
transition: background-color 0.3s, color 0.3s;
}

/* Night View Styles */
/* Dark Mode */
body.night-view {
background-color: #1f1f1f;
color: #c7c7c7;
Expand All @@ -28,7 +29,7 @@
color: #c7c7c7;
}

.mode-toggle {
.mode-toggle, .instructions {
margin-bottom: 20px;
}

Expand All @@ -50,10 +51,9 @@
background-color: #28a745;
}

/* Generic Styles */
label {
display: block;
margin-top: 10px;
/* Input, Button, and Table Styling */
label, table {
margin-top: 15px;
}

input[type="text"] {
Expand All @@ -77,12 +77,6 @@
font-size: 14px;
}

#output {
margin-top: 20px;
font-weight: bold;
color: #007bff;
}

table {
width: 100%;
margin-top: 10px;
Expand All @@ -101,6 +95,12 @@
cursor: pointer;
}

#output {
margin-top: 20px;
font-weight: bold;
color: #007bff;
}

#theme-toggle {
position: absolute;
top: 20px;
Expand Down Expand Up @@ -131,7 +131,6 @@ <h1>Pre-filled URL Generator</h1>
<label for="formUrl">Form URL:</label>
<input type="text" id="formUrl" placeholder="Enter form URL here">

<!-- Table to hold field ID and value pairs -->
<table id="fieldsTable">
<thead>
<tr>
Expand Down Expand Up @@ -252,6 +251,7 @@ <h1>Pre-filled URL Generator</h1>
fieldIdInput.type = "text";
fieldIdInput.className = "fieldId";
fieldIdInput.value = key;
fieldIdInput.disabled = true;
fieldIdCell.appendChild(fieldIdInput);

const preFillCell = document.createElement("td");
Expand All @@ -274,11 +274,13 @@ <h1>Pre-filled URL Generator</h1>

document.getElementById("tableBody").appendChild(row);
}

document.getElementById("actionButton").textContent = "Reconstruct URL";
document.getElementById("actionButton").onclick = generateUrl;
}

function toggleTheme() {
document.body.classList.toggle("night-view");
document.getElementById("theme-toggle").textContent = document.body.classList.contains("night-view") ? "Light View" : "Night View";
}
</script>

Expand All @@ -287,3 +289,4 @@ <h1>Pre-filled URL Generator</h1>




0 comments on commit d8bec08

Please sign in to comment.