-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
234 lines (221 loc) · 7.5 KB
/
index.html
File metadata and controls
234 lines (221 loc) · 7.5 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
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<title>weep.me - おいらの居場所。</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@_weep">
<meta name="twitter:creator" content="@weepjp">
<meta name="twitter:url" content="https://weep.me/">
<meta name="twitter:title" content="weep.me - おいらの居場所。">
<meta name="twitter:description" content="weepjp account links">
<meta name="twitter:image" content="https://weep.me/og.png?2025-07-20-02" />
<meta property="og:title" content="weep.me - おいらの居場所。" />
<meta property="og:description" content="weepjp account links" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://weep.me/" />
<meta property="og:image" content="https://weep.me/og.png?2025-07-20-02" />
<meta property="og:image:type" content="image/png"/>
<meta property="og:image:width" content="1200"/>
<meta property="og:image:height" content="630"/>
<meta property="og:site_name" content="weep.me - おいらの居場所。" />
<meta property="og:locale" content="ja_JP" />
<link href="https://weep.me/" rel="start" title="Home" />
<link href="https://weep.me/favicon.ico?2025-07-20-02" rel="icon" type="image/x-icon" />
<link href="https://weep.me/favicon.ico?2025-07-20-02" rel="shortcut icon" type="image/x-icon" />
<style>
* { margin:0; padding:0; box-sizing:border-box; }
body {
font-family:Arial,sans-serif;
background:#dec;
color:#111;
padding-top:48px;
padding-bottom:48px;
min-height:100vh;
position:relative;
}
header, footer {
position:fixed; left:0; right:0;
background:rgba(255,255,255,0.9);
z-index:100; text-align:center;
}
header { top:0; height:48px; border-bottom:1px solid #cdcdfe; }
footer { bottom:0; height:62px; border-top:1px solid #cdcdfe; } /* 高さUP */
header h1 { font-size:1.2rem; padding:12px 0; color:#333; }
footer small { font-size:0.8rem; color:#555; line-height:48px; }
footer a { color:#111; text-decoration:underline; }
#version {
font-size: 0.8rem;
color: #888;
margin-top: -10px;
line-height: 1.5;
}
main {
display: flex;
justify-content: center;
align-items: flex-start;
}
.box {
max-width:1080px;
margin:32px;
background:#fff;
border:6px solid #cdcdfe;
border-radius:6px;
padding:16px 32px;
}
@media (max-width: 800px) {
.box { padding: 16px 16px; }
}
@media (max-width: 600px) {
.box { padding: 12px 8vw; }
}
.container {
display:grid;
grid-template-columns: repeat(2, 1fr);
column-gap:8px;
row-gap:24px;
justify-items: center;
}
@media (min-width: 600px) { .container { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 800px) { .container { grid-template-columns: repeat(4,1fr); } }
@media (min-width: 1200px) { .container { grid-template-columns: repeat(5,1fr); } }
h2 {
grid-column:1 / -1;
font-size:1.2rem;
margin:32px 0 4px;
color:#333;
text-align:left;
justify-self:start;
}
.link {
width:100px;
min-height:110px;
display:flex;
flex-direction:column;
align-items:center;
margin:0;
text-decoration:none;
color:inherit;
transition:filter .2s;
}
.link img {
width:48px; height:48px;
border-radius:3px;
object-fit:cover;
margin-bottom:4px;
}
.title { font-size:0.85rem; font-weight:bold; text-align:center; line-height:1.2; width:100%; }
.subtitle { font-size:0.7rem; color:#666; text-align:center; line-height:1.2; width:100%; }
.link:hover, .link:active {
filter:grayscale(100%);
animation:gkbr 0.1s infinite;
}
.message {
grid-column:1 / -1;
display:flex; flex-direction:column;
justify-content:center; align-items:center;
padding:12px; border-radius:6px;
font-size:1rem; text-align:center;
opacity:0; animation:bounceFadeIn .5s ease-out forwards;
margin-bottom:16px; width:100%; box-sizing:border-box;
}
.message.loading { color:#555; }
.message.error { color:#c00; }
.message.error button {
margin-top:8px; padding:6px 12px;
border:none; border-radius:4px;
background:#c00; color:#fff;
font-size:0.85rem; cursor:pointer;
}
@keyframes bounceFadeIn {
0% { opacity:0; transform:scale(0.8); }
60% { opacity:1; transform:scale(1.1); }
100% { opacity:1; transform:scale(1); }
}
@keyframes gkbr {
0% { transform:translate(0,0) rotateZ(0deg); }
25% { transform:translate(2px,2px) rotateZ(1deg); }
50% { transform:translate(0,2px) rotateZ(0deg); }
75% { transform:translate(2px,0) rotateZ(-1deg); }
100% { transform:translate(0,0) rotateZ(0deg); }
}
</style>
</head>
<body>
<header>
<h1>weep.me - おいらの居場所。</h1>
</header>
<main>
<div class="box">
<div class="message loading" id="status">
<div>Now loading…</div>
</div>
<div class="container" id="links"></div>
</div>
<main>
<footer>
<small>
© 2018–2025
<a href="https://weep.jp/" target="_blank">weepjp</a>
(<a href="https://github.com/weepjp/weepjp.github.io" target="_blank">src</a>)
</small>
<div id="version"></div>
</footer>
<script>
//
const VERSION = 'ver.202508141313';
document.addEventListener('DOMContentLoaded', function () {
document.getElementById('version').textContent = VERSION;
});
//
const linksEl = document.getElementById('links');
const statusEl = document.getElementById('status');
const MIN_MS = 200, INTERVAL = 1000;
async function loadLinks() {
const start = Date.now();
try {
const res = await fetch(`l.json?t=${Date.now()}`);
if (!res.ok) throw new Error(res.statusText);
const data = await res.json();
const elapsed = Date.now() - start;
setTimeout(() => render(data), Math.max(0, MIN_MS - elapsed));
} catch (err) {
const elapsed = Date.now() - start;
setTimeout(() => renderError(err), Math.max(0, MIN_MS - elapsed));
}
}
function render(data) {
statusEl.style.display = 'none';
linksEl.innerHTML = '';
const cats = [];
data.forEach(i => { if (!cats.includes(i.c)) cats.push(i.c); });
cats.forEach(cat => {
const grp = data.filter(l => l.c === cat).sort((a,b)=>a.n-b.n);
if (!grp.length) return;
const h2 = document.createElement('h2'); h2.textContent = cat;
linksEl.appendChild(h2);
grp.forEach(l => {
const a = document.createElement('a');
a.href=l.u; a.className='link'; a.target='_blank'; a.title=l.t;
a.rel='noopener noreferrer me';
a.innerHTML=`
<img src="${l.i}" alt="${l.t}">
<div class="title">${l.t}</div>
<div class="subtitle">${l.d}</div>`;
linksEl.appendChild(a);
});
});
}
function renderError(err) {
statusEl.innerHTML = `
<div>Error: ${err.message}</div>
<button id="retry">Reload</button>`;
statusEl.className = 'message error';
document.getElementById('retry').onclick = loadLinks;
}
loadLinks();
setInterval(loadLinks, INTERVAL);
</script>
</body>
</html>