diff --git a/app.moon b/app.moon index 170647a..7e005e6 100644 --- a/app.moon +++ b/app.moon @@ -1,12 +1,19 @@ +gh = require('github').new({access_token: os.getenv "GITHUB_TOKEN", httpclient_driver: 'httpclient.ngx_driver'}) lapis = require "lapis" class extends lapis.Application layout: require "layout.bootstrap" - @include "controllers.about" @include "controllers.hire" [index: "/"]: => + @user, err = gh\get_authenticated_user() + + if err + @err = err + + return status: 500, render: "error" + render: true [contact: "/contact"]: => diff --git a/controllers/about.moon b/controllers/about.moon deleted file mode 100644 index ba20799..0000000 --- a/controllers/about.moon +++ /dev/null @@ -1,16 +0,0 @@ -gh = require('github').new({access_token: os.getenv "GITHUB_TOKEN", httpclient_driver: 'httpclient.ngx_driver'}) -http = require "lapis.nginx.http" - -lapis = require "lapis" - -class About extends lapis.Application - [about: "/about"]: => - @user, err = gh\get_authenticated_user() - @title = "About Me" - - if err - @err = err - - return status: 500, render: "error" - - return render: true diff --git a/views/about.moon b/views/about.moon deleted file mode 100644 index 2a20a7e..0000000 --- a/views/about.moon +++ /dev/null @@ -1,33 +0,0 @@ -import Widget from require "lapis.html" - -class About extends Widget - content: => - link rel: "stylesheet", href: "/static/css/about/main.css" - - div class: "row panel", -> - div class: "col-md-4 bg_blur", -> - a href: "/hire", class: "follow_btn hidden-xs", "Hire me" - - div class: "col-md-8 col-xs-12", -> - img src: @user.avatar_url, class: "img-thumbnail picture hidden-xs" - img src: @user.avatar_url, class: "img-thumbnail picture visible-xs picture_mob" - - div class: "header", -> - h1 "Christine Dodrill" - h4 "Rockstar Hacker" - span "I am a GitHub power user. I am constantly learning new languages and tools. I strongly believe in knowing many languages and ways to do things so I can pick the right tool for the job." - - div class: "row nav", -> - div class: "col-md-4" - div class: "col-md-8 col-xs-12", style: "margin: 0px;padding: 0px;", -> - div class: "col-md-4 col-xs-4 well", title: "Number of public repositories", -> - i class: "fa fa-weixin fa-lg" - p @user.public_repos - - div class: "col-md-4 col-xs-4 well", title: "Number of followers", -> - i class: "fa fa-heart-o fa-lg" - p @user.followers - - div class: "col-md-4 col-xs-4 well", title: "Number of users following", -> - i class: "fa fa-thumbs-o-up fa-lg" - p @user.following diff --git a/views/index.moon b/views/index.moon index 9985731..2a20a7e 100644 --- a/views/index.moon +++ b/views/index.moon @@ -1,17 +1,33 @@ import Widget from require "lapis.html" -class Index extends Widget +class About extends Widget content: => - div class: "jumbotron", -> - h1 "Christine Dodrill" - p class: "lead", "Rockstar gopher, innovative thinker, programmer for hire." + link rel: "stylesheet", href: "/static/css/about/main.css" - a class: "btn btn-primary btn-lg", href: "/about", role: "button", "Find out more" + div class: "row panel", -> + div class: "col-md-4 bg_blur", -> + a href: "/hire", class: "follow_btn hidden-xs", "Hire me" - 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." + div class: "col-md-8 col-xs-12", -> + img src: @user.avatar_url, class: "img-thumbnail picture hidden-xs" + img src: @user.avatar_url, class: "img-thumbnail picture visible-xs picture_mob" + + div class: "header", -> + h1 "Christine Dodrill" + h4 "Rockstar Hacker" + span "I am a GitHub power user. I am constantly learning new languages and tools. I strongly believe in knowing many languages and ways to do things so I can pick the right tool for the job." + + div class: "row nav", -> + div class: "col-md-4" + div class: "col-md-8 col-xs-12", style: "margin: 0px;padding: 0px;", -> + div class: "col-md-4 col-xs-4 well", title: "Number of public repositories", -> + i class: "fa fa-weixin fa-lg" + p @user.public_repos + + div class: "col-md-4 col-xs-4 well", title: "Number of followers", -> + i class: "fa fa-heart-o fa-lg" + p @user.followers + + div class: "col-md-4 col-xs-4 well", title: "Number of users following", -> + i class: "fa fa-thumbs-o-up fa-lg" + p @user.following