Add stuff for xeserv git links

This commit is contained in:
Christine Dodrill 2015-02-01 16:41:19 -08:00
parent a79f6bca1f
commit 3c0fbb5271
2 changed files with 20 additions and 1 deletions

View File

@ -2,6 +2,13 @@ lapis = require "lapis"
class Go extends lapis.Application
[repo: "/go/:name"]: =>
@kind = "github"
@repo = @params.name
render: true
[repo: "/go/xeserv/*"]: =>
@kind = "xeserv"
@repo = @params.splat
render: true

View File

@ -2,4 +2,16 @@ import Widget from require "lapis.html"
class Repo extends Widget
content: =>
if @kind == "xeserv"
meta name: "go-import", content: "christine.website/go/xeserv/#{@repo} git http://git.xeserv.us/#{repo}"
else
meta name: "go-import", content: "christine.website/go/#{@repo} git https://github.com/Xe/#{@repo}"
center ->
h1 ->
text "Link"
p class: "lead", ->
text "This is a page for "
a href: "http://golang.org", "Go"
text " redirection for repository downloads. This page won't be any use to you in a browser."