-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
163 lines (150 loc) · 5.47 KB
/
index.html
File metadata and controls
163 lines (150 loc) · 5.47 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Smartlinuxcoder ;)</title>
<link rel="stylesheet" href="style.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;500;700&display=swap" rel="stylesheet">
<meta name="msvalidate.01" content="7B24B5EC0C647704BE3CEEFFB8B47666" />
<meta
name="description"
content="Hey! i'm Smartlinuxcoder.
This is my website
come here and take a seat!">
</head>
<body>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-WPWM2KMV7C"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-WPWM2KMV7C');
</script>
<!-- Header -->
<div class="header">
<img class="avatar" src="https://avatars.githubusercontent.com/u/123417503?v=4" alt="Avatar">
<h1>Hi! I'm Smartlinuxcoder</h1>
<p>Welcome to my website!</p>
<div class="navbar">
<div class="clear-button">
<a href="#rust">Rust</a>
</div>
<div class="clear-button">
<a href="#python">Python</a>
</div>
<div class="clear-button">
<a href="#about">About</a>
</div>
<div class="clear-button">
<a href="https://github.com/Smartlinuxcoder" class="button">Github</a>
</div>
</div>
<div class="container">
<h1>My GitHub Stats</h1>
<div class="stats">
<div class="stat">
<h2>Followers</h2>
<p id="followers">Loading...</p>
</div>
<div class="stat">
<h2>Following</h2>
<p id="following">Loading...</p>
</div>
<div class="stat">
<h2>Repositories</h2>
<p id="repos">Loading...</p>
</div>
</div>
</div>
<script>
const url = 'https://api.github.com/users/Smartlinuxcoder';
// Fetch data from GitHub API
fetch(url)
.then(response => response.json())
.then(data => {
// Set follower count
document.getElementById('followers').textContent = data.followers;
// Set following count
document.getElementById('following').textContent = data.following;
// Fetch repository data
fetch(data.repos_url)
.then(response => response.json())
.then(data => {
// Set repository count
document.getElementById('repos').textContent = data.length;
});
})
.catch(error => console.error(error));
</script>
</div>
<!-- Main content -->
<div class="horizontal-container">
<div class="content div-element">
<h1 id="rust">Rust Programming</h1>
<p>I'm pretty new to rust and I don't know all of its perks but i know one thing: </br>
Everything that can be written in Rust will eventually be written in Rust.</p>
</div>
<div class="content div-element">
<h1 id="about">About Me</h1>
<p>Hi, I'm a random programmer who loves Rust and Python! I use arch btw.</p>
</div>
</div>
<div class="repositories">
<h2>My projects</h2>
<ul>
<li><a class="project smartcloud" href="https://cloud.smartlinux.xyz">
<h3>SmartCloud</h3>
<p>A simple and private NextCloud instance</p>
</a></li>
<li><a class="project flappy" href="https://flappy-bird-kaboomjs.netlify.app">
<h3>Flappy bird</h3>
<p>A flappy bird remake written using KaboomJs</p>
</a></li>
<li><a class="project outro" href="https://year-outro.netlify.app">
<h3>Year outro</h3>
<p>A script made using KaboomJs that lines up the outro song to the next minute</p>
</a></li>
</ul>
</div>
<div class="repositories">
<h2>My best repositories</h2>
<ul id="repository-list"></ul>
</div>
<script>
const apiUrl = 'https://api.github.com/users/Smartlinuxcoder/repos';
fetch(apiUrl)
.then(response => response.json())
.then(data => {
const repositoryList = document.getElementById('repository-list');
data.forEach(repository => {
const listItem = document.createElement('li');
const link = document.createElement('a');
const heading = document.createElement('h3');
const description = document.createElement('p');
link.classList.add('project');
// Verifica se la repository contiene un file "pic.png"
const backgroundImageUrl = `https://raw.githubusercontent.com/Smartlinuxcoder/${repository.name}/main/pic.png`;
// Imposta l'immagine come sfondo o utilizza l'avatar dell'utente come default
link.style.backgroundImage = `url(${backgroundImageUrl}), url(${repository.owner.avatar_url})`;
link.href = repository.html_url;
heading.textContent = repository.name;
description.textContent = repository.description;
link.appendChild(heading);
link.appendChild(description);
listItem.appendChild(link);
repositoryList.appendChild(listItem);
});
})
.catch(error => console.error(error));
</script>
<!-- Footer -->
<div class="footer dukeblue">
<p>Copyright © 2024 Smartlinuxcoder.
All rights deserved.</p>
</div>
</body>
</html>