feat: new admin and web apps
This commit is contained in:
51
handlers/pages/images.templ
Normal file
51
handlers/pages/images.templ
Normal file
@@ -0,0 +1,51 @@
|
||||
package pages
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"keikos.work/templates/layouts"
|
||||
|
||||
// "forge.capytal.company/capytalcode/project-comicverse/lib/router/rerrors"
|
||||
"github.com/minio/minio-go/v7"
|
||||
)
|
||||
|
||||
type Images struct {
|
||||
S3 *minio.Client
|
||||
}
|
||||
|
||||
func (p *Images) List(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (p *Images) Get(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (p *Images) Create(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (p *Images) Update(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (p *Images) Delete(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
templ (p *Images) heading() {
|
||||
<script type="module" src="/assets/js/Images_form.js"></script>
|
||||
}
|
||||
|
||||
templ (p *Images) Component() {
|
||||
@layouts.Page(layouts.PageInfo{
|
||||
Heading: p.heading(),
|
||||
}) {
|
||||
<img id="file-preview" src="" class="bg-gray min-h-20rem min-w-20rem max-w-full"/>
|
||||
<form action="/Images" method="post" enctype="multipart/form-data">
|
||||
<label for="file">File to upload</label>
|
||||
<input type="file" id="file" name="file"/>
|
||||
<button type="submit">Upload</button>
|
||||
</form>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user