-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathredpathEgg2.html
159 lines (137 loc) · 3.8 KB
/
redpathEgg2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!DOCTYPE html>
<html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-191749773-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-191749773-2');
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
overflow-y: scroll;
-ms-overflow-style:none;
scrollbar-width:none;
font-family: 'PT Sans', sans-serif;
}
.grid-container {
display: grid;
grid-template-columns: 0.2fr 2fr 0.2fr 2.4fr 0.2fr;
grid-template-rows: 0.2fr 0.7fr 2.8fr 1fr 0.3fr;
gap: 0px 0px;
grid-template-areas:
". Text . . ."
". Text . Percival ."
". Text . . ."
". . . . .";
}
.Text {
grid-area: Text;
}
.Percival {
grid-area: Percival;
}
body::-webkit-scrollbar{
display:none;
}
#img-zoomed {
width: 3000px;
height: 100%;
cursor:none;
position: relative;
margin-top: 40px;
margin-left: 50px;
}
#originalImage {
width: 600px;
height: auto;
}
#img-zoomed:hover, #img-zoomer-box:active {
cursor: zoom-in;
cursor:none;
}
#img-zoomed:hover #glass,
#img-zoomed:active #glass {
opacity: 1;
}
#glass {
width: 300px;
height: 300px;
background: url('images/RG4_C4_1.jpg') no-repeat ;
pointer-events: none;
position: absolute;
opacity: 0;
border: 10px solid black;
z-index: 99;
border-radius: 100%;
display: block;
transition: opacity 0.5s;
}
#textBlock{
width: 550px;
margin-left: 2%;
margin-top: 20px;
font-size:120%;
text-align:left;
Float: left;
background: #f6f5f3;
height:30em;
-webkit-box-orient:horizontal;
-webkit-box-direction:horizontal;
display:-webkit-box;
display:-ms-flexbox;
display:flex;
-ms-flex-direction:column;
flex-direction:column;
position: relative;
border-radius: 16px;
}
</style>
</head>
<body>
<div class="grid-container">
<div id="textBlock" class="Text">
<h3 align="center"> Redpath Legacy </h3>
<ul>The archival document that you see is part of the 1880 board of governors minutes and details the establishment of the Redpath Museum by Peter Redpath.
<br>
<br>With Redpath's donation the University planned to "maintain in perpetuity a place of deposit and study of specimens in Geology, Mineralogy, Paleontology, Botany and Archaeology."
<br>
<br> This letter is part of Record Group 4, McGill University Archives.
</ul>
</div>
<div id="img-zoomed" class = "Percival">
<img id="originalImage" src="images/RG4_C4_1.jpg">
<div id="glass"></div>
</div>
</div>
<script>
var zoom = function (){
document.getElementById('img-zoomed').addEventListener('mousemove', function(e) {
var original = document.getElementById('originalImage'),
magnified = document.getElementById('glass'),
style = magnified.style,
x = e.pageX - this.offsetLeft,
y = e.pageY - this.offsetTop,
imgWidth = original.width,
imgHeight = original.height,
xZoomPos = ((x/imgWidth) * 100),
yZoomPos = ((y/imgHeight) * 100);
if(x > (.01 * imgWidth)) {
xZoomPos += (.15 * xZoomPos);
};
if(y >= (.01 * imgHeight)) {
yZoomPos += (.15 * yZoomPos);
};
style.backgroundPositionX = (xZoomPos - 9) + '%';
style.backgroundPositionY = (yZoomPos - 9) + '%';
style.left = (x - 200) + 'px';
style.top = (y - 150) + 'px';
},
false);
}();
</script>
</body>
</html>