Ajout styles et classes admin-upload

Ajout de divs pour mieux arranger le contenu
This commit is contained in:
Alexel 2023-10-12 13:58:01 -04:00
parent 339feb2e52
commit 48900fafaf
2 changed files with 142 additions and 15 deletions

120
public/css/admin-upload.css Normal file
View file

@ -0,0 +1,120 @@
.adminUploadForm {
font-family: 'Poppins';
display: flex;
flex-flow: column;
align-items: center;
}
.formContent {
display: flex;
flex-flow: column;
}
.formSelectDiv {
display: flex;
flex-flow: column;
margin: 20px;
}
.formLabel {
font-family: 'Poppins';
font-size: 0.875rem;
font-weight: 600;
margin: 0;
padding-top: 10px;
padding-bottom: 10px;
color: #394596;
}
.formSelect {
font-family: 'Poppins';
font-size: 0.875rem;
font-weight: 400;
border: 1px #C4C4C4 solid;
padding: 10px;
}
/*La flèche de l'élément*/
.formSelect:after {
color: #000
}
.formOption {
font-family: 'Poppins';
font-size: 0.875rem;
font-weight: 400;
margin-top: 5px;
margin-bottom: 5px;
}
.formOption:hover {
background-color: #C4C4C4;
}
.formDocUploadDiv {
display: flex;
flex-flow: column;
margin: 20px;
}
.formDocUpload {
font-family: 'Poppins';
font-size: 0.875rem;
font-weight: 500;
}
.formDocUpload::file-selector-button {
font-family: 'Poppins';
font-size: 0.875rem;
font-weight: 400;
background-color: #FF563C;
padding: 7px;
color: #fff;
border: none;
cursor: pointer;
margin-right: 15px;
}
.formSubmit {
font-family: 'Poppins';
font-size: 1rem;
font-weight: 500;
background-color: #FF563C;
padding: 10px;
color: #fff;
border: none;
cursor: pointer;
margin: 20px;
}
.confirmationMessage {
font-family: 'Poppins';
font-size: 0.75rem;
font-weight: 500;
text-align: center;
margin: 10px;
padding: 5px;
background-color: #C4C4C4;
}
@media screen and (min-width: 768px) {
.formContent {
display: flex;
flex-flow: row;
}
}
@media screen and (min-width: 1140px) {
.confirmationMessage {
font-size: 1rem;
font-weight: 500;
margin: 20px;
padding: 10px;
}
}

View file

@ -5,24 +5,31 @@
<meta charset="utf-8"> <meta charset="utf-8">
<title>AGECEM</title> <title>AGECEM</title>
{{ template "general-html" }} {{ template "general-html" }}
<link rel="stylesheet" href="/public/css/admin-upload.css">
</head> </head>
<body> <body>
{{ template "header-html" }} {{ template "header-html" }}
<h1 class="heading1">Upload</h1> <div class="wrapper adminUploadWrapper">
<form class="form adminUploadForm" action="/admin/documents/upload" method="post" enctype="multipart/form-data"> <h1 class="heading1">Ajouter un document</h1>
<label class="formLabel" for="bucket">Type de document:</label> <form class="form adminUploadForm" action="/admin/documents/upload" method="post" enctype="multipart/form-data">
<select class="formSelect" name="bucket" id="bucket"> <div class="formContent">
{{ range .Buckets }} <div class="formDocUploadDiv">
<option class="formOption" value="{{ .Name }}">{{ .DisplayName }}</option> <p class="formLabel">Document à téléverser</p>
{{ end }} <input class="formDocUpload" type="file" name="document">
</select> </div>
<br> <div class="formSelectDiv">
Document: <input class="formDocUpload" type="file" name="document"> <label class="formLabel" for="bucket">Type de document</label>
<br> <select class="formSelect" name="bucket" id="bucket">
<br> {{ range .Buckets }}
<input class="formSubmit" type="submit" value="Submit"> <option class="formOption" value="{{ .Name }}">{{ .DisplayName }}</option>
</form> {{ end }}
<p>{{ .Message }}</p> </select>
</div>
</div>
<input class="formSubmit" type="submit" value="Ajouter le document">
</form>
<p class="confirmationMessage"><strong>Confirmation:</strong> {{ .Message }}</p>
</div>
</body> </body>
</html> </html>
{{ end }} {{ end }}