Skip to content

Commit efba4fb

Browse files
committed
initial blog setup stuff
1 parent 23a42e7 commit efba4fb

File tree

4 files changed

+62
-11
lines changed

4 files changed

+62
-11
lines changed

index.html

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@
77
</head>
88

99
<body>
10-
initial commit vibes
10+
<pre>
11+
Welcome to my terrible blog!
12+
13+
posts:
14+
<div id="posts"></div>
15+
</pre>
1116
</body>
17+
<script src="posts.js"></script>
18+
<script>
19+
20+
let postElement = document.getElementById("posts");
21+
for(let i = 0; i < posts.length; i++){
22+
let link = document.createElement("a");
23+
link.innerText = posts[i].title;
24+
link.href = `./posts/${posts[i].id}/index.html`;
25+
postElement.appendChild(link);
26+
}
27+
28+
</script>
1229
</html>

posts.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
/*
3+
stores metadata for posts
4+
5+
format:
6+
{ title: title, id: id }
7+
8+
where title is the title of the post and id is the post number
9+
*/
10+
11+
12+
let posts = [
13+
{
14+
title: "inital post",
15+
id: 0
16+
}
17+
];
18+
19+

posts/0/index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>blog :skull:</title>
5+
<link rel="icon" href="../../favicon.svg" type="image/svg+xml"></link>
6+
<link rel="stylesheet" href="../../style.css"></link>
7+
<meta name="date" content="2023-05-21"></meta>
8+
</head>
9+
10+
<body>
11+
<pre>
12+
welcome to the initial post of my blog!
13+
14+
this blog is intended as a way to pass some time, and share cool things that I find along the way.
15+
16+
you can expect:
17+
random golfs
18+
small code samples
19+
interesting software interactions
20+
linux content
21+
22+
</pre>
23+
</body>
24+
</html>

style.css

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,10 @@ body {
3434
padding: 40px 40px 40px 40px;
3535
}
3636

37-
hr {
38-
height: 3em;
39-
display: block;
40-
}
41-
4237
div {
4338
padding-left: 8ch;
4439
}
4540

46-
th, td {
47-
padding-right: 8ch;
48-
}
49-
5041
input[type=text]:hover, input[type=text]:focus {
5142
background-color: magenta;
5243
color: black;
@@ -91,7 +82,7 @@ a:hover, option:hover, input[type=submit]:hover {
9182
color: black;
9283
}
9384

94-
a:visited{
85+
a:visited {
9586
color cyan;
9687
}
9788

0 commit comments

Comments
 (0)