forked from Public/pics
		
	Compute border colours on album indices, too.
This commit is contained in:
		
							parent
							
								
									1fe2e5057f
								
							
						
					
					
						commit
						90ed084783
					
				@ -35,8 +35,12 @@ class AlbumIndex extends SubTemplate
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
			foreach ($photos as $album)
 | 
								foreach ($photos as $album)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
 | 
									$color = isset($album['thumbnail']) ? $album['thumbnail']->bestColor() : 'ccc';
 | 
				
			||||||
 | 
									if ($color == 'FFFFFF')
 | 
				
			||||||
 | 
										$color = 'ccc';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				echo '
 | 
									echo '
 | 
				
			||||||
						<div class="landscape">';
 | 
											<div class="landscape" style="border-color: #', $color, '">';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				if ($this->show_edit_buttons)
 | 
									if ($this->show_edit_buttons)
 | 
				
			||||||
					echo '
 | 
										echo '
 | 
				
			||||||
 | 
				
			|||||||
@ -139,12 +139,8 @@ class PhotosIndex extends SubTemplate
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		foreach ($photos as $image)
 | 
							foreach ($photos as $image)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			$color = $image->bestColor();
 | 
					 | 
				
			||||||
			if ($color == 'FFFFFF')
 | 
					 | 
				
			||||||
				$color = 'ccc';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			echo '
 | 
								echo '
 | 
				
			||||||
						<div style="border-color: #', $color, '" class="landscape">';
 | 
											<div style="border-color: #', $this->color($image), '" class="landscape">';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			$this->photo($image, static::TILE_WIDTH, static::TILE_HEIGHT, 'top');
 | 
								$this->photo($image, static::TILE_WIDTH, static::TILE_HEIGHT, 'top');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user