site/layout/bootstrap.moon

87 lines
2.7 KiB
Plaintext
Raw Normal View History

2015-02-01 01:15:41 +00:00
import Widget from require "lapis.html"
class Layout extends Widget
head: =>
meta charset: "UTF-8"
title ->
if @title
2015-02-01 04:11:24 +00:00
text "#{@title} - Christine Dodrill"
2015-02-01 01:15:41 +00:00
else
2015-02-01 04:11:24 +00:00
text "Christine Dodrill"
2015-02-01 01:15:41 +00:00
if @meta_description
meta property: "og:description", content: @meta_description
meta name: "description", content: @meta_description
link rel: "stylesheet", href: "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"
link rel: "stylesheet", href: "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css"
2015-02-04 17:26:54 +00:00
link rel: "stylesheet", href: "/static/css/font-awesome.min.css"
2015-02-01 05:18:58 +00:00
link rel: "stylesheet", href: "/static/css/readable.css"
2015-02-01 01:15:41 +00:00
link rel: "stylesheet", href: "/static/css/main.css"
2015-02-03 19:33:30 +00:00
link type: "text/plain", rel: "author", href: "/humans.txt"
2015-02-01 01:15:41 +00:00
script src: "https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"
script src: "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"
2015-02-03 18:14:26 +00:00
script src: "/static/js/instantclick.min.js"
2015-02-01 01:15:41 +00:00
2015-02-05 20:55:53 +00:00
meta name: "viewport", content: "ya-title=#FFF9FD,ya-dock=#FFF9FD"
2015-02-01 07:39:52 +00:00
2015-02-01 01:15:41 +00:00
header: =>
2015-02-01 05:20:08 +00:00
nav class: "navbar navbar-fixed-top", ->
2015-02-01 01:15:41 +00:00
div class: "container", ->
div class: "navbar-header", ->
button type: "button", class: "navbar-toggle collapsed", ["data-toggle"]: "collapse", ["data-target"]: "#navbar", ["aria-expanded"]: "false", ["aria-controls"]: "navbar", ->
span class: "sr-only", ->
text "Toggle navigation"
for i=1,3
span class: "icon-bar"
a class: "navbar-brand", href: "/", ->
2015-02-01 04:11:24 +00:00
text "Christine Dodrill"
2015-02-01 01:15:41 +00:00
div id: "navbar", class: "collapse navbar-collapse", ->
ul class: "nav navbar-nav", ->
2015-02-13 20:57:58 +00:00
li ->
a href: "/blog", "Blog"
2015-02-04 17:33:24 +00:00
li ->
a href: "/projects", "Projects"
2015-02-03 17:56:03 +00:00
li ->
2015-02-03 18:48:18 +00:00
a href: "/resume", "Resume"
2015-02-03 17:56:03 +00:00
2015-02-01 01:15:41 +00:00
ul class: "nav navbar-nav navbar-right", ->
li ->
a href: "/contact", "Contact"
footer: =>
2015-02-05 20:49:40 +00:00
footer ->
div class: "container footer", ->
2015-02-05 20:51:02 +00:00
center ->
p class: "text-muted", ->
text "Christine Cadence Dodrill - #{os.date "%Y"}"
2015-02-01 05:18:58 +00:00
2015-02-05 20:51:02 +00:00
if os.getenv "GIT_REV"
text " - revision "
a href: "https://github.com/Xe/christine.website/commit/#{os.getenv("GIT_REV")}", ->
code "#{os.getenv("GIT_REV")\sub 1,8}"
2015-02-01 05:13:28 +00:00
2015-02-01 01:15:41 +00:00
body: =>
div class: "container", ->
if @flash
div class: "flash", ->
text @flash
@content_for "inner"
content: =>
html_5 ->
head ->
@head!
body ->
@header!
@body!
2015-02-03 18:48:18 +00:00
@footer!