mirror of
				https://gitlab.com/ruany/litebans-php.git
				synced 2025-10-29 14:02:24 +00:00 
			
		
		
		
	Fix badge centering on info.php, set as right-of-center
Badges are now treated as zero-width and will not weigh down the centered header title.
This commit is contained in:
		
							parent
							
								
									a4708ee3f8
								
							
						
					
					
						commit
						39fbdeb0a2
					
				| @ -6,8 +6,8 @@ | ||||
| 
 | ||||
| /* header */ | ||||
| .litebans-header { | ||||
|     text-align: center; | ||||
|     display: block; | ||||
|     text-align: center; | ||||
| } | ||||
| 
 | ||||
| .col-lg-12 { | ||||
| @ -24,6 +24,7 @@ table tr td { | ||||
|     padding-left: 0; | ||||
|     padding-right: 0; | ||||
|     vertical-align: middle !important; | ||||
|     text-align: center; | ||||
| } | ||||
| 
 | ||||
| /* table links */ | ||||
| @ -71,8 +72,13 @@ tr.hover { | ||||
| } | ||||
| 
 | ||||
| /* info.php */ | ||||
| .litebans-info-badges { | ||||
|     width: 0; | ||||
|     display: inline-block; | ||||
| } | ||||
| 
 | ||||
| .litebans-label-info { | ||||
|     margin-left: 13px; | ||||
|     margin-left: 15px; | ||||
|     font-size: 17px; | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -423,7 +423,7 @@ class Page { | ||||
|         echo "<tbody>"; | ||||
|     } | ||||
| 
 | ||||
|     function print_header($container_start = true, $title = null) { | ||||
|     function print_header($container_start = true, $title = null, $class = "modal-header litebans-header") { | ||||
|         if ($title === null) { | ||||
|             $title = $this->title; | ||||
|         } | ||||
| @ -431,9 +431,9 @@ class Page { | ||||
|             echo '<div class="container">'; | ||||
|         } | ||||
| 
 | ||||
|         echo "<div class=\"row\"><div class=\"col-lg-12\"><h1 class=\"modal-header litebans-header\">$title</h1></div></div>"; | ||||
|         echo "<div class=\"row\"><div class=\"col-lg-12\"><h1 class=\"$class\">$title</h1></div>";
 | ||||
|         if ($container_start) { | ||||
|             echo '<div class="row"><div class="col-lg-12">'; | ||||
|             echo '</div><div class="row"><div class="col-lg-12">'; | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										11
									
								
								info.php
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								info.php
									
									
									
									
									
								
							| @ -150,6 +150,7 @@ if ($st->execute(array($id))) { | ||||
|     $page->print_title(); | ||||
| 
 | ||||
|     $header = $page->name; | ||||
|     $badges = ""; | ||||
| 
 | ||||
|     if (!($info instanceof KickInfo)) { | ||||
|         $active = $page->active($row); | ||||
| @ -162,19 +163,19 @@ if ($st->execute(array($id))) { | ||||
|                 $idx = "generic.ipmute"; | ||||
|             } | ||||
|             if ($idx !== null) { | ||||
|                 $header .= "<span class='badge badge-danger litebans-label-info'>" . $page->t($idx) . "</span>"; | ||||
|                 $badges .= "<span class='badge badge-danger litebans-label-info'>" . $page->t($idx) . "</span>"; | ||||
|             } | ||||
|         } | ||||
|         if ($active === true) { | ||||
|             $header .= "<span class='badge badge-danger litebans-label-info'>" . $page->t("generic.active") . "</span>"; | ||||
|             $badges .= "<span class='badge badge-danger litebans-label-info'>" . $page->t("generic.active") . "</span>"; | ||||
|             if ($permanent) { | ||||
|                 $header .= "<span class='badge badge-danger litebans-label-info'>" . $page->t("generic.permanent") . "</span>"; | ||||
|                 $badges .= "<span class='badge badge-danger litebans-label-info'>" . $page->t("generic.permanent") . "</span>"; | ||||
|             } | ||||
|         } else { | ||||
|             $header .= "<span class='badge badge-warning litebans-label-info'>" . $page->t("generic.inactive") . "</span>"; | ||||
|             $badges .= "<span class='badge badge-warning litebans-label-info'>" . $page->t("generic.inactive") . "</span>"; | ||||
|         } | ||||
|     } | ||||
|     $page->print_header(true, $header); | ||||
|     $page->print_header(true, $header . "<div class=\"litebans-info-badges\">$badges</div>"); | ||||
| 
 | ||||
|     $map = $info->basic_info($row, $player_name); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 ruan
						ruan