jekyll-theme-profile 1.8.4 → 1.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_includes/post-timeline-card.html +2 -3
- data/assets/js/timeline.js +42 -22
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9898d76037a44648a544a0e55be21c87068ffe5dbbfedf6d9b8988ae149c51e7
|
4
|
+
data.tar.gz: 59c490d46718934edd9de4672d5c0cbdf17557860037fb4cc5a241267c77853b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9490534c90e37b61445ffd26dc980e6ef77d9b7f45d4c74f2ced5bf52735674f5c8abe1d8bdcd5800e2658cecb9bf3151e191447d7714d6a911438692817621c
|
7
|
+
data.tar.gz: c0187da606072cffdf05b586390d3c8c2e4460e5905a46aa922b7f834b58925c8f5ceec078f61202506bac8b3f841d18aa139564fe14ebe77730b685852f010d
|
@@ -22,9 +22,8 @@
|
|
22
22
|
<div class="col-12 col-md-7">
|
23
23
|
<div class="ml-5 mt-5">
|
24
24
|
{%- if post.video %}
|
25
|
-
<div class="image-container mb-5">
|
26
|
-
<iframe
|
27
|
-
allow="encrypted-media; fullscreen; picture-in-picture" allowfullscreen></iframe>
|
25
|
+
<div id="Timeline-video-container" class="image-container mb-5">
|
26
|
+
<iframe id="Timeline-video" src="{{ post.video }}" frameborder="0" height="inherited" width="inherited"></iframe>
|
28
27
|
</div>
|
29
28
|
{%- elsif post.image %}
|
30
29
|
<div class="image-container mb-5">
|
data/assets/js/timeline.js
CHANGED
@@ -1,29 +1,49 @@
|
|
1
|
-
// Fix timeline anchors
|
2
1
|
document.addEventListener("DOMContentLoaded", function () {
|
3
|
-
|
2
|
+
console.log("Timeline script is running!");
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
function updateTopBarHeight() {
|
5
|
+
// Recalculate topBarHeight
|
6
|
+
var topBarElement = document.querySelector('.topbar');
|
7
|
+
topBarHeight = topBarElement ? topBarElement.offsetHeight : 0;
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
// Update styles for each timeline title
|
10
|
+
timelineTitles.forEach(function (title) {
|
11
|
+
title.style.top = topBarHeight + "px";
|
12
|
+
});
|
13
|
+
console.log("Updated offsetHeight!");
|
14
|
+
}
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
// Set dimensions for all iframes with the same ID
|
17
|
+
function setIframeDimensions() {
|
18
|
+
var iframes = document.querySelectorAll('iframe[id="Timeline-video"]');
|
19
|
+
console.log(iframes.length);
|
20
|
+
var container = document.getElementById('Timeline-video-container');
|
19
21
|
|
20
|
-
|
21
|
-
|
22
|
+
// Get the container's dimensions
|
23
|
+
var containerWidth = container.offsetWidth;
|
24
|
+
var containerHeight = container.offsetHeight;
|
25
|
+
if (iframes) {
|
26
|
+
iframes.forEach(function (iframe) {
|
27
|
+
iframe.style.width = containerWidth + 'px';
|
28
|
+
iframe.style.height = containerHeight + 'px';
|
29
|
+
});
|
30
|
+
console.log("Updated iframes width x height: " + containerWidth + " x " + containerHeight);
|
31
|
+
}
|
32
|
+
}
|
22
33
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
34
|
+
// Default topBarHeight to 0 if .topbar doesn't exist
|
35
|
+
var topBarHeight = 0;
|
36
|
+
var timelineTitles = document.querySelectorAll(".TimelineItem-title");
|
37
|
+
|
38
|
+
// Initial update
|
39
|
+
updateTopBarHeight();
|
40
|
+
setIframeDimensions();
|
41
|
+
|
42
|
+
// Add event listener for window resize
|
43
|
+
window.addEventListener('resize', function () {
|
44
|
+
// Call the function to update topBarHeight and adjust styles
|
45
|
+
console.log("resizing elements");
|
46
|
+
updateTopBarHeight();
|
47
|
+
setIframeDimensions();
|
48
|
+
});
|
29
49
|
});
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-profile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Allison Thackston
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|