Avanços en Pobles

This commit is contained in:
Pasq G 2024-12-25 16:15:28 +01:00
parent e129eb4107
commit 9a64c013ea

View File

@ -113,7 +113,8 @@ export const Pobles = () => {
}}>{ }}>{
pobles pobles
.sort((a,b) => a.nomPoble?.toLowerCase() > b.nomPoble?.toLowerCase()) .sort((a,b) => a.nomPoble?.toLowerCase() > b.nomPoble?.toLowerCase())
.map(pob => <li .map(pob =>
<li
key={`pob_${pob._id}`} key={`pob_${pob._id}`}
style={{ style={{
display: `block`, display: `block`,
@ -121,9 +122,81 @@ export const Pobles = () => {
borderRadius: `.4em`, borderRadius: `.4em`,
padding: `4px`, padding: `4px`,
listStyle: `none`, listStyle: `none`,
backgroundColor: `${'lightgreen' || 'lightcoral'}` backgroundColor: `${'lightgreen' || 'lightcoral'}`,
position: 'relative',
margin: '.2em'
}} }}
> >
{
<div style={{
position: `absolute`,
// display: `inline-block`,
display: `flex`,
justifyContent: `space-around`,
left: `0`,
top: `-.8em`,
width: `100%`,
fontSize: `60%`,
textAlign: `center`,
pointerEvents: `none`
}}>
<span style={{
border: `1px solid #6666`,
borderRadius: `50%`,
minWidth: `1rem`,
backgroundColor: `#fffa`
}}>1</span>
<span style={{
border: `1px solid #6666`,
borderRadius: `50%`,
minWidth: `1rem`,
backgroundColor: `#fffa`
}}>2</span>
<span style={{
border: `1px solid #6666`,
borderRadius: `50%`,
minWidth: `1rem`,
backgroundColor: `#fffa`
}}>3</span>
</div>
}
{
<div style={{
position: `absolute`,
// display: `inline-block`,
display: `flex`,
// justifyContent: `space-around`,
left: `-1.5em`,
// top: `-.8em`,
width: `100%`,
fontSize: `60%`,
textAlign: `center`,
// lineHeight: `100%`
top: `.8em`,
pointerEvents: `none`
}}>
<span style={{
border: `1px solid #6666`,
borderRadius: `50%`,
minWidth: `1rem`,
backgroundColor: `#fffa`
}}>0</span>
{/* <span style={{
border: `1px solid #6666`,
borderRadius: `50%`,
minWidth: `1rem`,
backgroundColor: `#fffa`
}}>2</span>
<span style={{
border: `1px solid #6666`,
borderRadius: `50%`,
minWidth: `1rem`,
backgroundColor: `#fffa`
}}>3</span> */}
</div>
}
<Link to={`/poble/${pob.ambitAssociat}`}> <Link to={`/poble/${pob.ambitAssociat}`}>
{pob.nomPoble} {esEditor && <button {pob.nomPoble} {esEditor && <button
onClick={(ev) => { onClick={(ev) => {
@ -134,9 +207,10 @@ export const Pobles = () => {
} }
}>Edita</button>} }>Edita</button>}
</Link> </Link>
</li>) </li>
)
}</ul> }</ul>
{esEditor && <button {esEditor && <button
onPointerUp={ev => { onPointerUp={ev => {
setCreantPoble(!creantPoble); setCreantPoble(!creantPoble);