Add more buttons and add row div

This commit is contained in:
Eliot Whalan 2016-06-23 20:59:12 +10:00
parent 872fdf55dc
commit 07180d93fb
No known key found for this signature in database
GPG Key ID: C0A42175139840D6
3 changed files with 11 additions and 4 deletions

View File

@ -35,7 +35,10 @@
</div>
<div class="pull-right">
<a href="{{.Link}}" class="btn btn-raised btn-primary">Raw</a>
<div class="row">
<a href="{{.Link}}" class="btn btn-raised btn-primary">Home</a>
<a href="{{.Raw}}" class="btn btn-raised btn-primary">Raw</a>
</div>
</div>
</div>

View File

@ -35,7 +35,10 @@
</div>
<div class="pull-right">
<a href="%s" class="btn btn-raised btn-primary">Raw</a>
<div class="row">
<a href="%s" class="btn btn-raised btn-primary">Home</a>
<a href="%s" class="btn btn-raised btn-primary">Raw</a>
</div>
</div>
</div>

View File

@ -235,7 +235,8 @@ func pasteHandler(w http.ResponseWriter, r *http.Request) {
p := &Page{
Title: paste,
Body: []byte(s),
Link: link,
Raw: link,
Home: ADDRESS,
}
t, err := template.ParseFiles("assets/paste.html")
if err != nil {
@ -246,7 +247,7 @@ func pasteHandler(w http.ResponseWriter, r *http.Request) {
} else {
dat, err := ioutil.ReadFile("assets/syntax.html")
check(err)
fmt.Fprintf(w, string(dat), paste, paste, s, link)
fmt.Fprintf(w, string(dat), paste, paste, s, ADDRESS, link)
}
}