site/layout/bootstrap.moon

81 lines
2.5 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"
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-03 19:22:25 +00:00
meta name: "viewport", content: "ya-title=#FFCCE6,ya-dock=#F2E6EB"
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-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: =>
footer class: "footer", ->
div class: "container", ->
2015-02-03 18:55:37 +00:00
p class: "text-muted", ->
2015-02-03 18:50:22 +00:00
text "Christine Cadence Dodrill - #{os.date "%Y"}"
2015-02-01 05:18:58 +00:00
2015-02-03 18:50:22 +00:00
if os.getenv "GIT_REV"
text " - revision "
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!