-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
218 lines (189 loc) · 6.66 KB
/
index.html
File metadata and controls
218 lines (189 loc) · 6.66 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
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>catnull.dev // portfolio</title>
<style>
:root {
--bg: #0d1117;
--text: #c9d1d9;
--accent: #58a6ff;
--secondary: #8b949e;
--card-bg: #161b22;
--border: #30363d;
--font-mono: 'Fira Code', 'JetBrains Mono', monospace;
}
body {
background-color: var(--bg);
color: var(--text);
font-family: var(--font-mono);
margin: 0;
display: flex;
justify-content: center;
}
.container {
max-width: 900px;
width: 90%;
padding: 40px 0;
}
/* Шапка профиля */
header {
display: flex;
align-items: center;
gap: 25px;
margin-bottom: 50px;
}
#avatar {
width: 100px;
height: 100px;
border-radius: 12px;
border: 1px solid var(--border);
filter: grayscale(0.5);
}
.header-info h1 { margin: 0; color: var(--accent); font-size: 1.5rem; }
.header-info p { margin: 5px 0; color: var(--secondary); font-size: 0.9rem; }
h2 {
border-bottom: 1px solid var(--border);
padding-bottom: 10px;
margin-top: 50px;
font-size: 1.1rem;
display: flex;
align-items: center;
gap: 10px;
}
h2::before { content: ">"; color: var(--accent); }
/* Сетка карточек */
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 20px;
margin-top: 20px;
}
.card {
background: var(--card-bg);
border: 1px solid var(--border);
padding: 20px;
border-radius: 8px;
text-decoration: none;
color: inherit;
display: flex;
flex-direction: column;
justify-content: space-between;
transition: all 0.2s ease;
}
.card:hover {
border-color: var(--accent);
transform: translateY(-3px);
box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.card-title { color: var(--accent); font-weight: bold; margin-bottom: 10px; font-size: 1rem; }
.card-desc { font-size: 0.85rem; color: var(--secondary); line-height: 1.5; margin-bottom: 15px; flex-grow: 1; }
.card-footer {
font-size: 0.75rem;
display: flex;
justify-content: space-between;
color: var(--secondary);
border-top: 1px solid var(--border);
padding-top: 10px;
}
.tag { color: var(--accent); opacity: 0.8; }
footer {
margin-top: 80px;
padding: 20px 0;
text-align: center;
font-size: 0.8rem;
color: var(--secondary);
border-top: 1px solid var(--border);
}
@media (max-width: 600px) {
header { flex-direction: column; text-align: center; }
}
</style>
</head>
<body>
<div class="container">
<header>
<img id="avatar" src="https://via.placeholder.com/100" alt="avatar">
<div class="header-info">
<h1 id="username">catnull@dev:~$</h1>
<p id="bio">Initialising system...</p>
<div style="margin-top: 10px;">
<a href="https://github.com/catnull-dev" style="color: var(--accent); text-decoration: none; font-size: 0.8rem;">[ github ]</a>
</div>
</div>
</header>
<section>
<h2>publications</h2>
<div id="pubs-grid" class="grid">
</div>
</section>
<section>
<h2>projects</h2>
<div id="repos-grid" class="grid">
</div>
</section>
<footer>
<p>Generated by catnull-dev © 2026</p>
</footer>
</div>
<script>
const GITHUB_USER = 'catnull-dev';
// 1. ТВОИ ПУБЛИКАЦИИ (Добавляй сюда новые статьи вручную)
const myPublications = [
];
async function init() {
try {
// Отрисовка публикаций сразу
renderPublications();
// Загрузка данных профиля GitHub
const userRes = await fetch(`https://api.github.com/users/${GITHUB_USER}`);
const userData = await userRes.json();
document.getElementById('avatar').src = userData.avatar_url;
document.getElementById('username').innerText = `${userData.login}@dev:~$`;
document.getElementById('bio').innerText = userData.bio || "Full-stack developer & tech enthusiast.";
// Загрузка репозиториев
const reposRes = await fetch(`https://api.github.com/users/${GITHUB_USER}/repos?sort=updated&per_page=10`);
const repos = await reposRes.json();
renderRepos(repos);
} catch (e) {
console.error("API Error:", e);
}
}
function renderPublications() {
const grid = document.getElementById('pubs-grid');
grid.innerHTML = myPublications.map(pub => `
<a href="${pub.link}" target="_blank" class="card">
<div>
<span class="card-title">${pub.title}</span>
<p class="card-desc">${pub.desc}</p>
</div>
<div class="card-footer">
<span>${pub.date}</span>
<span class="tag">#${pub.tag}</span>
</div>
</a>
`).join('');
}
function renderRepos(repos) {
const grid = document.getElementById('repos-grid');
grid.innerHTML = repos
.filter(repo => !repo.fork) // Убираем форки
.slice(0, 6) // Берем топ-6 последних
.map(repo => `
<a href="${repo.html_url}" target="_blank" class="card">
<div>
<span class="card-title">${repo.name}</span>
<p class="card-desc">${repo.description || 'Modern system component.'}</p>
</div>
<div class="card-footer">
<span>${repo.language || 'Code'}</span>
<span>★ ${repo.stargazers_count}</span>
</div>
</a>
`).join('');
}
init();
</script>
</body>
</html>