common links and "Logout" => table

common links and "Logout" => table

html = require "lapis.html"

class extends html.Widget
  content: =>
    html_5 ->
      head ->
        meta charset: 'utf-8'
        link
          rel: "icon", type: "image/x-icon",
          href: "/favicon.ico"
        title @title or @_ "Kodomo Quiz"
      body ->
        h1 class: "header", @_("Kodomo Quiz")
        element 'table', -> element 'tr', ->
          element 'td', ->
            a href: @url_for('index'), ->
              text @_ "Main page"
          element 'td', ->
            text "|"
          element 'td', ->
            a href: @url_for('russian'), ->
              text "Русский"
          element 'td', ->
            text "|"
          element 'td', ->
            a href: @url_for('english'), ->
              text "English"
          if @session.user
            element 'td', ->
              text "|"
            element 'td', ->
              url = @url_for("logout")
              form method: "POST", action: url, ->
                input {type: "hidden", name: "csrf_token",
                    value: @new_csrf}
                input type: "submit", value: @_('Logout')
        raw '<br/>'
        @content_for "inner"

html = require "lapis.html"

class extends html.Widget
  content: =>
    html_5 ->
      head ->
        meta charset: 'utf-8'
        link
          rel: "icon", type: "image/x-icon",
          href: "/favicon.ico"
        title @title or @_ "Kodomo Quiz"
      body ->
        h1 class: "header", @_("Kodomo Quiz")
        a href: @url_for('index'), ->
          text @_ "Main page"
        text " | "
        a href: @url_for('russian'), ->
          text "Русский"
        text " | "
        a href: @url_for('english'), ->
          text "English"
        if @session.user
          form method: "POST", action: @url_for("logout"), ->
            input {type: "hidden", name: "csrf_token",
                value: @new_csrf}
            input type: "submit", value: @_('Logout')
        raw '<br/>'
        @content_for "inner"


added DEBUG global

added DEBUG global

io.stdout\setvbuf'no'

export wScr, hScr
wScr = love.graphics.getWidth
hScr = love.graphics.getHeight

require "game"
export flux = require "lib/flux/flux"

export kDEBUG = false

love.load = ->
    assert love.graphics.isSupported("canvas", "npot"), "Your graphic card is not supported, sorry!"
    export game = Game()

love.draw = ->
    game\draw()

love.update = (dt) ->
    flux.update(dt)
    game\update(dt)

love.keyreleased = (key) ->
    game\keyreleased(key)

love.mousepressed = (x, y, button) ->
    game\mousepressed(x, y, button)

io.stdout\setvbuf'no'

export wScr, hScr
wScr = love.graphics.getWidth
hScr = love.graphics.getHeight

require "game"
export flux = require "lib/flux/flux"

love.load = ->
    assert love.graphics.isSupported("canvas", "npot"), "Your graphic card is not supported, sorry!"
    export game = Game()

love.draw = ->
    game\draw()

love.update = (dt) ->
    flux.update(dt)
    game\update(dt)

love.keyreleased = (key) ->
    game\keyreleased(key)

love.mousepressed = (x, y, button) ->
    game\mousepressed(x, y, button)