simplify admin json by mutating name string for link, add hover state to admin card links
This commit is contained in:
@@ -2,8 +2,7 @@
|
|||||||
{
|
{
|
||||||
"name": "jamesen",
|
"name": "jamesen",
|
||||||
"desc": "Frontendowiec nie jebany.",
|
"desc": "Frontendowiec nie jebany.",
|
||||||
"img": "https://pbs.twimg.com/profile_images/1605591811921149953/Ogr8ALPa_400x400.jpg",
|
"img": "https://pbs.twimg.com/profile_images/1605591811921149953/Ogr8ALPa_400x400.jpg"
|
||||||
"profilehref": "jamesen"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Mollin",
|
"name": "Mollin",
|
||||||
|
|||||||
@@ -51,7 +51,9 @@ const PageInfo = () => {
|
|||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
key={el.name}
|
key={el.name}
|
||||||
href={el.profilehref ? `/profile/${el.profilehref}` : ""}
|
href={`/profile/${el.name
|
||||||
|
.replaceAll(" ", "-")
|
||||||
|
.toLocaleLowerCase()}`}
|
||||||
>
|
>
|
||||||
<article>
|
<article>
|
||||||
<img src={el.img} alt={`zdjęcie profilowe ${el.name}`} />
|
<img src={el.img} alt={`zdjęcie profilowe ${el.name}`} />
|
||||||
|
|||||||
@@ -50,7 +50,6 @@
|
|||||||
a {
|
a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: inherit;
|
text-decoration: inherit;
|
||||||
}
|
|
||||||
article {
|
article {
|
||||||
--radius: 6px;
|
--radius: 6px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -59,6 +58,7 @@
|
|||||||
background: var(--black1);
|
background: var(--black1);
|
||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
box-shadow: var(--shadow0);
|
box-shadow: var(--shadow0);
|
||||||
|
transition-duration: 100ms;
|
||||||
img {
|
img {
|
||||||
width: 128px;
|
width: 128px;
|
||||||
max-width: 156px;
|
max-width: 156px;
|
||||||
@@ -76,6 +76,9 @@
|
|||||||
min-width: 14rem;
|
min-width: 14rem;
|
||||||
padding: 0 1rem;
|
padding: 0 1rem;
|
||||||
}
|
}
|
||||||
|
&:hover {
|
||||||
|
background: var(--black2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 400px) {
|
@media screen and (max-width: 400px) {
|
||||||
article {
|
article {
|
||||||
@@ -90,4 +93,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user