-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
169 lines (151 loc) · 4.86 KB
/
index.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
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Adjacent Research</title>
<meta property="og:image" content="https://pbs.twimg.com/profile_images/1668357289747554304/7NSJ60Fd_400x400.jpg"/>
<link rel="icon" type="image/jpeg" href="https://pbs.twimg.com/profile_images/1816112137627897856/Dc4NYRdj_400x400.jpg">
<style>
body, .content-container, .header, .tree, .small, .sublink_small, .sublink_small:visited {
margin: 0;
padding: 0;
}
body, .header, .tree {
font-family: monospace;
}
.content-container {
max-width: 800px;
margin-left: 1%;
padding: 20px;
word-wrap: break-word;
}
.header, .tree {
white-space: pre;
margin-top: 10px;
margin-left: 1%;
}
.header {
font-size: 14px;
}
.tree {
line-height: 1;
font-size: 18px;
}
.small, .sublink_small {
font-size: 14px;
text-wrap: auto;
}
.sublink_small {
color: black;
}
.sublink_small:visited {
color: gray;
}
#adjacent-press {
margin-top: 20px;
}
#time-display {
position: fixed;
bottom: 10px;
right: 10px;
background-color: #f0f0f0;
padding: 5px;
border: 1px solid #ccc;
}
#rss-feed-press {
padding-left: 20px;
font-size: 14px;
}
#rss-feed-press a {
color: black;
text-decoration: underline dotted;
}
#rss-feed-press a:visited {
color: blue;
}
#rss-feed-news {
padding-left: 20px;
font-size: 14px;
}
#rss-feed-news a {
color: black;
text-decoration: underline dotted;
}
#rss-feed-news a:visited {
color: blue;
}
.rss-item {
display: flex;
align-items: flex-start;
padding: 0.25em;
}
.rss-item::before {
content: "├──";
margin-right: 5px;
}
.rss-item:last-child::before {
content: "└──";
}
</style>
</head>
<body>
<div class="content-container">
<div class="tree">
<a class="small" style="font-style: italic;">adjacent research</a>
<a class="small">building, writing, and investing in niche markets</a>
<div id="adjacent-press">
|—— <a href="https://press.adjacentresearch.xyz" class="small">selected from press.adjacentresearch.xyz</a>
<div id="rss-feed-press"></div>
</div>
<div id="adjacent-news">
|—— <a href="https://adj.news" class="small">latest from adj.news</a>
<div id="rss-feed-news"></div>
</div>
</div>
<div>
|—— <a href="/list.html" class="small">all projects</a>
</div>
</div>
<div id="time-display" style="text-align: right;">
<span id="nyc-time" style="text-align: left;"></span><br>
<span id="sf-time"></span><br>
<span id="london-time" style="display: flex; justify-content: space-between;"></span>
</div>
</div>
<script>
// Update time
function updateTime() {
const now = new Date();
const nycTime = now.toLocaleTimeString('en-US', { timeZone: 'America/New_York', hour: '2-digit', minute: '2-digit' });
document.getElementById('nyc-time').textContent = `NYC: ${nycTime}`;
const sfTime = now.toLocaleTimeString('en-US', { timeZone: 'America/Los_Angeles', hour: '2-digit', minute: '2-digit' });
document.getElementById('sf-time').textContent = `SF: ${sfTime}`;
const londonTime = now.toLocaleTimeString('en-US', { timeZone: 'Europe/London', hour: '2-digit', minute: '2-digit' });
document.getElementById('london-time').textContent = `London: ${londonTime}`;
}
setInterval(updateTime, 1000);
updateTime(); // Initial call
// Fetch RSS feed
async function fetchRSS(feed, id) {
try {
const response = await fetch(feed);
const data = await response.json();
const feedList = document.getElementById(id);
data.items.slice(0, 5).forEach((item, index) => {
const div = document.createElement('div');
div.className = 'rss-item';
const a = document.createElement('a');
a.href = item.link;
a.textContent = item.title;
div.appendChild(a);
feedList.appendChild(div);
});
} catch (error) {
console.error('Error fetching RSS feed:', error);
}
}
fetchRSS('https://api.rss2json.com/v1/api.json?rss_url=https://press.adjacentresearch.xyz/feed', 'rss-feed-press');
fetchRSS('https://api.rss2json.com/v1/api.json?rss_url=https://adj.news/rss', 'rss-feed-news');
</script>
</body>
</html>