Skip to content

Commit

Permalink
added another example
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreycwitt committed May 22, 2024
1 parent af189d0 commit b9e8224
Show file tree
Hide file tree
Showing 3 changed files with 243 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dhsi/day-one/custom-viewer-demos/example1.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ <h1>Table of contents</h1>
Image1
</a>
</li>
<a href="https://loris2.scta.info/sorb/S100v.jpg/full/full/0/default.jpg">
<img src="https://loris2.scta.info/sorb/S100v.jpg/full/100,/0/default.jpg">
<a href="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/full/full/0/default.jpg">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/full/100,/0/default.jpg">
Image2
</a>
</li>
Expand Down
240 changes: 240 additions & 0 deletions dhsi/day-one/custom-viewer-demos/image2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
<html>
<head>
<style>
.grid-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
grid-gap: 10px;
justify-items: center;
align-items: center;
}
image{
margin: 100px
}
.grid-container img {
width: 100%;
height: 200px;
}

.grid-container2 {
display: grid;
grid-template-columns: auto auto auto auto auto auto;
grid-template-rows: auto 1fr;
grid-gap: 10px;
justify-content: start;

}
.inner-grid2 {
display: grid;
grid-template-rows: 1fr 1fr;
grid-gap: 10px;
}
/* .grid-container2 img {
width: 100%;
height: auto;
} */

.grid-container2 .image-container{
filter: grayscale(50%);
}

.grid-container2 .image-container{
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-container2 .image-container:hover {
transform: scale(1.2);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
filter: grayscale(0%);
z-index: 1;
}

.text-box{
text-align:justify;
height: 340px; width:
270px;
overflow: visible;
padding: 30px 30px;
background-color: rgb(232, 55, 69);
transition: transform 0.3s ease, box-shadow 0.3s ease;
filter: grayscale(50%);
}
.grid-container2 .text-box:hover {
transform: scale(1.1);
box-shadow: 0 0 10px rgb(232, 55, 69);
filter: grayscale(0%);
z-index: 1;
}
.image-container {
position: relative;
overflow: hidden;
}

.overlay-text {
position: absolute;
bottom: 0;
left: 0;
/* width: 100%; */
color: white;
font-size: 14px;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
background: rgba(0, 0, 0, 0.5);
transform: translateY(100%);
transition: transform 0.3s ease;
padding: 10%;
text-align: center;
}
.image-container:hover .overlay-text {
transform: translateY(0);
}

.image-special-effect {
position: relative;
}
.image-special-effect::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: repeating-linear-gradient(
45deg,
transparent,
transparent 2px,
red 2px,
red 10px
);
opacity: 0.2;
}
</style>
</head>
<body style="margin: auto; width: 1600px" >
<h1>Image 2 Example</h1>
<div class="grid-container2">
<div class="image-container">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/full/330,400/0/default.jpg">
<div class="overlay-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>
</div>
<div class="inner-grid2">
<div class="image-container">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/full/,195/0/default.jpg">
<div class="overlay-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</div>
</div>
<div class="image-container">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/full/,195/0/default.jpg">
<div class="overlay-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</div>
</div>
</div>
<div class="image-container">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/1203,1740,1168,1215/330,400/0/default.jpg">
<div class="overlay-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>
</div>
<div class="inner-grid2">
<div class="image-container">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/1203,1740,1168,1215/,195/0/default.jpg">
<div class="overlay-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</div>
</div>
<div class="image-container">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/1959,906,1168,1215/,195/0/default.jpg">
<div class="overlay-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</div>
</div>
</div>
<div class="inner-grid2">
<div class="image-container">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/3994,3509,752,863/194,195/0/default.jpg">
<div class="overlay-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</div>
</div>
<div class="image-container">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/3792,2191,248,250/,195/0/default.jpg">
<div class="overlay-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</div>
</div>
</div>
<div class="text-box">
<h1 style="margin-top:0">Descriptions</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<div class="text-box">
<h1 style="margin-top:0">Descriptions</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>

<div class="inner-grid2">
<div class="image-container">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/full/,195/0/default.jpg">
<div class="overlay-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</div>
</div>
<div class="image-container">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/full/,195/0/default.jpg">
<div class="overlay-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</div>
</div>
</div>
<div class="image-container image-special-effect">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/3278,1724,1168,1215/330,400/0/default.jpg">
<div class="overlay-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>
</div>
<div class="inner-grid2">
<div class="image-container">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/1203,1740,1168,1215/,195/0/default.jpg">
<div class="overlay-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</div>
</div>
<div class="image-container">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/1959,906,1168,1215/,195/0/default.jpg">
<div class="overlay-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</div>
</div>
</div>
<div class="inner-grid2">
<div class="image-container">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/3994,3509,752,863/194,195/0/default.jpg">
<div class="overlay-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</div>
</div>
<div class="image-container">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/3792,2191,248,250/,195/0/default.jpg">
<div class="overlay-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</div>
</div>
</div>
<!-- <div class="text-box" style="text-align: justify; height: 340px; width: 270px; overflow: visible; padding: 30px 30px; background-color: rgb(28, 176, 149);">
<h1 style="margin-top:0">Descriptions</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div> -->
<div class="image-container image-special-effect">
<img src="https://iiif.bodleian.ox.ac.uk/iiif/image/e58b8c60-005c-4c41-a22f-07d49cb25ede/full/330,400/0/default.jpg">
<div class="overlay-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>
</div>

</div>
</body>
</html>
```
2 changes: 1 addition & 1 deletion dhsi/day-one/exercise.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ That's a great start. There's a ton more we can do here, but let's pause and cre
1. Use the IIIF Image API url parameters to create lots of version of the same image, offering your users lots of perspectives.
2. Add labels and descriptions that you think will help your user.
3. Are there any navigation links you need to add here? (E.g. "Next", "Previous", "Home")
4. See my <a href="custom-viewer-demos/image1.html" target="_blank">image 1 example</a> for inspiration
4. See my <a href="custom-viewer-demos/image1.html" target="_blank">image 1 example</a> or <a href="custom-viewer-demos/image2.html" target="_blank">image 2 example</a> for inspiration.
6. Once you've finished one page, do a "save as" and make a new file called `image2.html` and then modify to display image 2. Do this for all five of your images.

### 3. Reflection
Expand Down

0 comments on commit b9e8224

Please sign in to comment.