var BaseElement = require('base-element')
var inherits = require('inherits')

module.exports = Landing
inherits(Landing, BaseElement)

function Landing (options) {
  if (!(this instanceof Landing)) return new Landing(options)
  BaseElement.call(this)
}

Landing.prototype.render = function (state) {
  var h = this.html.bind(this)
  var elements = []
  
  var url = 'https://github.com/login/oauth/authorize?client_id=65dda308caf01e56f912&scope=gist&redirect_uri=http://127.0.0.1:9966'

  var button = h('a.button.large', { href: url }, [
    h('i.fa.fa-github-square'),
    ' Sign in with GitHub'
  ])

  elements.push(h('div.welcome', [
    h('h2', 'Hello! Let\'s edit some data!'),
    h('p', 'editdata.org is a simple version of flatsheet, a tool for curating data as editorial content.'),
    button,
    h('p', h('a', { href: 'http://flatsheet.io', target: '_blank' }, 'learn more about flatsheet'))
  ]))

  var vtree = h('div.landing', elements)
  return this.afterRender(vtree)
}

@@ -69,16 +69,50 @@
 herits')
+%0Avar config = require('../config')
 %0A%0Amodule
@@ -448,29 +448,32 @@
 t_id
-=65dda308caf01e56f912
+' + config.client_id + '
 &sco
@@ -497,30 +497,31 @@
 uri=
-http://127.0.0.1:9966'
+' + config.redirect_uri
 %0A%0A  

fix big github button