Skip to content

Commit feb00b2

Browse files
committed
feat: about page
1 parent b106409 commit feb00b2

File tree

6 files changed

+45
-28
lines changed

6 files changed

+45
-28
lines changed

html.asm

+21-2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,21 @@ forward components
5353
common db '</div>', 10
5454
}
5555

56+
macro span style, [components]
57+
{
58+
common db '<span style="',style,'">', 10
59+
forward components
60+
common db '</span>', 10
61+
}
62+
63+
macro pre style, [components]
64+
{
65+
common db '<pre style="',style,'">', 10
66+
forward components
67+
common db '</pre>', 10
68+
}
69+
70+
5671
macro flexcol style, [components]
5772
{
5873
common db '<div style="display: flex; flex-direction: column; ',style,'">', 10
@@ -72,7 +87,7 @@ macro project_category category, [cards]
7287
{
7388
common
7489
div "font-size: 4rem; font-weight: 600; color: var(--secondary); text-align: center;", ! category
75-
db '<div style="display: flex; flex-wrap: wrap; justify-content: center; align-items: center; margin: 4rem 0;">', 10 ;
90+
db '<div style="display: flex; flex-wrap: wrap; justify-content: center; align-items: center; margin: 4rem 0;">', 10
7691
forward
7792
cards
7893
common
@@ -81,7 +96,6 @@ common
8196

8297
macro project_card title, description, [tech_stack]
8398
{
84-
8599
common
86100
db '<div style="display: flex; flex-direction: column; justify-content: space-between; border: 3px dashed #808080; padding: 1rem 0; text-align: center; width: 17rem; height: 17rem; margin: 1rem; border-radius: 0rem;">', 10
87101
div "font-size: 1.7rem; font-weight: 600; color: var(--primary)", ! title
@@ -93,3 +107,8 @@ common
93107
db '</div>'
94108
db '</div>', 10
95109
}
110+
111+
macro about_item left, right
112+
{
113+
flexrow "", <div "color: var(--accent)", ! left>, <div "", ! right>
114+
}

main

1.9 KB
Binary file not shown.

main.asm

+1-19
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ main:
5555

5656
serve_route req, home
5757
serve_route req, projects
58-
serve_route req, skills
59-
serve_route req, blog
6058
serve_route req, about
6159
serve_route req, links
6260
@@ -78,27 +76,13 @@ main:
7876
close [client_fd]
7977
jmp .mainloop
8078

81-
.serve_skills:
82-
print [client_fd], found_page_response
83-
print [client_fd], index_page
84-
close [client_fd]
85-
jmp .mainloop
86-
87-
.serve_blog:
88-
print [client_fd], found_page_response
89-
print [client_fd], index_page
90-
close [client_fd]
91-
jmp .mainloop
92-
9379
.serve_about:
9480
print [client_fd], found_page_response
95-
print [client_fd], index_page
81+
print [client_fd], about_page
9682
close [client_fd]
9783
jmp .mainloop
9884
9985
.serve_links:
100-
print_char STDOUT, 'P'
101-
print_char STDOUT, 10
10286
print [client_fd], found_page_response
10387
print [client_fd], links_page
10488
close [client_fd]
@@ -156,6 +140,4 @@ message db "Hello from fasm!", 10, 0
156140
home db "", 0
157141
about db "about", 0
158142
projects db "projects", 0
159-
skills db "skills", 0
160-
blog db "blog", 0
161143
links db "links", 0

responses.asm

+17-6
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,14 @@ index_page db 10
1414
pfp, \
1515
<flexrow "font-size: 2rem; width: 30rem; justify-content: space-evenly;", \
1616
<link "/projects", ! "/projects">, \
17-
<link "/skills", ! "/skills">, \
18-
<link "/blog", ! "/blog">, \
19-
>, \
20-
<flexrow "font-size: 2rem; width: 20rem; justify-content: space-evenly;", \
2117
<link "/about", ! "/about">, \
2218
<link "/links", ! "/links">, \
2319
>, \
2420
db 0
2521
html_end
2622

2723
links_page db 10
28-
html_start "Praneeth Jain"
24+
html_start "Praneeth Jain | Links"
2925
flexcol "min-width: 100vw; min-height: 100vh; align-items: center; justify-content: center; background-color: black; color: white; font-size: 2rem;", \
3026
<link "https://github.com/PraneethJain/", ! "Github">, \
3127
<link "https://gitlab.com/PraneethJain", ! "Gitlab">, \
@@ -38,12 +34,27 @@ links_page db 10
3834
<link "https://www.facebook.com/profile.php?id=100087488941910", ! "Facebook">, \
3935
<link "https://x.com/bants78", ! "X">, \
4036
db 0
37+
html_end
4138

39+
about_page db 10
40+
html_start "Praneeth Jain | About"
41+
flexcol "min-width: 100vw; min-height: 100vh; align-items: center; justify-content: center; background-color: black; color: white; font-size: 2rem;", \
42+
<pre "font-family: vt323; font-size: 1.5rem; line-height: 0.8rem;", \
43+
<about_item "Uptime: ", " 19 years">, \
44+
<about_item "Host: ", " IIIT Hyderabad, 3rd year">, \
45+
<about_item "Kernel: ", " Computer Science Engineering">, \
46+
<about_item "Distro: ", " arch / void">, \
47+
<about_item "WM: ", " hyprland / dwm">, \
48+
<about_item "IDE: ", " emacs / helix">, \
49+
<about_item "Terminal: ", " kitty / st">, \
50+
<about_item "Shell: ", " fish / bash">, \
51+
>, \
52+
;; Inspired from github-readme-terminal
4253
db 0
4354
html_end
4455

4556
projects_page db 10
46-
html_start "Projects"
57+
html_start "Praneeth Jain | Projects"
4758
flexcol "min-width: 100vw; min-height: 100vh; background-color: black; color: white; justify-content: center; align-items: center;", \
4859
<project_category "Projects", \
4960
<project_card "Ardor", "A simple command line application to download, manage and watch currently airing anime.", "Python">, \

syscalls.asm

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ SYS_bind equ 49
99
SYS_listen equ 50
1010
SYS_setsockopt equ 54
1111
SYS_exit equ 60
12+
SYS_time equ 201
1213

1314
SOCK_STREAM equ 1
1415
AF_INET equ 2
@@ -93,6 +94,11 @@ macro close fd
9394
syscall1 SYS_close, fd
9495
}
9596

97+
macro time tloc
98+
{
99+
syscall1 SYS_time, tloc
100+
}
101+
96102
macro listen sockfd, backlog
97103
{
98104
syscall2 SYS_listen, sockfd, backlog

utils.asm

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ trim_first_line:
3333
mov byte [rdi], 0
3434
ret
3535

36-
3736
macro print fd, string
3837
{
3938
mov rdi, string

0 commit comments

Comments
 (0)