simplex/layouts/main.moon
Paul Liverman III abe580956e styling n stuff
2018-04-24 20:44:44 -07:00

38 lines
1.7 KiB
Plaintext

import Widget from require "lapis.html"
csrf = require "lapis.csrf"
config = require("lapis.config").get!
class extends Widget
content: =>
html_5 ->
head ->
meta charset: "utf-8"
meta name: "viewport", content: "width=device-width, initial-scale=1"
title(@title or "Simplex")
-- Milligram CSS framework
link rel: "stylesheet", href: "https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic"
link rel: "stylesheet", href: "https://cdn.rawgit.com/necolas/normalize.css/master/normalize.css"
link rel: "stylesheet", href: "https://cdn.rawgit.com/milligram/milligram/master/dist/milligram.min.css"
-- JQuery
script src: "https://code.jquery.com/jquery-3.3.1.min.js", integrity: "sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=", crossorigin: "anonymous"
-- custom JS/CSS
script src: "/static/main.js"
link rel: "stylesheet", href: "/static/main.css"
body ->
div class: "container", ->
div class: "row", ->
div class: "column column-25 btns", ->
a class: "button", href: "#", "API Docs"
div class: "column column-100", ->
h1(@title or "Simplex")
div class: "column column-25 btns", ->
if @user
a class: "button", href: @url_for("user_me"), "You"
a class: "button", href: @url_for("user_logout"), "Log Out"
else
a class: "button", href: @url_for("user_login", nil, redirect: @url_for(@route_name)), "Log In"
a class: "button", href: @url_for("user_new", nil, redirect: @url_for(@route_name)), "New User"
@content_for "inner"