initial commit

This commit is contained in:
Christine Dodrill 2015-01-31 17:15:41 -08:00
commit a7092d46b4
11 changed files with 279 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
*.lua
logs
*_temp
nginx.conf.compiled
.git

1
Dockerfile Normal file
View File

@ -0,0 +1 @@
FROM xena/lapis:1.7.7.1

10
app.moon Normal file
View File

@ -0,0 +1,10 @@
lapis = require "lapis"
class extends lapis.Application
layout: require "layout.bootstrap"
[index: "/"]: =>
render: true
handle_404: =>
status: 404, render: "notfound"

4
app.yaml Normal file
View File

@ -0,0 +1,4 @@
name: "within"
dependencies:
- moonscript

6
config.moon Normal file
View File

@ -0,0 +1,6 @@
config = require "lapis.config"
config "development", ->
port 8080
config "docker", ->
port 5000

72
layout/bootstrap.moon Normal file
View File

@ -0,0 +1,72 @@
import Widget from require "lapis.html"
class Layout extends Widget
head: =>
meta charset: "UTF-8"
title ->
if @title
text "#{@title} - Within"
else
text "Within"
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"
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: =>
nav class: "navbar navbar-inverse navbar-fixed-top", ->
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: "/", ->
text "Within"
div id: "navbar", class: "collapse navbar-collapse", ->
ul class: "nav navbar-nav", ->
li ->
a href: "/articles", "Articles"
ul class: "nav navbar-nav navbar-right", ->
li ->
a href: "/contact", "Contact"
footer: =>
footer class: "footer", ->
div class: "container", ->
if @copyright
p class: "text-muted", ->
text @copytight
else
p class: "text-muted", ->
text "From Within - #{os.date "%Y"}"
body: =>
div class: "container", ->
if @flash
div class: "flash", ->
text @flash
@content_for "inner"
content: =>
html_5 ->
head ->
@head!
body ->
@header!
@body!

79
mime.types Normal file
View File

@ -0,0 +1,79 @@
types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/x-javascript js;
application/atom+xml atom;
application/rss+xml rss;
text/mathml mml;
text/plain txt;
text/vnd.sun.j2me.app-descriptor jad;
text/vnd.wap.wml wml;
text/x-component htc;
image/png png;
image/tiff tif tiff;
image/vnd.wap.wbmp wbmp;
image/x-icon ico;
image/x-jng jng;
image/x-ms-bmp bmp;
image/svg+xml svg svgz;
image/webp webp;
application/java-archive jar war ear;
application/mac-binhex40 hqx;
application/msword doc;
application/pdf pdf;
application/postscript ps eps ai;
application/rtf rtf;
application/vnd.ms-excel xls;
application/vnd.ms-powerpoint ppt;
application/vnd.wap.wmlc wmlc;
application/vnd.google-earth.kml+xml kml;
application/vnd.google-earth.kmz kmz;
application/x-7z-compressed 7z;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
application/x-java-jnlp-file jnlp;
application/x-makeself run;
application/x-perl pl pm;
application/x-pilot prc pdb;
application/x-rar-compressed rar;
application/x-redhat-package-manager rpm;
application/x-sea sea;
application/x-shockwave-flash swf;
application/x-stuffit sit;
application/x-tcl tcl tk;
application/x-x509-ca-cert der pem crt;
application/x-xpinstall xpi;
application/xhtml+xml xhtml;
application/zip zip;
application/octet-stream bin exe dll;
application/octet-stream deb;
application/octet-stream dmg;
application/octet-stream eot;
application/octet-stream iso img;
application/octet-stream msi msp msm;
audio/midi mid midi kar;
audio/mpeg mp3;
audio/ogg ogg;
audio/x-m4a m4a;
audio/x-realaudio ra;
video/3gpp 3gpp 3gp;
video/mp4 mp4;
video/mpeg mpeg mpg;
video/quicktime mov;
video/webm webm;
video/x-flv flv;
video/x-m4v m4v;
video/x-mng mng;
video/x-ms-asf asx asf;
video/x-ms-wmv wmv;
video/x-msvideo avi;
}

31
nginx.conf Normal file
View File

@ -0,0 +1,31 @@
worker_processes ${{NUM_WORKERS}};
error_log stderr notice;
daemon off;
events {
worker_connections 1024;
}
http {
include mime.types;
server {
listen ${{PORT}};
lua_code_cache ${{CODE_CACHE}};
location / {
default_type text/html;
content_by_lua '
require("lapis").serve("app")
';
}
location /static/ {
alias static/;
}
location /favicon.ico {
alias static/favicon.ico;
}
}
}

48
static/css/main.css Normal file
View File

@ -0,0 +1,48 @@
body {
padding-top: 60px;
}
.container {
max-width 600px;
}
html {
position: relative;
min-height: 100%;
}
.footer {
position: absolute;
bottom: 0;
padding-top: 10px;
width: 100%;
height: 50px;
background-color: #f5f5f5;
}
.flash {
background: #cee5F5;
padding: 0.5em;
border: 1px solid #aacbe2;
}
.error {
background: #f0d6d6;
padding: 0.5em;
}
table {
align: center;
border-width: 1px;
border-spacing: 2px;
border-style: outset;
border-color: gray;
border-collapse: collapse;
background-color: white;
}
table td {
border-width: 1px;
padding: 4px;
border-style: inset;
border-color: gray;
background-color: white;
}

15
views/index.moon Normal file
View File

@ -0,0 +1,15 @@
import Widget from require "lapis.html"
class Index extends Widget
content: =>
div class: "jumbotron", ->
h1 "Christine Dodrill"
p class: "lead", "Rockstar gopher, innovative thinker, programmer for hire."
div class: "row", ->
div class: "col-md-4", ->
p "Pitchfork tilde tofu scenester, ugh fingerstache gastropub wolf food truck authentic fap squid retro drinking vinegar. Mustache organic polaroid, flexitarian chillwave chia plaid occupy pickled mlkshk. Messenger bag next level biodiesel master cleanse stumptown vinyl polaroid butcher distillery, kitsch freegan fashion axe gastropub forage. Craft beer mumblecore Brooklyn freegan Schlitz. Stumptown pug PBR&B High Life meh, umami Banksy tousled synth actually biodiesel. Wayfarers master cleanse chillwave street art. Thundercats artisan single-origin coffee, squid yr whatever Godard cray mumblecore."
div class: "col-md-4", ->
p "Jean shorts organic biodiesel bitters gastropub bicycle rights letterpress Odd Future pour-over. Squid tofu bespoke, kitsch biodiesel blog Pinterest Williamsburg. Banksy next level pork belly PBR&B, mlkshk readymade Intelligentsia cred migas keytar typewriter health goth 8-bit. Messenger bag ennui mumblecore, direct trade meditation taxidermy tattooed single-origin coffee Williamsburg readymade squid disrupt seitan Tumblr plaid. Helvetica polaroid Schlitz squid sriracha, four dollar toast authentic gluten-free iPhone mlkshk. Fixie four dollar toast photo booth, Marfa ugh synth quinoa pickled narwhal drinking vinegar YOLO plaid cred. Roof party flexitarian vinyl umami."
div class: "col-md-4", ->
p "Aesthetic jean shorts High Life chambray Thundercats butcher lumbersexual, ennui keffiyeh selvage. Echo Park semiotics cred, chia fanny pack you probably haven't heard of them vegan squid kitsch pickled Bushwick High Life taxidermy. Photo booth Kickstarter lumbersexual beard freegan artisan, craft beer keffiyeh roof party narwhal hella hashtag mumblecore cold-pressed direct trade. Pop-up kogi lumbersexual irony vegan, tote bag ennui chambray organic post-ironic mumblecore. Bushwick deep v narwhal, put a bird on it next level you probably haven't heard of them cred ugh flannel wolf. Listicle Echo Park migas cray health goth. Keffiyeh tote bag letterpress normcore, Bushwick lomo fingerstache put a bird on it."

8
views/notfound.moon Normal file
View File

@ -0,0 +1,8 @@
import Widget from require "lapis.html"
class UserInfo extends Widget
content: =>
center ->
h1 "Oops!"
p "We couldn't find that page for you! If you see this page in error please let us know!"