Add more buttons and add row div

This commit is contained in:
Eliot Whalan 2016-06-23 20:59:12 +10:00
parent e49ddf6cef
commit 82d977eb85
3 changed files with 11 additions and 4 deletions

View File

@ -35,7 +35,10 @@
</div> </div>
<div class="pull-right"> <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>
</div> </div>

View File

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

View File

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