mirror of
https://github.com/Nereziel/cs2-WeaponPaints.git
synced 2026-03-11 08:48:51 +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; ?>
|
<?php if (empty($categoryWeapons)) continue; ?>
|
||||||
<div class="nav-category">
|
<div class="nav-category">
|
||||||
<div class="nav-item category-header" data-category="<?php echo strtolower($categoryName); ?>" onclick="toggleCategory('<?php echo strtolower($categoryName); ?>')">
|
<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">
|
<div class="nav-content">
|
||||||
<span class="nav-text"><?php echo $categoryName; ?></span>
|
<span class="nav-text"><?php echo $categoryName; ?></span>
|
||||||
<span class="nav-count"><?php echo count($categoryWeapons); ?></span>
|
<span class="nav-count"><?php echo count($categoryWeapons); ?></span>
|
||||||
@@ -519,22 +518,3 @@ if (isset($_SESSION['steamid'])) {
|
|||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
<?php
|
|
||||||
// Helper function for category icons
|
|
||||||
function getCategoryIcon($categoryName) {
|
|
||||||
$icons = [
|
|
||||||
'Knives' => '🗡️',
|
|
||||||
'Gloves' => '🧤',
|
|
||||||
'Rifles' => '🔫',
|
|
||||||
'Pistols' => '🔫',
|
|
||||||
'SMGs' => '🔫',
|
|
||||||
'Shotguns' => '🔫',
|
|
||||||
'Snipers' => '🎯',
|
|
||||||
'Machine Guns' => '⚡',
|
|
||||||
'Grenades' => '💣'
|
|
||||||
];
|
|
||||||
|
|
||||||
return $icons[$categoryName] ?? '🔫';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user