Prepare HTML files
This commit is contained in:
parent
ffad456a29
commit
b28ad86fb4
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -1,13 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
<title>Hello</title>
|
||||
<script src="https://unpkg.com/htmx.org@1.9.4/dist/htmx.min.js"></script>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="css/style.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Hello {{ .UserAgent }}</p>
|
||||
<body>
|
||||
<p>Hello {{ .UserAgent }}!</p>
|
||||
<div class="container">
|
||||
<div id="main">
|
||||
<h1>Raul's file uploader</h1>
|
||||
<!-- <h3>Find the source <a href="https://git.bulgariu.xyz/raul/uploader" target="_blank">here!</a></h3> -->
|
||||
<form id='form' hx-encoding='multipart/form-data' hx-post='/api/upload'>
|
||||
<input type="text" name="domain" value="">
|
||||
<br>
|
||||
<br>
|
||||
<button id="but">
|
||||
Upload
|
||||
</button>
|
||||
<!-- <progress id="progress" value="0" max="100">Upload progress:</progress> -->
|
||||
</form>
|
||||
<!-- <script> -->
|
||||
<!-- htmx.on('#form', 'htmx:xhr:progress', function (evt) { -->
|
||||
<!-- htmx.find('#progress').setAttribute('value', evt.detail.loaded / evt.detail.total * 100) -->
|
||||
<!-- }); -->
|
||||
<!-- </script> -->
|
||||
|
||||
<!-- <p class="centered"> -->
|
||||
<!-- </p> -->
|
||||
|
||||
<!-- <footer> -->
|
||||
<!-- Licensed under the GPL v3.0 -->
|
||||
<!-- </footer> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue