diff --git a/cmd/root.go b/cmd/root.go index ca03481..832c225 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -45,11 +45,10 @@ func init() { // Cobra supports persistent flags, which, if defined here, // will be global for your application. - rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cert400.yaml)") + rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "Config file (default is $HOME/.config/cert400/cert400.toml)") // Cobra also supports local flags, which will only run // when this action is called directly. - rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") } // initConfig reads in config file and ENV variables if set. @@ -63,9 +62,9 @@ func initConfig() { cobra.CheckErr(err) // Search config in home directory with name ".cert400" (without extension). - viper.AddConfigPath(home) - viper.SetConfigType("yaml") - viper.SetConfigName(".cert400") + viper.AddConfigPath(home + "/.config/cert400") + viper.SetConfigName("cert400") + viper.SetConfigType("toml") } viper.AutomaticEnv() // read in environment variables that match diff --git a/cmd/templates/css/style.css b/cmd/templates/css/style.css new file mode 100644 index 0000000..c68725e --- /dev/null +++ b/cmd/templates/css/style.css @@ -0,0 +1,89 @@ +* { + font-family: arial; +} + +#but { + background-color: #eee; + border: 2px black solid; +} + +.centered { + text-align: center; +} + +img { + text-align: center; + border: 2px solid #ff6e00; + border-radius: 50%; + padding: 1%; +} + +button { + background-color: #eee; + border: 2px black solid; +} + +#but:hover { + background-color: #ff6e00; + border: 2px black solid; +} + +body { + background-color: #aaa; +} + +h1 { + text-align: center; + bottom: 0%; +} + +h3 { + text-align: center; +} + +form { + text-align: center; +} + +a { + color: #ff6e00; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +progress::-moz-progress-bar { + background-color: #ff6e00; +} + +progress::-webkit-progress-value { + background-color: #ff6e00; +} + +progress { + color: #ff6e00; +} + +footer { + top: 100%; +} + +#main { + background-color: #eee; + bottom: 100%; + height: 100%; + padding-left: 5%; + padding-right: 5%; + outline: solid 2px #ff6e00; +} + +.container { + display: flex; + /* outline: solid 1px black; */ + justify-content: center; + height: 100%; + max-width: 100%; + background-color: #aaa; +} diff --git a/cmd/templates/index.html b/cmd/templates/index.html index 71330c8..f7cac0d 100644 --- a/cmd/templates/index.html +++ b/cmd/templates/index.html @@ -1,13 +1,44 @@ - - - - - - - - -

Hello {{ .UserAgent }}

- + + + Hello + + + + + + + +

Hello {{ .UserAgent }}!

+
+
+

Raul's file uploader

+ +
+ +
+
+ + +
+ + + + + + + + + + + + +
+ +
+ +