knutsen.co

Knutsen Homepage Source - knutsen.co
git clone git://git.knutsen.co/knutsen.co
Log | Files | Refs | README | LICENSE

nav.sex (790B)


(%define (nav title)
  (nav (h1 %title)
       (ul
         (li (a :href "/" /home))
         (li (a :href "/about" /about))
         (li (a :href "/email" /email))
         (li (a :href "https://canvas.knutsen.co" /canvas)))))

(style
  (nav :display flex
       :justify-content space-between
       :align-items center
       :margin (2em 0))
  (nav h1 :font-size 2em
          :margin 0
          :display inline-block)
  (nav ul :list-style none
          :margin 0 :padding 0
          :display inline-block)
  (nav li :margin-left 0.5em
          :display inline-block)
  (nav "li:nth-child(1)"
    :margin-left 0)
  (nav li:before :display none)

  (@media only screen and :max-width 700px
    (nav h1 , nav ul :display block)
    (nav :display block
         :text-align center)))