feat: users page with non working filter button

dev
Antonio De Lucreziis 2 months ago
parent 87d65b52b5
commit 7398f27035

@ -48,14 +48,27 @@ export const UtentiPage = () => {
return ( return (
<> <>
<div class="search"> <div class="search-bar">
<input <div class="filter-select">
type="text" <span class="material-symbols-outlined">filter_list</span>
placeholder="Cerca un utente Poisson..." <select>
onInput={e => ($searchText.value = e.currentTarget.value)} <option value="new-first">Nuovi utenti</option>
value={$searchText.value} <option value="old-first">Vecchi utenti</option>
/> <option value="first-name">Nome</option>
<span class="material-symbols-outlined">search</span> <option value="last-name">Cognome</option>
<option value="uid">Username</option>
</select>
<span class="material-symbols-outlined">expand_more</span>
</div>
<div class="search">
<input
type="text"
placeholder="Cerca un utente Poisson..."
onInput={e => ($searchText.value = e.currentTarget.value)}
value={$searchText.value}
/>
<span class="material-symbols-outlined">search</span>
</div>
</div> </div>
<div class="search-results"> <div class="search-results">
{$searchResults.value ? ( {$searchResults.value ? (
@ -69,8 +82,11 @@ export const UtentiPage = () => {
</div> </div>
<div class="text">{poissonUser.gecos}</div> <div class="text">{poissonUser.gecos}</div>
<div class="right"> <div class="right">
<a href={`https://poisson.phc.dm.unipi.it/~${poissonUser.uid}`}> <a
<span class="material-symbols-outlined">globe</span> href={`https://poisson.phc.dm.unipi.it/~${poissonUser.uid}`}
target="_blank"
>
<span class="material-symbols-outlined">open_in_new</span>
</a> </a>
</div> </div>
</div> </div>

@ -598,4 +598,53 @@
.show-more { .show-more {
place-self: center; place-self: center;
} }
.search-bar {
display: grid;
grid-template-columns: auto 1fr;
width: 100%;
gap: 1rem;
}
.filter-select {
width: 100%;
height: 2.5rem;
@include neo-brutalist-card;
display: grid;
align-items: center;
grid-auto-flow: column;
cursor: pointer;
--filter-bg-color-hover: color-mix(in srgb, var(--filter-bg-color, #ddd), #000 10%);
background: var(--filter-bg-color, #ddd);
&:hover,
&:hover select {
background: var(--filter-bg-color-hover);
}
.material-symbols-outlined {
padding: 0 0.35rem;
}
select {
border: none;
box-shadow: none;
outline: none;
height: 100%;
appearance: none;
cursor: pointer;
padding: 0;
background: var(--filter-bg-color, #ddd);
}
}
} }

@ -241,6 +241,8 @@
.utenti { .utenti {
background: #ffffe4; background: #ffffe4;
--filter-bg-color: #ffd270;
main { main {
justify-self: center; justify-self: center;
@ -248,11 +250,12 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
max-width: 80ch;
padding: 5rem 0; padding: 5rem 0;
gap: 5rem; gap: 5rem;
max-width: 80ch;
.search-result { .search-result {
background: #ffeabc; background: #ffeabc;
} }

Loading…
Cancel
Save