File tree Expand file tree Collapse file tree 6 files changed +123
-0
lines changed Expand file tree Collapse file tree 6 files changed +123
-0
lines changed Original file line number Diff line number Diff line change
1
+ // +build !bindata
2
+
3
+ // Copyright 2016 The Gitea Authors. All rights reserved.
4
+ // Use of this source code is governed by a MIT-style
5
+ // license that can be found in the LICENSE file.
6
+
7
+ package public
8
+
9
+ import (
10
+ "gopkg.in/macaron.v1"
11
+ )
12
+
13
+ func Static (opts * Options ) macaron.Handler {
14
+ return macaron .Static (
15
+ opts .Directory ,
16
+ macaron.StaticOptions {
17
+ SkipLogging : opts .SkipLogging ,
18
+ },
19
+ )
20
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2016 The Gitea Authors. All rights reserved.
2
+ // Use of this source code is governed by a MIT-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package public
6
+
7
+ //go:generate go-bindata -tags bindata -ignore "\\.go|\\.less" -pkg public -o bindata.go ./...
8
+ //go:generate go fmt bindata.go
9
+
10
+ type Options struct {
11
+ Directory string
12
+ SkipLogging bool
13
+ }
Original file line number Diff line number Diff line change
1
+ // +build bindata
2
+
3
+ // Copyright 2016 The Gitea Authors. All rights reserved.
4
+ // Use of this source code is governed by a MIT-style
5
+ // license that can be found in the LICENSE file.
6
+
7
+ package public
8
+
9
+ import (
10
+ "github.com/go-macaron/bindata"
11
+ "gopkg.in/macaron.v1"
12
+ )
13
+
14
+ func Static (opts * Options ) macaron.Handler {
15
+ return macaron .Static (
16
+ opts .Directory ,
17
+ macaron.StaticOptions {
18
+ SkipLogging : opts .SkipLogging ,
19
+ FileSystem : bindata .Static (bindata.Options {
20
+ Asset : Asset ,
21
+ AssetDir : AssetDir ,
22
+ AssetInfo : AssetInfo ,
23
+ AssetNames : AssetNames ,
24
+ Prefix : "" ,
25
+ }),
26
+ },
27
+ )
28
+ }
Original file line number Diff line number Diff line change
1
+ // +build !bindata
2
+
3
+ // Copyright 2016 The Gitea Authors. All rights reserved.
4
+ // Use of this source code is governed by a MIT-style
5
+ // license that can be found in the LICENSE file.
6
+
7
+ package templates
8
+
9
+ import (
10
+ "github.com/go-gitea/gitea/modules/template"
11
+ "gopkg.in/macaron.v1"
12
+ )
13
+
14
+ func Renderer (opts * Options ) macaron.Handler {
15
+ return macaron .Renderer (macaron.RenderOptions {
16
+ Directory : opts .Directory ,
17
+ AppendDirectories : opts .AppendDirectories ,
18
+ Funcs : template .NewFuncMap (),
19
+ })
20
+ }
Original file line number Diff line number Diff line change
1
+ // +build bindata
2
+
3
+ // Copyright 2016 The Gitea Authors. All rights reserved.
4
+ // Use of this source code is governed by a MIT-style
5
+ // license that can be found in the LICENSE file.
6
+
7
+ package templates
8
+
9
+ import (
10
+ "github.com/go-gitea/gitea/modules/template"
11
+ "github.com/go-macaron/bindata"
12
+ "gopkg.in/macaron.v1"
13
+ )
14
+
15
+ func Renderer (opts * Options ) macaron.Handler {
16
+ return macaron .Renderer (macaron.RenderOptions {
17
+ AppendDirectories : opts .AppendDirectories ,
18
+ Funcs : template .NewFuncMap (),
19
+ TemplateFileSystem : bindata .Templates (
20
+ bindata.Options {
21
+ Asset : Asset ,
22
+ AssetDir : AssetDir ,
23
+ AssetInfo : AssetInfo ,
24
+ AssetNames : AssetNames ,
25
+ Prefix : "" ,
26
+ },
27
+ ),
28
+ })
29
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2016 The Gitea Authors. All rights reserved.
2
+ // Use of this source code is governed by a MIT-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package templates
6
+
7
+ //go:generate go-bindata -tags bindata -ignore "\\.go" -pkg templates -o bindata.go ./...
8
+ //go:generate go fmt bindata.go
9
+
10
+ type Options struct {
11
+ Directory string
12
+ AppendDirectories []string
13
+ }
You can’t perform that action at this time.
0 commit comments