Spaces:
Running
Running
Update index.html
Browse files- index.html +17 -15
index.html
CHANGED
@@ -39,7 +39,7 @@
|
|
39 |
position: absolute;
|
40 |
top: 0;
|
41 |
left: 30%;
|
42 |
-
width:
|
43 |
height: 100%;
|
44 |
background: rgb(0, 80, 150);
|
45 |
cursor: ew-resize;
|
@@ -51,40 +51,41 @@
|
|
51 |
|
52 |
.slider::before,
|
53 |
.slider::after {
|
54 |
-
content:
|
55 |
position: absolute;
|
56 |
top: 50%;
|
57 |
transform: translateY(-50%);
|
58 |
-
width:
|
59 |
-
height:
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
63 |
}
|
64 |
|
65 |
.slider::before {
|
66 |
-
left: -
|
67 |
-
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="rgb(0, 80, 150)"><path d="M15.41,7.41 L14,6 L8,12 L14,18 L15.41,16.59 L11.83,13 L20,13 L20,11 L11.83,11 L15.41,7.41 Z"/></svg>');
|
68 |
}
|
69 |
|
70 |
.slider::after {
|
71 |
-
right: -
|
72 |
-
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="rgb(0, 80, 150)"><path d="M8.59,7.41 L13.17,11 L4,11 L4,13 L13.17,13 L8.59,16.59 L10,18 L16,12 L10,6 L8.59,7.41 Z"/></svg>');
|
73 |
}
|
74 |
|
75 |
.slider.ready:hover::before,
|
76 |
.slider.ready:hover::after {
|
77 |
-
transform: translateY(-50%) scale(1.
|
78 |
}
|
79 |
|
80 |
.slider.ready::before,
|
81 |
.slider.ready::after {
|
82 |
-
opacity: 0.
|
83 |
}
|
84 |
|
85 |
.slider.ready:hover::before,
|
86 |
.slider.ready:hover::after {
|
87 |
-
opacity: 1;
|
88 |
}
|
89 |
|
90 |
@keyframes slide-animation {
|
@@ -113,7 +114,7 @@
|
|
113 |
<div class="video-container" id="videoContainer">
|
114 |
<video id="video1" src="flir_brain_padded.mp4" playsinline autoplay loop muted></video>
|
115 |
<video id="video2" class="second-video" src="flir_20240905_120243.mp4" playsinline autoplay loop muted></video>
|
116 |
-
<div class="slider" id="slider"></div>
|
117 |
</div>
|
118 |
|
119 |
<script>
|
@@ -185,6 +186,7 @@
|
|
185 |
slider.style.animation = 'none';
|
186 |
slider.style.cursor = 'ew-resize';
|
187 |
slider.style.pointerEvents = 'auto';
|
|
|
188 |
});
|
189 |
|
190 |
// Start updating clip-path once the page loads
|
|
|
39 |
position: absolute;
|
40 |
top: 0;
|
41 |
left: 30%;
|
42 |
+
width: 10px; /* Increase width to make dragging easier */
|
43 |
height: 100%;
|
44 |
background: rgb(0, 80, 150);
|
45 |
cursor: ew-resize;
|
|
|
51 |
|
52 |
.slider::before,
|
53 |
.slider::after {
|
54 |
+
content: attr(data-arrow); /* Use the data-arrow attribute to show the arrow */
|
55 |
position: absolute;
|
56 |
top: 50%;
|
57 |
transform: translateY(-50%);
|
58 |
+
width: 30px; /* Increase width for easier hover */
|
59 |
+
height: 30px; /* Increase height for easier hover */
|
60 |
+
font-size: 20px; /* Increase font size for visibility */
|
61 |
+
color: rgb(0, 80, 150); /* Arrow color */
|
62 |
+
background: transparent;
|
63 |
+
text-align: center;
|
64 |
+
line-height: 30px; /* Center text vertically */
|
65 |
+
transition: opacity 0.3s, transform 0.3s; /* Smooth transition */
|
66 |
}
|
67 |
|
68 |
.slider::before {
|
69 |
+
left: -40px; /* Move left to create more hover space */
|
|
|
70 |
}
|
71 |
|
72 |
.slider::after {
|
73 |
+
right: -40px; /* Move right to create more hover space */
|
|
|
74 |
}
|
75 |
|
76 |
.slider.ready:hover::before,
|
77 |
.slider.ready:hover::after {
|
78 |
+
transform: translateY(-50%) scale(1.3); /* Increase size on hover */
|
79 |
}
|
80 |
|
81 |
.slider.ready::before,
|
82 |
.slider.ready::after {
|
83 |
+
opacity: 0.5; /* Initial opacity */
|
84 |
}
|
85 |
|
86 |
.slider.ready:hover::before,
|
87 |
.slider.ready:hover::after {
|
88 |
+
opacity: 1; /* Full opacity on hover */
|
89 |
}
|
90 |
|
91 |
@keyframes slide-animation {
|
|
|
114 |
<div class="video-container" id="videoContainer">
|
115 |
<video id="video1" src="flir_brain_padded.mp4" playsinline autoplay loop muted></video>
|
116 |
<video id="video2" class="second-video" src="flir_20240905_120243.mp4" playsinline autoplay loop muted></video>
|
117 |
+
<div class="slider" id="slider" data-arrow=">"></div> <!-- Add 'data-arrow' attribute for arrows -->
|
118 |
</div>
|
119 |
|
120 |
<script>
|
|
|
186 |
slider.style.animation = 'none';
|
187 |
slider.style.cursor = 'ew-resize';
|
188 |
slider.style.pointerEvents = 'auto';
|
189 |
+
slider.setAttribute('data-arrow', '<'); // Set left arrow after animation ends
|
190 |
});
|
191 |
|
192 |
// Start updating clip-path once the page loads
|