Wayz22 commited on
Commit
2ad4002
·
verified ·
1 Parent(s): c3c8feb

give it a dark background and a black and orange color scheme. also provide a text spell check in ducky script form

Browse files
Files changed (5) hide show
  1. about.html +5 -6
  2. components/theme-toggle.js +44 -0
  3. index.html +4 -5
  4. script.js +41 -1
  5. style.css +35 -0
about.html CHANGED
@@ -13,14 +13,13 @@
13
  <custom-navbar></custom-navbar>
14
 
15
  <main class="flex-grow container mx-auto px-4 py-12">
16
- <div class="max-w-4xl mx-auto bg-white rounded-xl shadow-lg overflow-hidden">
17
- <div class="bg-yellow-400 p-8 text-center">
18
- <h1 class="text-4xl font-bold text-gray-900">About Quacky Code Conjurer</h1>
19
  <p class="text-xl text-gray-800 mt-2">Magical script generation with a ducky twist!</p>
20
  </div>
21
-
22
- <div class="p-8 space-y-8">
23
- <div class="flex flex-col md:flex-row gap-8 items-center">
24
  <div class="md:w-1/2">
25
  <img src="http://static.photos/yellow/640x360/42" alt="Quacky duck" class="rounded-lg shadow-md w-full floating-duck">
26
  </div>
 
13
  <custom-navbar></custom-navbar>
14
 
15
  <main class="flex-grow container mx-auto px-4 py-12">
16
+ <div class="max-w-4xl mx-auto bg-gray-900 rounded-xl shadow-lg overflow-hidden border border-orange-600">
17
+ <div class="bg-orange-600 p-8 text-center">
18
+ <h1 class="text-4xl font-bold text-gray-900">About Quacky Code Conjurer</h1>
19
  <p class="text-xl text-gray-800 mt-2">Magical script generation with a ducky twist!</p>
20
  </div>
21
+ <div class="p-8 space-y-8 bg-gray-800">
22
+ <div class="flex flex-col md:flex-row gap-8 items-center">
 
23
  <div class="md:w-1/2">
24
  <img src="http://static.photos/yellow/640x360/42" alt="Quacky duck" class="rounded-lg shadow-md w-full floating-duck">
25
  </div>
components/theme-toggle.js ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class ThemeToggle extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ button {
7
+ background: transparent;
8
+ border: none;
9
+ cursor: pointer;
10
+ color: inherit;
11
+ display: flex;
12
+ align-items: center;
13
+ gap: 0.5rem;
14
+ }
15
+ </style>
16
+ <button>
17
+ <i data-feather="moon"></i>
18
+ <span>Dark Mode</span>
19
+ </button>
20
+ `;
21
+
22
+ this.shadowRoot.querySelector('button').addEventListener('click', () => {
23
+ document.documentElement.classList.toggle('light-mode');
24
+ this.updateIcon();
25
+ });
26
+
27
+ this.updateIcon();
28
+ }
29
+
30
+ updateIcon() {
31
+ const icon = this.shadowRoot.querySelector('i');
32
+ const span = this.shadowRoot.querySelector('span');
33
+ if (document.documentElement.classList.contains('light-mode')) {
34
+ icon.setAttribute('data-feather', 'sun');
35
+ span.textContent = 'Light Mode';
36
+ } else {
37
+ icon.setAttribute('data-feather', 'moon');
38
+ span.textContent = 'Dark Mode';
39
+ }
40
+ feather.replace();
41
+ }
42
+ }
43
+
44
+ customElements.define('theme-toggle', ThemeToggle);
index.html CHANGED
@@ -30,10 +30,9 @@
30
  <h1 class="text-5xl font-bold text-gray-800 mb-4">Quacky Code Conjurer 🦆</h1>
31
  <p class="text-xl text-gray-600">Generate magical duck-themed scripts with a quack!</p>
32
  </div>
33
-
34
  <div class="grid md:grid-cols-2 gap-8">
35
- <div class="bg-yellow-50 p-6 rounded-lg border-2 border-yellow-200">
36
- <h2 class="text-2xl font-semibold text-gray-800 mb-4 flex items-center">
37
  <i data-feather="code" class="mr-2"></i> Generate Script
38
  </h2>
39
  <div class="space-y-4">
@@ -60,8 +59,8 @@
60
  <h2 class="text-2xl font-semibold text-gray-800 mb-4 flex items-center">
61
  <i data-feather="file-text" class="mr-2"></i> Script Output
62
  </h2>
63
- <div class="bg-gray-800 rounded-lg p-4 h-64 overflow-auto">
64
- <pre class="text-green-400 font-mono text-sm"><code id="output-code"># Your generated script will appear here...
65
  # Example:
66
  # echo "Quack! Hello World 🦆"</code></pre>
67
  </div>
 
30
  <h1 class="text-5xl font-bold text-gray-800 mb-4">Quacky Code Conjurer 🦆</h1>
31
  <p class="text-xl text-gray-600">Generate magical duck-themed scripts with a quack!</p>
32
  </div>
 
33
  <div class="grid md:grid-cols-2 gap-8">
34
+ <div class="bg-yellow-50 p-6 rounded-lg border-2 border-yellow-200" style="background-color: #1e1e1e !important;">
35
+ <h2 class="text-2xl font-semibold text-gray-800 mb-4 flex items-center">
36
  <i data-feather="code" class="mr-2"></i> Generate Script
37
  </h2>
38
  <div class="space-y-4">
 
59
  <h2 class="text-2xl font-semibold text-gray-800 mb-4 flex items-center">
60
  <i data-feather="file-text" class="mr-2"></i> Script Output
61
  </h2>
62
+ <div class="bg-gray-900 rounded-lg p-4 h-64 overflow-auto">
63
+ <pre class="text-green-400 font-mono text-sm"><code id="output-code"># Your generated script will appear here...
64
  # Example:
65
  # echo "Quack! Hello World 🦆"</code></pre>
66
  </div>
script.js CHANGED
@@ -1,7 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  // Shared JavaScript across all pages
2
  document.addEventListener('DOMContentLoaded', () => {
 
 
 
 
 
 
 
 
 
 
3
  // Example functionality for the code generator
4
- const generateBtn = document.querySelector('.bg-yellow-400');
5
  const outputCode = document.getElementById('output-code');
6
 
7
  if (generateBtn && outputCode) {
 
1
+
2
+ // Duck-themed spell checker for Ducky Script
3
+ function duckySpellCheck(text) {
4
+ const commonMisspellings = {
5
+ 'delay': 'DELAY',
6
+ 'string': 'STRING',
7
+ 'enter': 'ENTER',
8
+ 'windows': 'GUI',
9
+ 'gui': 'GUI',
10
+ 'menu': 'MENU',
11
+ 'shift': 'SHIFT',
12
+ 'alt': 'ALT',
13
+ 'control': 'CTRL',
14
+ 'ctrl': 'CTRL',
15
+ 'arrowup': 'UPARROW',
16
+ 'arrowdown': 'DOWNARROW',
17
+ 'arrowleft': 'LEFTARROW',
18
+ 'arrowright': 'RIGHTARROW',
19
+ 'delete': 'DELETE',
20
+ 'space': 'SPACE'
21
+ };
22
+
23
+ let corrected = text;
24
+ for (const [wrong, right] of Object.entries(commonMisspellings)) {
25
+ const regex = new RegExp(`\\b${wrong}\\b`, 'gi');
26
+ corrected = corrected.replace(regex, right);
27
+ }
28
+ return corrected;
29
+ }
30
+
31
  // Shared JavaScript across all pages
32
  document.addEventListener('DOMContentLoaded', () => {
33
+ // Ducky Script spell check
34
+ const duckyTextarea = document.querySelector('textarea');
35
+ if (duckyTextarea) {
36
+ duckyTextarea.addEventListener('blur', (e) => {
37
+ if (document.querySelector('select').value === 'Ducky Script') {
38
+ e.target.value = duckySpellCheck(e.target.value);
39
+ }
40
+ });
41
+ }
42
+
43
  // Example functionality for the code generator
44
+ const generateBtn = document.querySelector('.bg-yellow-400');
45
  const outputCode = document.getElementById('output-code');
46
 
47
  if (generateBtn && outputCode) {
style.css CHANGED
@@ -1,8 +1,43 @@
1
  /* Shared styles across all pages */
2
  body {
3
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
 
 
4
  }
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  @keyframes float {
7
  0% { transform: translateY(0px); }
8
  50% { transform: translateY(-10px); }
 
1
  /* Shared styles across all pages */
2
  body {
3
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
4
+ background-color: #121212;
5
+ color: #e0e0e0;
6
  }
7
 
8
+ /* Dark theme overrides */
9
+ .bg-white {
10
+ background-color: #1e1e1e !important;
11
+ color: #e0e0e0;
12
+ }
13
+ .bg-gray-50 {
14
+ background-color: #121212 !important;
15
+ }
16
+ .bg-yellow-50 {
17
+ background-color: #332200 !important;
18
+ border-color: #ff8c00 !important;
19
+ }
20
+ .bg-blue-50 {
21
+ background-color: #001a33 !important;
22
+ border-color: #0066cc !important;
23
+ }
24
+ .text-gray-800 {
25
+ color: #e0e0e0 !important;
26
+ }
27
+ .text-gray-600 {
28
+ color: #b0b0b0 !important;
29
+ }
30
+ .bg-yellow-400 {
31
+ background-color: #ff8c00 !important;
32
+ color: #121212 !important;
33
+ }
34
+ .bg-blue-500 {
35
+ background-color: #0066cc !important;
36
+ }
37
+ .bg-gray-200 {
38
+ background-color: #333333 !important;
39
+ color: #e0e0e0 !important;
40
+ }
41
  @keyframes float {
42
  0% { transform: translateY(0px); }
43
  50% { transform: translateY(-10px); }