mirror of
https://github.com/Nereziel/cs2-WeaponPaints.git
synced 2026-02-19 19:00:02 +00:00
Remove unused getCategoryIcon function and associated icon display in index.php, streamlining the code and improving maintainability.
This commit is contained in:
@@ -72,7 +72,6 @@ if (isset($_SESSION['steamid'])) {
|
||||
<?php if (empty($categoryWeapons)) continue; ?>
|
||||
<div class="nav-category">
|
||||
<div class="nav-item category-header" data-category="<?php echo strtolower($categoryName); ?>" onclick="toggleCategory('<?php echo strtolower($categoryName); ?>')">
|
||||
<span class="nav-icon"><?php echo getCategoryIcon($categoryName); ?></span>
|
||||
<div class="nav-content">
|
||||
<span class="nav-text"><?php echo $categoryName; ?></span>
|
||||
<span class="nav-count"><?php echo count($categoryWeapons); ?></span>
|
||||
@@ -518,23 +517,4 @@ if (isset($_SESSION['steamid'])) {
|
||||
<?php endif; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?php
|
||||
// Helper function for category icons
|
||||
function getCategoryIcon($categoryName) {
|
||||
$icons = [
|
||||
'Knives' => '🗡️',
|
||||
'Gloves' => '🧤',
|
||||
'Rifles' => '🔫',
|
||||
'Pistols' => '🔫',
|
||||
'SMGs' => '🔫',
|
||||
'Shotguns' => '🔫',
|
||||
'Snipers' => '🎯',
|
||||
'Machine Guns' => '⚡',
|
||||
'Grenades' => '💣'
|
||||
];
|
||||
|
||||
return $icons[$categoryName] ?? '🔫';
|
||||
}
|
||||
?>
|
||||
</html>
|
||||
Reference in New Issue
Block a user