Skip to content

Commit

Permalink
gallery tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
andreabenedetti committed Apr 9, 2024
1 parent c9045ff commit 2bb02b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ <h4>Infopoetry</h4>
const container = d3.select('#gallery');
const item = container.selectAll('div')
.data(data)
.enter().append('div').classed("custom-style", true);
.enter().append('div');

item.append("img").style("height", "10vw").attr("src", d => d.img).classed("cover", true);
item.append("img").attr("src", d => d.img).classed("cover", true);
item.append("p").text(d => d.name);

item.append("p").append("a").attr("href", d => d.link).attr("target", "_blank").text(d => d.title).style("font-weight", 700);
Expand Down
9 changes: 5 additions & 4 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ em {
#gallery > div {
margin-right: 2rem;
margin-bottom: 2rem;
text-align: center;
}

.jumbotron-gallery {
Expand Down Expand Up @@ -118,8 +119,8 @@ em {
}

.cover {
width: 100%;
height: 15vw;
width: auto;
height: 150px;
background-size: cover;
background-position: 50% 50%;
}
Expand Down Expand Up @@ -175,7 +176,7 @@ footer li {
font-size: 1rem;
}

.custom-style img {
width: 50px;
#gallery > div {
margin-right: 0;
}
}

0 comments on commit 2bb02b0

Please sign in to comment.