-
Notifications
You must be signed in to change notification settings - Fork 0
/
instagram.html
79 lines (71 loc) · 2.88 KB
/
instagram.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<title>My Instagram Posts</title>
<link rel="stylesheet" href="css/insta.css">
</head>
<body>
<header>
<nav class="nice">
<div class="nav-wrapper container">
<a href="#" class="brand-logo">Our Insta Blog</a>
<div class="nav-toggle">
<label class="switch">
<input type="checkbox" id="dark-mode-toggle">
<span class="slider round"></span>
</label>
</div>
</div>
</nav>
</header>
<main class="container">
<div class="row">
<div class="col s12">
<div class="card">
<div class="card-content">
<h4>Posts</h4>
<div class="embedded-post" id="embedded-posts">
<!-- Posts will be dynamically added here -->
</div>
</div>
</div>
</div>
</div>
</main>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<script>
// Array of Instagram post URLs to embed
const instagramPostUrls = [
'https://www.instagram.com/p/CwUrFKvy--f/?utm_source=ig_web_copy_link&igshid=MzRlODBiNWFlZA==',
'https://www.instagram.com/p/CwUrFKvy--f/?utm_source=ig_web_copy_link&igshid=MzRlODBiNWFlZA==',
// Add more URLs as needed
];
// Function to embed Instagram posts
function embedInstagramPosts() {
const embeddedPostsContainer = document.getElementById('embedded-posts');
instagramPostUrls.forEach(url => {
const instagramPostDiv = document.createElement('div');
instagramPostDiv.className = 'instagram-post';
const blockquote = document.createElement('blockquote');
blockquote.className = 'instagram-media';
blockquote.setAttribute('data-instgrm-permalink', url);
blockquote.setAttribute('data-instgrm-version', '13');
instagramPostDiv.appendChild(blockquote);
embeddedPostsContainer.appendChild(instagramPostDiv);
});
// Load Instagram embed script
const script = document.createElement('script');
script.async = true;
script.src = 'https://www.instagram.com/embed.js';
embeddedPostsContainer.appendChild(script);
}
// Embed Instagram posts when the page loads
window.addEventListener('load', embedInstagramPosts);
</script>
<script src="js/nightmode.js"></script>
</body>
</html>