Skip to content

Commit

Permalink
Disable DZI, treat new line for artwork desc.
Browse files Browse the repository at this point in the history
  • Loading branch information
aksylumoed committed Jul 9, 2024
1 parent 15b78bc commit e1269b2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion dist/bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<div class="container">
<img src="title.webp" alt="Main Artwork" class="logo-image">
<a href="artworks/" class="view-link">/artworks</a>
<a href="https://www.instagram.com/adndkr" class="view-link">/contact</a>
</div>
<script>
// Adjust the height on initial load
Expand Down
24 changes: 12 additions & 12 deletions src/artworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ let viewer = null;
document.addEventListener('DOMContentLoaded', () => displayArtwork(currentArtworkIndex));
document.addEventListener('keydown', handleKeyPress);

document.getElementById('initialArtwork').addEventListener('click', function() {
const initialArtwork = document.getElementById('initialArtwork');
const info = document.getElementById('infoContainer');
const homeLink = document.getElementById('homeLink');
if (initialArtwork) {
initialArtwork.style.display = 'none'; // Hide the initial artwork image
info.style.display = 'none';
homeLink.style.display = 'none'

}
displayDzi(currentArtworkIndex); // Call to display artwork in OpenSeadragon
});
// document.getElementById('initialArtwork').addEventListener('click', function() {
// const initialArtwork = document.getElementById('initialArtwork');
// const info = document.getElementById('infoContainer');
// const homeLink = document.getElementById('homeLink');
// if (initialArtwork) {
// initialArtwork.style.display = 'none'; // Hide the initial artwork image
// info.style.display = 'none';
// homeLink.style.display = 'none'

// }
// displayDzi(currentArtworkIndex); // Call to display artwork in OpenSeadragon
// });

document.getElementById('closeViewer').addEventListener('click', function() {
document.getElementById('artworkContainer').style.display = 'none'; // Hide the viewer
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const artworks: Artwork[] = [
imagePath: "../png/10-fs8.png",
// imagePath: "https://adndkr-art.s3.eu-north-1.amazonaws.com/png/4.png",
dziPath: "https://adndkr-art.s3.eu-north-1.amazonaws.com/4.dzi",
description: `l: 150 x 150cm m: 150 x 150cm r: 150 x 150cm aluminium dibond, direct print`,
description: `l: 150 x 150cm \nm: 150 x 150cm \nr: 150 x 150cm \naluminium dibond, direct print`,
minZoomLevel: 1.2,
maxWidthPercentage: "100%",
maxWidthPercentageMobile: "80%"
Expand Down
3 changes: 2 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,10 @@ body {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3; /* Limit to 3 lines */
-webkit-line-clamp: 5; /* Limit to 3 lines */
-webkit-box-orient: vertical;
line-height: 1.4; /* Adjust line height for better readability */
white-space: pre-wrap; /* Preserve whitespace and line breaks */
}

.navigation {
Expand Down

0 comments on commit e1269b2

Please sign in to comment.