diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-03-04 22:26:37 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-03-05 10:59:44 +0000 |
| commit | 902af9866eff3960e094f2563ac9b91f2742af76 (patch) | |
| tree | a787c109072c7f496e6d3d1407bd69dcacf09d57 /extra | |
| parent | make lib/midi documentable (diff) | |
| download | alive-902af9866eff3960e094f2563ac9b91f2742af76.tar.gz alive-902af9866eff3960e094f2563ac9b91f2742af76.zip | |
main page and responsive styling
Diffstat (limited to 'extra')
| -rwxr-xr-x | extra/git-version.sh | 13 | ||||
| -rw-r--r-- | extra/layout.moon | 27 |
2 files changed, 35 insertions, 5 deletions
diff --git a/extra/git-version.sh b/extra/git-version.sh new file mode 100755 index 0000000..e53ddbc --- /dev/null +++ b/extra/git-version.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +TAG=`git describe --abbrev=0 HEAD` +REV_SHORT=`git rev-parse --short HEAD` +REV_LONG=`git rev-parse HEAD` + +cat <<EOF +{ + tag: "${TAG}" + rev_short: "${REV_SHORT}" + rev_long: "${REV_LONG}" +} +EOF diff --git a/extra/layout.moon b/extra/layout.moon index 71bbfb2..4dc67c2 100644 --- a/extra/layout.moon +++ b/extra/layout.moon @@ -1,3 +1,5 @@ +v = require 'core.version' + -- render an ALV Value to a HTML string render = (name, value, prefix=nil) -> import div, label, code, ul, li, i, a, p from require 'extra.dom' @@ -38,11 +40,16 @@ r = (name, page='') -> -- - title -- - body layout = (opts) -> - import nav, div, span, b, code, i, a, article from require 'extra.dom' + import header, footer, nav, div, span, b, code, a, article from require 'extra.dom' - navigation = nav div { - span (b 'alive'), ' ', (code 'v0.0'), ' documentation' - i! + head = header nav { + span { + a 'alive', href: abs 'index.html' + ' ' + code v.tag + ' documentation' + } + div class: 'grow' a 'home', href: abs 'index.html' a 'getting started', href: abs 'guide.html' a 'reference', href: abs 'reference/index.html' @@ -52,17 +59,27 @@ layout = (opts) -> "#{opts.title} - alive" else "alive documentation" + foot = footer div { + 'alive ' + a (code v.tag), href: "https://git.s-ol.nu/alivecoding/#{v.tag}" + ', generated ' + os.date '!%Y-%m-%d %T' + } "<!DOCTYPE html> <html> <head> + <meta charset=\"UTF-8\"> + <meta name=\"viewport\" content=\"width=640\"> + <title>#{title}</title> <link rel=\"stylesheet\" href=\"#{abs 'style.css'}\"> #{opts.css or ''} </head> <body> - #{navigation} + #{head} #{body} + #{foot} </body> </html>" |
