mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-11-03 20:45:58 +01:00 
			
		
		
		
	fix: category images (helpers.generateCategoryBackground)
This commit is contained in:
		@@ -57,19 +57,22 @@
 | 
			
		||||
	helpers.generateCategoryBackground = function(category) {
 | 
			
		||||
		var style = [];
 | 
			
		||||
 | 
			
		||||
		if (category.backgroundImage) {
 | 
			
		||||
			style.push('background-image: url(' + category.backgroundImage + ')');
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (category.bgColor) {
 | 
			
		||||
			style.push('background-color: ' + category.bgColor + ';');
 | 
			
		||||
			style.push('background-color: ' + category.bgColor);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (category.color) {
 | 
			
		||||
			style.push('color: ' + category.color + ';');
 | 
			
		||||
			style.push('color: ' + category.color);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		return style.join(' ');
 | 
			
		||||
		if (category.backgroundImage) {
 | 
			
		||||
			style.push('background-image: url(' + category.backgroundImage + ')');
 | 
			
		||||
			if (category.imageClass) {
 | 
			
		||||
				style.push('background-size: ' + category.imageClass);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		return style.join('; ') + ';';
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	helpers.generateTopicClass = function(topic) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user