From 2bb02b0e5ecacbf84eac533f73918dc8295ce9ec Mon Sep 17 00:00:00 2001 From: andrea Date: Tue, 9 Apr 2024 16:53:21 +0200 Subject: [PATCH] gallery tweak --- index.html | 4 ++-- style.css | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 73fc5c8..7042cba 100644 --- a/index.html +++ b/index.html @@ -146,9 +146,9 @@

Infopoetry

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); diff --git a/style.css b/style.css index 0b1012b..21b8a31 100644 --- a/style.css +++ b/style.css @@ -66,6 +66,7 @@ em { #gallery > div { margin-right: 2rem; margin-bottom: 2rem; + text-align: center; } .jumbotron-gallery { @@ -118,8 +119,8 @@ em { } .cover { - width: 100%; - height: 15vw; + width: auto; + height: 150px; background-size: cover; background-position: 50% 50%; } @@ -175,7 +176,7 @@ footer li { font-size: 1rem; } - .custom-style img { - width: 50px; + #gallery > div { + margin-right: 0; } } \ No newline at end of file