forked from TUM-Dev/gocast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update Dockerfile Add copy of opptional branding folder for - manifest.json - favicon.ico - logo.svg * Update README.md & Add /branding-example Add Customization to README.md Add branding-example folder * Add branding.go Custom branding for titles, etc. Add branding.yaml to /branding-example Update templates * Add additional branding.yaml locations Copied from config.go for config.yaml * Update README.md Add branding.yaml information * Update docker-compose.yml Add branding to volumes * Add custom description to branding.yaml * Add comments to functions * Remove copying of branding * Rename branding-example to branding * Update static router Make static files more "dynamic" Use embedded FS for favicon.ico Include branding * go mod tidy * Update README.md * Add missing bg-white
- Loading branch information
1 parent
ac3363f
commit 3199521
Showing
27 changed files
with
256 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
title: MUT-Live | ||
description: MUT-Live, non-existing live streaming, and VoD service |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "MUT-Live", | ||
"short_name": "MUT-Live", | ||
"icons": [ | ||
{ | ||
"src": "/static/assets/img/icons-192.png", | ||
"type": "image/png", | ||
"sizes": "192x192" | ||
}, | ||
{ | ||
"src": "/static/assets/img/icons-512.png", | ||
"type": "image/png", | ||
"sizes": "512x512" | ||
} | ||
], | ||
"start_url": "/?source=pwa", | ||
"background_color": "#161c22", | ||
"display_override": ["window-control-overlay", "minimal-ui"], | ||
"display": "standalone", | ||
"scope": "/", | ||
"theme_color": "#161c22", | ||
"description": "MUT-Live, non-existing live streaming, and VoD service", | ||
"screenshots": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package tools | ||
|
||
import ( | ||
"fmt" | ||
log "github.com/sirupsen/logrus" | ||
"github.com/spf13/viper" | ||
) | ||
|
||
var BrandingCfg Branding | ||
|
||
type Branding struct { | ||
Title string `yaml:"title"` | ||
Description string `yaml:"description"` | ||
} | ||
|
||
// getDefaultBranding returns the struct branding with default values | ||
func getDefaultBranding() Branding { | ||
return Branding{ | ||
Title: "TUM-Live", | ||
Description: "TUM-Live, the livestreaming and VoD service of the " + | ||
"Rechnerbetriebsgruppe at the department of informatics and " + | ||
"mathematics at the Technical University of Munich", | ||
} | ||
} | ||
|
||
// init initializes the global branding configuration variable `BrandingCfg`. If the config file doesn't exist | ||
// it will be set to the result of `getDefaultBranding()`. | ||
func init() { | ||
v := viper.New() | ||
v.SetConfigName("branding") | ||
v.SetConfigType("yaml") | ||
v.AddConfigPath("/etc/TUM-Live/") | ||
v.AddConfigPath("$HOME/.TUM-Live") | ||
v.AddConfigPath(".") | ||
|
||
branding := getDefaultBranding() | ||
|
||
err := v.ReadInConfig() | ||
if err == nil { | ||
err = v.Unmarshal(&branding) | ||
log.Info("Using branding.yaml.") | ||
if err != nil { | ||
panic(fmt.Errorf("fatal error branding file: %v", err)) | ||
} | ||
} | ||
|
||
BrandingCfg = branding | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.