-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathposts.html
197 lines (159 loc) · 7.41 KB
/
posts.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="width=device-width,initial-scale=1" name="viewport">
<meta content="description" name="description">
<meta name="google" content="notranslate" />
<meta property="og:image" content="https://luanmagioli.github.io/assets/images/cover_articles.png">
<meta property="og:title" content="Articles • Tutorials">
<meta property="og:description" content="My personal journal, where I write about my experiences, tutorials, and other topics that I find interesting.">
<!-- Disable tap highlight on IE -->
<meta name="msapplication-tap-highlight" content="no">
<link href="assets/images/duna.png" rel="apple-touch-icon">
<link href="assets/images/duna.png" rel="icon">
<title>Articles • Tutorials</title>
<link href="assets/main.82cfd66e.css" rel="stylesheet">
<script type="text/javascript">
(function (c, l, a, r, i, t, y) {
c[a] = c[a] || function () { (c[a].q = c[a].q || []).push(arguments) };
t = l.createElement(r); t.async = 1; t.src = "https://www.clarity.ms/tag/" + i;
y = l.getElementsByTagName(r)[0]; y.parentNode.insertBefore(t, y);
})(window, document, "clarity", "script", "lshukazfk7");
</script>
</head>
<body>
<header class="">
<div class="navbar navbar-default visible-xs">
<button type="button" class="navbar-toggle collapsed">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html" style="float: right;">
<img src="assets/images/anud.png" width="25" height="25" class="d-inline-block align-top" alt=""
style="display: inline; padding-right: 4px;">
Luan Magioli
</a>
</div>
<nav class="sidebar">
<div class="navbar-collapse" id="navbar-collapse">
<div class="site-header hidden-xs">
<a class="site-brand" href="index.html" title="">
<img class="img site-logo" alt="" src="assets/images/anud.png" style="width: 100px;">
<br />
Luan Magioli
</a>
<p style="font-size: 12px;">Computer Vision / Software development / Artist</p>
</div>
<ul class="nav">
<li><a href="index.html" title="">Software • Technology</a></li>
<li><a href="posts.html" title=""><b>Articles • Tutorials</b></a></li>
<li><a href="art.html" title="">Art • Sketches</a></li>
<li><br/></li>
<li><a style="font-size: 14px;" href="about.html" title=""><i>About me</i></a></li>
</ul>
<nav class="nav-footer">
<p class="nav-footer-social-buttons">
<a class="fa-icon" href="mailto:[email protected]" title="">
<i class="fa fa-envelope"></i>
</a>
<a class="fa-icon" href="https://www.instagram.com/luanmagioli" title="">
<i class="fa fa-instagram"></i>
</a>
</p>
<p>▒▒▓█ 2024</p>
</nav>
</div>
</nav>
</header>
<main class="" id="main-collapse">
<div class="row" id="postContainer">
<div class="col-xs-12 section-container-spacer">
<h3>Journal • Articles • Tutorials</h3>
<p><i>Warning: As there are not many resources in Portuguese on the web for some topics, this page may contain some non-English content that conflicts with the rest of the site.</i></p>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
fetch('posts.json')
.then(response => response.json())
.then(topics => {
const postContainer = document.getElementById('postContainer'); // Change this to match your container div ID
topics.forEach(topic => {
const topicTitle = document.createElement('h3');
topicTitle.className = 'section-container-spacer col-md-10';
topicTitle.textContent = topic.topic;
postContainer.appendChild(topicTitle);
topic.posts.forEach(post => {
// Create elements for the post content
const cardDiv = document.createElement('div');
cardDiv.className = 'card mb-2 col-md-10';
cardDiv.style.marginBottom = '10px';
cardDiv.style.marginLeft = '20px';
cardDiv.style.marginRight = '20px';
cardDiv.style.padding = '10px';
cardDiv.style.borderColor = '#000';
cardDiv.style.borderStyle = 'solid';
cardDiv.style.borderWidth = '1px';
const rowDiv = document.createElement('div');
rowDiv.className = 'row g-0';
const imgColDiv = document.createElement('div');
imgColDiv.className = 'col-md-3';
const img = document.createElement('img');
img.src = post.image;
img.className = 'img-responsive';
img.alt = post.title;
imgColDiv.appendChild(img);
const bodyColDiv = document.createElement('div');
bodyColDiv.className = 'col-md-9';
const cardBodyDiv = document.createElement('div');
cardBodyDiv.className = 'card-body';
const h5 = document.createElement('h4');
h5.className = 'card-title';
h5.textContent = post.title;
const p = document.createElement('p');
p.className = 'card-text';
p.textContent = post.description;
const cardLinkDiv = document.createElement('div');
cardLinkDiv.className = 'card-link';
const pDate = document.createElement('p');
pDate.className = 'card-text';
pDate.style.float = 'right';
const smallDate = document.createElement('small');
smallDate.className = 'text-body-secondary';
smallDate.textContent = post.date;
pDate.appendChild(smallDate);
const a = document.createElement('a');
a.href = "posts/" + post.html + ".html";
a.className = 'btn btn-default btn-sm';
a.textContent = post.readtime;
cardLinkDiv.appendChild(pDate);
cardLinkDiv.appendChild(a);
cardBodyDiv.appendChild(h5);
cardBodyDiv.appendChild(p);
cardBodyDiv.appendChild(cardLinkDiv);
bodyColDiv.appendChild(cardBodyDiv);
rowDiv.appendChild(imgColDiv);
rowDiv.appendChild(bodyColDiv);
cardDiv.appendChild(rowDiv);
// Append the cardDiv to the container
postContainer.appendChild(cardDiv);
});
});
})
.catch(error => console.error('Error fetching posts:', error));
});
</script>
</div>
</main>
<script>
document.addEventListener("DOMContentLoaded", function (event) {
navbarToggleSidebar();
navActivePage();
});
</script>
<script type="text/javascript" src="assets/main.85741bff.js"></script>
</body>
</html>