Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
EspectroW94 committed Dec 28, 2024
1 parent 7b60c90 commit bf22a98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div id="header">
<ul class="nav">
<li><a href="index.html">Inicio</a></li>
<li><a href="/items/index.html">Items</a></li>
<li><a href="items/index.html">Items</a></li>
<!-- <ul>
<li id="submenu"><a href="Mineria.html">Mineria y Herreria</a></li>
<li id="submenu"><a href="Peleteria.html">Peleteria y Desollo</a></li>
Expand Down
6 changes: 5 additions & 1 deletion items/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ Papa.parse('items.csv', {

const itemImage = document.createElement('img');
itemImage.classList.add('item-image');
itemImage.src = `assets/items/${item.Icon}`;
// Obtener la primera letra y convertirla a mayúscula
const firstLetter = item.Icon[0].toUpperCase();
// Concatenar la primera letra en mayúscula con el resto del nombre
const imageName = firstLetter + item.Icon.slice(1);
itemImage.src = `assets/items/${imageName}`;

const itemName = document.createElement('h3');
itemName.classList.add('item-name');
Expand Down

0 comments on commit bf22a98

Please sign in to comment.