Skip to content

Commit e0b4afd

Browse files
committed
much better
1 parent e826e2c commit e0b4afd

File tree

7 files changed

+57
-22
lines changed

7 files changed

+57
-22
lines changed

index.lisp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(p () "Welcome home!")
1+
(p () "Welcome to my WIP " (a (:href "https://github.com/gabydd/site") "site") "!")

page.lisp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,21 @@
33
(defparameter pages '("index" "about" "projects" "helix"))
44

55
(defun page-header (current-page)
6-
(nav (:class "header")
7-
"Gaby"
6+
(div (:class "header")
7+
(div (:class "title")
8+
(div () "Gaby")
9+
(a (:href "https://github.com/gabydd") (img (:src "octocat-lisp.png" :style "width:min(16vw, 16vh);"))))
810
(div (:class "nav")
911
(dohtml (page pages)
10-
(div (:class "nav-item")
11-
(a (:class (if (equal page current-page) "link-current" "link")
12-
:href (conc-str page ".html"))
13-
page))))))
12+
(a (:class (conc-str "link" (when (equal page current-page) " link-current"))
13+
:href (conc-str page ".html"))
14+
page)))))
1415

1516
(defparameter footer
16-
(div ()
17+
(div (:class "footer")
1718
"Made with a little bit of lisp and a whole lot of love"
18-
(a (:href "https://github.com/gabydd") "Github")))
19+
(img (:src "lisp-warning.png" :style "width:max(6vw, 6vh);margin-left:auto;"))))
20+
1921
(defmacro template (page &rest body)
2022
`(conc-str "<!DOCTYPE HTML>"
2123
(html (:lang "en")
@@ -27,7 +29,7 @@
2729
(link (:rel "stylesheet" :href "style.css")))
2830
(body ()
2931
(page-header ,page)
30-
,@body
32+
(div (:class "body") ,@body)
3133
footer))))
3234

3335
(dolist (page pages)

projects.lisp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(div ()
2-
(h1 () "working on:")
2+
(h2 () "working on:")
33
(p () "This site")
44
(p () "proxy state with firebase")
55
(p () "HELIX!"))

serve.lisp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@
99
(cl-inotify:with-inotify (inotify t ("." '(:modify :dont-follow)))
1010
(cl-inotify:do-events (event inotify :blocking-p t)
1111
(print "A file changed: regenerating")
12-
(load "page.lisp")))
12+
(handler-case (load "page.lisp")
13+
(error (c)
14+
(print c)))))

serve/lisp-warning.png

30.3 KB
Loading

serve/octocat-lisp.png

318 KB
Loading

serve/style.css

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,61 @@
1+
* {
2+
box-sizing: border-box;
3+
margin: 0;
4+
}
15
.header {
6+
font-size: min(10vw, 10vh);
27
display: flex;
3-
justify-content: space-between;
8+
flex-direction: column;
9+
align-items: center;
10+
margin-bottom: 5vh;
411
}
512

6-
.nav {
13+
.title {
14+
align-items: center;
715
display: flex;
816
}
917

10-
.nav-item {
11-
margin-left: 2em;
18+
.nav {
19+
display: flex;
20+
gap: min(6vw, 6vh);
1221
}
1322

1423
.link {
24+
font-size: min(6vw, 6vh);
25+
color: #524747;
1526
text-decoration: none;
16-
color: gray;
1727
}
1828

1929
.link:hover {
20-
color: green;
30+
color: #ba53c6;
2131
}
2232

2333
.link-current {
24-
text-decoration: none;
25-
color: purple;
34+
color: #773edb;
35+
}
36+
37+
body {
38+
display: flex;
39+
flex-direction: column;
40+
min-height: 100vh;
41+
}
42+
.body {
43+
font-size: min(5vh, 5vw);
44+
margin-left: 8vw;
45+
margin-right: 8vw;
46+
flex: 1;
47+
}
48+
49+
.footer {
50+
display: flex;
51+
font-size: max(1.5vh, 1.5vw);
52+
margin-top: 5vh;
53+
margin-bottom: 1vh;
54+
margin-left: 5vw;
55+
margin-right: 5vw;
56+
align-items: flex-end;
2657
}
2758

28-
.link-current:hover {
29-
color: blue;
59+
.h2 {
60+
font-size: min(6vh, 6vw);
3061
}

0 commit comments

Comments
 (0)