Skip to content

Commit

Permalink
navbar updates
Browse files Browse the repository at this point in the history
  • Loading branch information
crestofthebeast committed Mar 24, 2024
1 parent 9eda8fa commit 345510d
Show file tree
Hide file tree
Showing 12 changed files with 102 additions and 125 deletions.
2 changes: 1 addition & 1 deletion .clj-kondo/.cache/v1/clj/powerblog.layout.transit.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["^ ","~$header",["^ ","~:row",5,"~:col",1,"~:name","^0","~:ns","~$powerblog.layout","~:top-ns","^5","~:type","~:vector"],"~$layout",["^ ","^1",10,"^2",1,"~:varargs-min-arity",1,"^3","^9","^4","^5","^6","^5","~:arities",["^ ","~:varargs",["^ ","~:ret","^8","~:min-arity",1,"~:arglist-str","[{:keys [title]} & content]"]],"^7","~:fn"],"~:filename","/var/home/avery/Documents/dev/blog/src/powerblog/layout.clj"]
["^ ","~$header",["^ ","~:row",4,"~:col",1,"~:name","^0","~:ns","~$powerblog.layout","~:top-ns","^5","~:type","~:vector"],"~$layout",["^ ","^1",17,"^2",1,"~:varargs-min-arity",1,"^3","^9","^4","^5","^6","^5","~:arities",["^ ","~:varargs",["^ ","~:ret","^8","~:min-arity",1,"~:arglist-str","[{:keys [title]} & content]"]],"^7","~:fn"],"~:filename","/var/home/avery/Documents/dev/blog/src/powerblog/layout.clj"]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["^ ","~$render-page",["^ ","~:row",7,"~:col",1,"~:fixed-arities",["~#set",[2]],"~:name","^0","~:ns","~$powerblog.pages.about","~:top-ns","~$powerblog.pages.dhole","~:arities",["^ ","~i2",["^ ","~:ret","~:vector","~:arglist-str","[context page]"]],"~:type","~:fn"],"~:filename","/var/home/avery/Documents/dev/blog/src/powerblog/pages/dhole.clj"]
["^ ","~$render-page",["^ ","~:row",4,"~:col",1,"~:fixed-arities",["~#set",[2]],"~:name","^0","~:ns","~$powerblog.pages.about","~:top-ns","^7","~:arities",["^ ","~i2",["^ ","~:ret","~:vector","~:arglist-str","[context page]"]],"~:type","~:fn"],"~:filename","/var/home/avery/Documents/dev/blog/src/powerblog/pages/about.clj"]
2 changes: 1 addition & 1 deletion .clj-kondo/.cache/v1/clj/user.transit.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["^ ","~$app",["^ ","~:row",15,"~:col",3,"~:name","^0","~:ns","~$user","~:top-ns","^5"],"~$db",["^ ","^1",19,"^2",3,"^3","^7","^4","^5","^6","^5"],"~:filename","/var/home/avery/Documents/dev/blog/src/powerblog/pages/tag.clj"]
["^ ","~$app",["^ ","~:row",15,"~:col",3,"~:name","^0","~:ns","~$user","~:top-ns","^5"],"~$db",["^ ","^1",19,"^2",3,"^3","^7","^4","^5","^6","^5"],"~:filename","/var/home/avery/Documents/dev/blog/src/powerblog/pages/dhole.clj"]
4 changes: 2 additions & 2 deletions content/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

# About Me


Hi! I'm Avery, a computer science student located in Australia.

I find myself deeply engaged in the study of programming languages, type systems, and how we can move towards a more memory safe future - these lead me to write a lot of Common Lisp and Rust. Outside of software, I'm passionate about linguistics, games development and writing, and accessibility in software and hardware; particularly when it comes to input methods.


### Aside: This Blog
This blog was written in the lovely [Clojure](https://clojure.org/) lisp dialect using the [Powerpack](https://github.com/cjohansen/powerpack) toolkit.
This blog was written in the lovely [Clojure](https://clojure.org/) language using the [Powerpack](https://github.com/cjohansen/powerpack) toolkit.
2 changes: 2 additions & 0 deletions content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
# blackmoonkite

A website-blog coalascence where I gather thoughts on programming, writing, games, and other topics of my interest.

This website is currently under construction. Things may be unfinished or nonfunctionial.
173 changes: 71 additions & 102 deletions resources/public/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ video {

.prose {
color: var(--tw-prose-body);
max-width: 65ch;
max-width: 100%;
}

.prose :where(p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
Expand Down Expand Up @@ -1050,155 +1050,125 @@ video {
color: #639fd1;
}

.fixed {
position: fixed;
}

.m-auto {
margin: auto;
}

.m-0 {
margin: 0px;
}

.-m-20 {
margin: -5rem;
}

.mx-auto {
margin-left: auto;
margin-right: auto;
.relative {
position: relative;
}

.mx-12 {
margin-left: 3rem;
margin-right: 3rem;
.bottom-0 {
bottom: 0px;
}

.-mx-20 {
margin-left: -5rem;
margin-right: -5rem;
.bottom-2 {
bottom: 0.5rem;
}

.mx-0 {
margin-left: 0px;
margin-right: 0px;
.bottom-1 {
bottom: 0.25rem;
}

.mx-24 {
margin-left: 6rem;
margin-right: 6rem;
}

.mb-8 {
margin-bottom: 2rem;
}

.mb-3 {
margin-bottom: 0.75rem;
.mx-auto {
margin-left: auto;
margin-right: auto;
}

.mb-4 {
margin-bottom: 1rem;
}

.ml-auto {
margin-left: auto;
}

.mr-auto {
margin-right: auto;
}

.flex {
display: flex;
}

.w-full {
width: 100%;
.hidden {
display: none;
}

.w-screen {
width: 100vw;
.h-fit {
height: -moz-fit-content;
height: fit-content;
}

.w-auto {
width: auto;
.h-2 {
height: 0.5rem;
}

.flex-auto {
flex: 1 1 auto;
.h-8 {
height: 2rem;
}

.flex-1 {
flex: 1 1 0%;
.h-12 {
height: 3rem;
}

.flex-initial {
flex: 0 1 auto;
.h-32 {
height: 8rem;
}

.grow {
flex-grow: 1;
.h-16 {
height: 4rem;
}

.list-none {
list-style-type: none;
.max-h-fit {
max-height: -moz-fit-content;
max-height: fit-content;
}

.flex-row {
flex-direction: row;
.max-h-2 {
max-height: 0.5rem;
}

.flex-wrap {
flex-wrap: wrap;
.max-h-4 {
max-height: 1rem;
}

.items-end {
align-items: flex-end;
.max-h-16 {
max-height: 4rem;
}

.items-center {
align-items: center;
.max-h-12 {
max-height: 3rem;
}

.justify-start {
justify-content: flex-start;
.max-w-screen-md {
max-width: 768px;
}

.justify-center {
justify-content: center;
.list-none {
list-style-type: none;
}

.justify-between {
justify-content: space-between;
.items-center {
align-items: center;
}

.space-x-4 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(1rem * var(--tw-space-x-reverse));
margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
.justify-between {
justify-content: space-between;
}

.self-start {
align-self: flex-start;
.border-2 {
border-width: 2px;
}

.self-end {
align-self: flex-end;
.border-b-2 {
border-bottom-width: 2px;
}

.justify-self-start {
justify-self: start;
.border-b {
border-bottom-width: 1px;
}

.justify-self-end {
justify-self: end;
.border-dashed {
border-style: dashed;
}

.justify-self-center {
justify-self: center;
.border-darkish-grey {
--tw-border-opacity: 1;
border-color: rgb(72 70 71 / var(--tw-border-opacity));
}

.bg-beige {
Expand All @@ -1210,22 +1180,16 @@ video {
padding: 2rem;
}

.p-4 {
padding: 1rem;
}

.p-16 {
padding: 4rem;
.pb-8 {
padding-bottom: 2rem;
}

.py-8 {
padding-top: 2rem;
padding-bottom: 2rem;
.pl-0 {
padding-left: 0px;
}

.py-4 {
padding-top: 1rem;
padding-bottom: 1rem;
.align-bottom {
vertical-align: bottom;
}

.font-ibm-plex-sans {
Expand Down Expand Up @@ -1260,13 +1224,18 @@ video {
}
}

@media (min-width: 640px) {
.sm\:flex {
display: flex;
@media (min-width: 1024px) {
.lg\:block {
display: block;
}
}

@media (prefers-color-scheme: dark) {
.dark\:border-white {
--tw-border-opacity: 1;
border-color: rgb(255 255 255 / var(--tw-border-opacity));
}

.dark\:bg-dark-grey {
--tw-bg-opacity: 1;
background-color: rgb(50 63 70 / var(--tw-bg-opacity));
Expand Down
17 changes: 12 additions & 5 deletions src/powerblog/layout.clj
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
(ns powerblog.layout)


;; TODO: some kind of function to put pipes between things here
(def header
[:header.mx-auto.dark:prose-invert.prose.mb-4.space-x-4
[:a {:href "/"} "home"]
[:a.flex-auto.self-end {:href "/about/"} "about"]])
[:header.dark:prose-invert.prose.max-w-screen.mx-24.mb-4
[:nav.flex.items-center.justify-between.border-b.border-darkish-grey.dark:border-white.max-h-12.relative
[:ul.list-none.pl-0
[:li
[:a {:href "/"} "home"]]]
[:ul.list-none.pl-0.hidden.lg:block
[:li
[:a {:href "/"} "programming resources"]]]
[:ul.list-none.pl-0
[:li
[:a {:href "/about/"} "about"]]]]])

(defn layout [{:keys [title]} & content]
[:html.dark:bg-dark-grey.bg-beige.font-ibm-plex-sans.text-darkish-grey.p-8
header
[:head
(when title [:title title])]
[:body.py-8
[:body
content]])
2 changes: 1 addition & 1 deletion src/powerblog/pages/article.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

(defn render-page [context page]
(layout/layout {}
[:article.prose.dark:prose-invert.mx-auto
[:article.prose.dark:prose-invert.max-w-screen-md.mx-auto
(md/render-html (:page/body page))]))
4 changes: 2 additions & 2 deletions src/powerblog/pages/blog_listing.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

(defn render-page [context page]
(layout/layout {:title [:i18n ::page-title]}
[:article.prose.dark:prose-invert.mx-auto
[:article.prose.dark:prose-invert
[:h1 [:i18n ::page-title]]
[:ul
(for [blog-post (frontpage/get-blog-posts (:app/db context))]
(:li [:a {:href (:page/uri blog-post)} (:page/title blog-post)]))]]))
(:li [:a {:href (:page/uri blog-post)} (:page/title blog-post)]))]]))
13 changes: 6 additions & 7 deletions src/powerblog/pages/frontpage.clj
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
(defn render-page [context page]
(let [blog-posts (get-blog-posts (:app/db context))]
(layout/layout {:title "blackmoonkite"}
[:div.flex.justify-center.w-full
[:article.prose.dark:prose-invert
(md/render-html (:page/body page))
[:h2 [:i18n ::blog-posts {:n (count blog-posts)}]]
[:ul
(for [blog-post (get-blog-posts (:app/db context))]
[:li [:a {:href (:page/uri blog-post)} (:page/title blog-post)]])]]])))
[:article.prose.dark:prose-invert.max-w-screen-md.mx-auto
(md/render-html (:page/body page))
[:h2 [:i18n ::blog-posts {:n (count blog-posts)}]]
[:ul
(for [blog-post (get-blog-posts (:app/db context))]
[:li [:a {:href (:page/uri blog-post)} (:page/title blog-post)]])]])))
4 changes: 2 additions & 2 deletions src/powerblog/pages/tag.clj
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
(let [title (str "Posts About: " (name (:tag-page/tag page)))]
(layout/layout
{:title title}
[:article.prose.dark:prose-invert.mx-auto
[:article.prose.dark:prose-invert
[:h1 title]
[:ul
(for [blog-post (get-blog-posts (:app/db context) (:tag-page/tag page))]
[:li [:a {:href (:page/uri blog-post)} (:page/title blog-post)]])]])))
[:li [:a {:href (:page/uri blog-post)} (:page/title blog-post)]])]])))
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
typography: theme => ({
DEFAULT: {
css: {

maxWidth: '100%',
a: {
color: theme('colors.pale-blue')
},
Expand Down

0 comments on commit 345510d

Please sign in to comment.