mirror of
				https://github.com/billz/raspap-webgui.git
				synced 2025-03-01 10:31:47 +00:00 
			
		
		
		
	Initial commit
This commit is contained in:
		
							
								
								
									
										23
									
								
								app/js/huebee.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								app/js/huebee.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| // Initialize Huebee color picker | ||||
| var elem = document.querySelector('.color-input'); | ||||
| var hueb = new Huebee( elem, { | ||||
|     notation: 'hex', | ||||
|     saturations: 2, | ||||
|     customColors: [ '#d8224c', '#dd4814', '#ea0', '#19f', '#333' ], | ||||
|     className: 'light-picker', | ||||
|     hue0: 210 | ||||
| }); | ||||
|  | ||||
| // Set custom color if defined | ||||
| var color = getCookie('color'); | ||||
| if (color == null || color == '') { | ||||
|     color = '#d8224c'; | ||||
| } | ||||
| hueb.setColor(color); | ||||
|  | ||||
| // Change event | ||||
| hueb.on( 'change', function( color, hue, sat, lum ) { | ||||
|     setCookie('color',color,90); | ||||
|     console.log(color) | ||||
| }) | ||||
|  | ||||
							
								
								
									
										21
									
								
								app/lib/color.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								app/lib/color.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| <?php header("Content-Type: text/css; charset=utf-8"); ?> | ||||
|  | ||||
| <?php | ||||
| if (!isset($_COOKIE['color'])) { | ||||
|     $color = "#d8224c"; | ||||
| } else { | ||||
|     $color = $_COOKIE['color']; | ||||
| } | ||||
| ?> | ||||
|  | ||||
| .card .card-header { | ||||
|   border-color: <?php echo $color; ?>; | ||||
|   color: #fff; | ||||
|   background-color: <?php echo $color; ?>; | ||||
| } | ||||
|  | ||||
| .btn-primary { | ||||
|   color: <?php echo $color; ?>; | ||||
|   border-color: <?php echo $color; ?>; | ||||
|   background-color: #fff; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user