site/layout/bootstrap.moon

77 lines
2.3 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-01 06:05:42 +00:00
link rel: "stylesheet", href: "https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/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"
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"
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", ->
li ->
2015-02-01 04:11:24 +00:00
a href: "/about", "About"
2015-02-01 01:15:41 +00:00
2015-02-01 07:05:25 +00:00
li ->
a href: "/hire", "Hire Me"
2015-02-01 01:15:41 +00:00
ul class: "nav navbar-nav navbar-right", ->
li ->
a href: "/contact", "Contact"
footer: =>
footer class: "footer", ->
div class: "container", ->
2015-02-01 05:18:58 +00:00
p class: "text-muted", ->
text "Christine Cadence Dodrill - #{os.date "%Y"}"
if os.getenv "GIT_REV"
text " revision #{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!