1
0
mirror of https://github.com/golang/go synced 2024-11-18 15:24:41 -07:00
go/present/background.go
Timothy Studd 1e63c6ac3b present: add background image element for slides
Fixes golang/go#11470

Change-Id: I665622197bea48b95adc839be8de7d03bf812f37
Reviewed-on: https://go-review.googlesource.com/18360
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-01-07 03:28:50 +00:00

26 lines
554 B
Go

// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package present
import (
"strings"
)
func init() {
Register("background", parseBackground)
}
type Background struct {
URL string
}
func (i Background) TemplateName() string { return "background" }
func parseBackground(ctx *Context, fileName string, lineno int, text string) (Elem, error) {
args := strings.Fields(text)
background := Background{URL: args[1]}
return background, nil
}