datasets now redirect to their details pages.
also implemented 'button' look and feel for the datasets
This commit is contained in:
parent
cd1e4c6b26
commit
464cf104f9
@ -104,7 +104,15 @@ export default class Dataset {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
clone.querySelector(".dataset").dataset.id = this.#id;
|
let datasetContainer = clone.querySelector(".dataset");
|
||||||
|
datasetContainer.dataset.id = this.#id;
|
||||||
|
datasetContainer.addEventListener("click", event => {
|
||||||
|
if (!event.target.classList.contains("btn")) {
|
||||||
|
let detailsPage = new URL("/details.html", location.origin);
|
||||||
|
detailsPage.searchParams.append("id", this.#id);
|
||||||
|
window.location.href = detailsPage.toString();
|
||||||
|
}
|
||||||
|
})
|
||||||
clone.querySelector(".dataset-title").innerText = this.#title;
|
clone.querySelector(".dataset-title").innerText = this.#title;
|
||||||
clone.querySelector(".dataset-description").innerText = this.#description;
|
clone.querySelector(".dataset-description").innerText = this.#description;
|
||||||
clone.querySelector(".upvote-count").innerText = this.#upvotes;
|
clone.querySelector(".upvote-count").innerText = this.#upvotes;
|
||||||
|
@ -109,6 +109,11 @@ header {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataset:hover {
|
||||||
|
filter: brightness(1.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.upvote {
|
.upvote {
|
||||||
|
Loading…
Reference in New Issue
Block a user