diff --git a/index.html b/index.html index 2b2f18a..e352293 100644 --- a/index.html +++ b/index.html @@ -21,18 +21,28 @@ textarea, input { padding: 10px; font-size: 1em; + border-radius: 8px; /* Rounded corners */ + border: 1px solid #ccc; } button { - background-color: #4CAF50; + background-color: #0056b3; /* Lighter blue color for main buttons */ color: white; padding: 10px; font-size: 1.2em; border: none; cursor: pointer; - margin-right: 10px; + border-radius: 8px; /* Rounded corners */ + transition: background-color 0.3s ease; /* Smooth transition */ } button:hover { - background-color: #45a049; + background-color: #004494; /* Darker shade on hover */ + } + /* Style for the copy buttons */ + button.copyButton { + background-color: #388E3C; /* Darker green for contrast */ + } + button.copyButton:hover { + background-color: #2C6D2B; /* Darker shade on hover */ } .output { margin-top: 20px; @@ -43,11 +53,17 @@ display: none; /* Initially hidden */ } .template { - margin-bottom: 60px; /* Increased space between two templates */ + margin-bottom: 60px; /* Adds space between two templates */ } hr { border: 1px solid #ddd; - margin: 60px 0; /* Increase spacing between the two templates */ + } + .copied-message { + color: green; + font-size: 0.9em; + display: none; + margin-top: 5px; + text-align: center; /* Center the message */ } @@ -64,10 +80,11 @@

Circuit Name Converter

- +
- + +
Copied!

@@ -77,10 +94,11 @@

Circuit Name Converter

- +
- + +
Copied!
@@ -136,7 +154,7 @@

Circuit Name Converter

document.getElementById('copyButton2').style.display = 'block'; } - function copyToClipboard(outputId) { + function copyToClipboard(outputId, messageId) { const outputText = document.getElementById(outputId).textContent; // Create a temporary textarea element to hold the text for copying @@ -146,8 +164,15 @@

Circuit Name Converter

tempTextarea.select(); document.execCommand('copy'); document.body.removeChild(tempTextarea); + + // Show the copied message + const messageElement = document.getElementById(messageId); + messageElement.style.display = 'block'; - alert('Copied to clipboard!'); + // Hide the message after 3 seconds + setTimeout(() => { + messageElement.style.display = 'none'; + }, 3000); }