Avanços en Pobles
This commit is contained in:
parent
e129eb4107
commit
9a64c013ea
@ -113,30 +113,104 @@ 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 =>
|
||||||
key={`pob_${pob._id}`}
|
<li
|
||||||
style={{
|
key={`pob_${pob._id}`}
|
||||||
display: `block`,
|
style={{
|
||||||
border: `1px solid #6666`,
|
display: `block`,
|
||||||
borderRadius: `.4em`,
|
border: `1px solid #6666`,
|
||||||
padding: `4px`,
|
borderRadius: `.4em`,
|
||||||
listStyle: `none`,
|
padding: `4px`,
|
||||||
backgroundColor: `${'lightgreen' || 'lightcoral'}`
|
listStyle: `none`,
|
||||||
}}
|
backgroundColor: `${'lightgreen' || 'lightcoral'}`,
|
||||||
>
|
position: 'relative',
|
||||||
<Link to={`/poble/${pob.ambitAssociat}`}>
|
margin: '.2em'
|
||||||
{pob.nomPoble}{esEditor && <button
|
}}
|
||||||
onClick={(ev) => {
|
>
|
||||||
ev.preventDefault();
|
{
|
||||||
ev.stopPropagation();
|
<div style={{
|
||||||
|
position: `absolute`,
|
||||||
setPobleSeleccionat(pob);
|
// display: `inline-block`,
|
||||||
}
|
display: `flex`,
|
||||||
}>Edita</button>}
|
justifyContent: `space-around`,
|
||||||
</Link>
|
left: `0`,
|
||||||
</li>)
|
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}`}>
|
||||||
|
{pob.nomPoble} {esEditor && <button
|
||||||
|
onClick={(ev) => {
|
||||||
|
ev.preventDefault();
|
||||||
|
ev.stopPropagation();
|
||||||
|
|
||||||
|
setPobleSeleccionat(pob);
|
||||||
|
}
|
||||||
|
}>Edita</button>}
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
)
|
||||||
}</ul>
|
}</ul>
|
||||||
|
|
||||||
{esEditor && <button
|
{esEditor && <button
|
||||||
onPointerUp={ev => {
|
onPointerUp={ev => {
|
||||||
setCreantPoble(!creantPoble);
|
setCreantPoble(!creantPoble);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user