-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
90 lines (79 loc) · 2.01 KB
/
index.html
File metadata and controls
90 lines (79 loc) · 2.01 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ghost ActivityPub Feed Demo</title>
<style>
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
line-height: 1.6;
}
h1 {
border-bottom: 1px solid #eee;
padding-bottom: 10px;
}
.demo-container {
margin: 30px 0;
}
.input-group {
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
input {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
}
button {
background: #4a65ff;
color: white;
border: none;
padding: 10px 15px;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
}
button:hover {
background: #3a50e0;
}
</style>
</head>
<body>
<h1>Ghost ActivityPub Feed Demo</h1>
<div class="input-group">
<label for="feed-url">ActivityPub Feed URL:</label>
<input
id="feed-url"
type="text"
value="https://muratcorlu.com"
placeholder="Enter ActivityPub feed URL">
<button id="load-feed">Load Feed</button>
</div>
<div class="demo-container">
<!-- The web component will be inserted here -->
<ghost-activitypub-embed url="https://muratcorlu.com"></ghost-activitypub-embed>
</div>
<script src="ghap-embed.js"></script>
<script>
// Initialize the component with the ability to change URLs
document.getElementById('load-feed').addEventListener('click', () => {
const url = document.getElementById('feed-url').value.trim();
if (url) {
const feedElement = document.querySelector('ghost-activitypub-embed');
feedElement.setAttribute('url', url);
}
});
</script>
</body>
</html>