affichage-index #160
4 changed files with 162 additions and 19 deletions
116
public/css/admin-upload.css
Normal file
116
public/css/admin-upload.css
Normal file
|
@ -0,0 +1,116 @@
|
|||
.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;
|
||||
}
|
||||
}
|
17
public/css/admin.css
Normal file
17
public/css/admin.css
Normal file
|
@ -0,0 +1,17 @@
|
|||
.adminOptions {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
justify-content: space-around;
|
||||
|
||||
}
|
||||
|
||||
.adminOption {
|
||||
font-family: 'Poppins';
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
background-color: #FF563C;
|
||||
padding: 10px;
|
||||
color: #fff;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
|
@ -5,24 +5,31 @@
|
|||
<meta charset="utf-8">
|
||||
<title>AGECEM</title>
|
||||
{{ template "general-html" }}
|
||||
<link rel="stylesheet" href="/public/css/admin-upload.css">
|
||||
</head>
|
||||
<body>
|
||||
{{ template "header-html" }}
|
||||
<h1 class="heading1">Upload</h1>
|
||||
<form class="form adminUploadForm" action="/admin/documents/upload" method="post" enctype="multipart/form-data">
|
||||
<label class="formLabel" for="bucket">Type de document:</label>
|
||||
<select class="formSelect" name="bucket" id="bucket">
|
||||
{{ range .Data.Buckets }}
|
||||
<option class="formOption" value="{{ .Name }}">{{ .DisplayName }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
<br>
|
||||
Document: <input class="formDocUpload" type="file" name="document">
|
||||
<br>
|
||||
<br>
|
||||
<input class="formSubmit" type="submit" value="Submit">
|
||||
</form>
|
||||
<p>{{ .Message }}</p>
|
||||
<div class="wrapper adminUploadWrapper">
|
||||
<h1 class="heading1">Ajouter un document</h1>
|
||||
<form class="form adminUploadForm" action="/admin/documents/upload" method="post" enctype="multipart/form-data">
|
||||
<div class="formContent">
|
||||
<div class="formDocUploadDiv">
|
||||
<p class="formLabel">Document à téléverser</p>
|
||||
<input class="formDocUpload" type="file" name="document">
|
||||
</div>
|
||||
<div class="formSelectDiv">
|
||||
<label class="formLabel" for="bucket">Type de document</label>
|
||||
<select class="formSelect" name="bucket" id="bucket">
|
||||
{{ range .Data.Buckets }}
|
||||
<option class="formOption" value="{{ .Name }}">{{ .DisplayName }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<input class="formSubmit" type="submit" value="Ajouter le document">
|
||||
</form>
|
||||
<p class="confirmationMessage">{{ .Message }}</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
||||
|
|
|
@ -5,13 +5,16 @@
|
|||
<meta charset="utf-8">
|
||||
<title>AGECEM</title>
|
||||
{{ template "general-html" }}
|
||||
<link rel="stylesheet" href="/public/css/admin.css">
|
||||
</head>
|
||||
<body>
|
||||
{{ template "header-html" }}
|
||||
<h1 class="heading1">Admin</h1>
|
||||
<ul>
|
||||
<li><a href="/admin/documents/upload">Ajout de document</a></li>
|
||||
</ul>
|
||||
<div class="wrapper adminWrapper">
|
||||
<h1 class="heading1">Admin</h1>
|
||||
<div class="adminOptions">
|
||||
<button class="adminOption" onclick="location.href = '/admin/documents/upload'">Ajouter un document</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue