basheer1414 commited on
Commit
33adc07
·
verified ·
1 Parent(s): e71285d

I'll make that settings all right down below right side of the main window not the canvas and the glass tile inside the settings color change to gradient only grading no solid color only say gradient color and add a small button to oh for color palettes gradient pellets so when I click that I need a pop up a small window to choose modern color gradient pellets five dark gradient 5 a light gradient - Follow Up Deployment

Browse files
Files changed (1) hide show
  1. index.html +44 -18
index.html CHANGED
@@ -558,11 +558,11 @@
558
  </style>
559
  </head>
560
  <body id="appBody" class="min-h-screen flex items-center justify-center p-4 transition-colors duration-300 bg-slate-100 dark:bg-gray-900">
561
- <!-- Glass-morph settings button (bottom-right) -->
562
- <button id="glassSettingsBtn"
563
- title="Glass settings"
564
- class="fixed bottom-3 right-3 z-50 w-5 h-5 text-cyan-400 hover:text-cyan-300 transition-transform hover:scale-125">
565
- <svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm-8.5-2c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm17 0c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"/></svg>
566
  </button>
567
 
568
  <!-- Dark / Light Mode Toggle -->
@@ -697,18 +697,13 @@
697
  </div>
698
  </div>
699
 
700
- <!-- Glass-morph Settings Mini Modal -->
701
- <div id="glassSettingsModal"
702
- class="fixed bottom-12 right-3 z-50 hidden bg-gray-900/90 backdrop-blur-md border border-cyan-400/30 rounded-lg p-2 w-48 text-xs text-white shadow-lg">
703
- <h4 class="text-cyan-300 mb-1">Glass Style</h4>
704
-
705
- <label class="block mb-1"><input type="color" id="glassColor" value="#eb8efdd9" class="w-4 h-4 rounded border-none"> Color</label>
706
-
707
- <label class="block mb-1">Blur <input type="range" id="glassBlur" min="0" max="30" value="15" class="w-full h-1 bg-gray-700 rounded appearance-none"></label>
708
-
709
- <label class="block mb-1">Border <input type="range" id="glassBorder" min="0" max="1" step="0.05" value="0.34" class="w-full h-1 bg-gray-700 rounded appearance-none"></label>
710
-
711
- <label class="block mb-1">Shadow <input type="range" id="glassShadow" min="0" max="1" step="0.05" value="0.5" class="w-full h-1 bg-gray-700 rounded appearance-none"></label>
712
  </div>
713
 
714
  <!-- Animated Background Particles -->
@@ -794,7 +789,38 @@
794
  const glassBorder = document.getElementById('glassBorder');
795
  const glassShadow = document.getElementById('glassShadow');
796
 
797
- glassBtn.addEventListener('click', () => glassMod.classList.toggle('hidden'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
798
 
799
  function updateGlass() {
800
  const color = glassColor.value;
 
558
  </style>
559
  </head>
560
  <body id="appBody" class="min-h-screen flex items-center justify-center p-4 transition-colors duration-300 bg-slate-100 dark:bg-gray-900">
561
+ <!-- tiny palette button inside chat-input row -->
562
+ <button id="paletteBtn"
563
+ title="Choose gradient"
564
+ class="bg-cyan-500 text-white text-xs px-1.5 py-0.5 rounded absolute bottom-4 right-16 z-10">
565
+ 🎨
566
  </button>
567
 
568
  <!-- Dark / Light Mode Toggle -->
 
697
  </div>
698
  </div>
699
 
700
+ <!-- Gradient-Palette Pop-up -->
701
+ <div id="palettePopup"
702
+ class="hidden absolute bg-gray-900/90 backdrop-blur-md border border-cyan-400/30 rounded-lg p-2 z-20 text-xs w-48">
703
+ <h4 class="text-cyan-300 mb-1">Glass Gradients</h4>
704
+ <div id="glassGradients" class="grid grid-cols-2 gap-1">
705
+ <!-- filled by JS -->
706
+ </div>
 
 
 
 
 
707
  </div>
708
 
709
  <!-- Animated Background Particles -->
 
789
  const glassBorder = document.getElementById('glassBorder');
790
  const glassShadow = document.getElementById('glassShadow');
791
 
792
+ const paletteBtn = document.getElementById('paletteBtn');
793
+ const palettePopup = document.getElementById('palettePopup');
794
+ const glassGradients = document.getElementById('glassGradients');
795
+
796
+ paletteBtn.addEventListener('click', () => palettePopup.classList.toggle('hidden'));
797
+
798
+ // build 10 gradient swatches
799
+ const lightGlass = [
800
+ 'linear-gradient(135deg,#ffeaa7,#fab1a0)',
801
+ 'linear-gradient(135deg,#a29bfe,#6c5ce7)',
802
+ 'linear-gradient(135deg,#74b9ff,#0984e3)',
803
+ 'linear-gradient(135deg,#fd79a8,#e84393)',
804
+ 'linear-gradient(135deg,#55efc4,#00b894)'
805
+ ];
806
+ const darkGlass = [
807
+ 'linear-gradient(135deg,#2d3436,#636e72)',
808
+ 'linear-gradient(135deg,#192a56,#273c75)',
809
+ 'linear-gradient(135deg,#192a56,#40739e)',
810
+ 'linear-gradient(135deg,#2f3640,#353b48)',
811
+ 'linear-gradient(135deg,#273c75,#192a56)'
812
+ ];
813
+
814
+ [...lightGlass, ...darkGlass].forEach(grad => {
815
+ const sw = document.createElement('button');
816
+ sw.className = 'w-full h-6 rounded border border-cyan-400/30 hover:scale-110 transition-transform';
817
+ sw.style.background = grad;
818
+ sw.addEventListener('click', () => {
819
+ chatContainer.style.background = grad;
820
+ palettePopup.classList.add('hidden');
821
+ });
822
+ glassGradients.appendChild(sw);
823
+ });
824
 
825
  function updateGlass() {
826
  const color = glassColor.value;