Add support for custom footer
This commit is contained in:
parent
9f3e7a7b86
commit
a292c25f84
7 changed files with 60 additions and 3 deletions
22
internal/dis/component/control/static/custom/assets.go
Normal file
22
internal/dis/component/control/static/custom/assets.go
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
package custom
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component"
|
||||
)
|
||||
|
||||
// CustomAssetsPath is the path custom assets are stored at
|
||||
func (custom *Custom) CustomAssetsPath() string {
|
||||
return filepath.Join(custom.Config.DeployRoot, "core", "assets")
|
||||
}
|
||||
|
||||
func (custom *Custom) FooterPath() string {
|
||||
return filepath.Join(custom.CustomAssetsPath(), "footer.html")
|
||||
}
|
||||
|
||||
func (custom *Custom) BackupName() string { return "custom" }
|
||||
|
||||
func (custom *Custom) Backup(context component.StagingContext) error {
|
||||
return context.CopyDirectory("", custom.CustomAssetsPath())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue