#4 #7 Upload Images in Gallery PAge
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Kekskurse 2022-01-15 13:07:08 +01:00
parent 6611640a35
commit 75a336675d
Signed by: kekskurse
GPG key ID: 728ACCB59341E7E4
5 changed files with 40 additions and 19 deletions

View file

@ -55,6 +55,7 @@ func uploadImageForm(t template.Template, data template.Data , s session.Session
return
}
data["id"] = id
data["active"] = "upload"

View file

@ -171,6 +171,8 @@ func galleryEdit(t template.Template,data template.Data, c flamego.Context) {
return
}
data["gallery"] = galleries[0]
data["id"] = galleries[0].Id
data["active"] = "general"
t.HTML(http.StatusOK, "gallery_edit")

View file

@ -1,11 +1,26 @@
{{template "top" .}}
<link href="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.css" rel="stylesheet">
<div class="container" style="margin-top: 100px;">
<div class="col-12">
<h1>Dashboard</h1>
<div id="drag-drop-area"></div>
{{template "top" .}}
<style type="text/css">
.line { width:100%; text-align:left; border-bottom: 1px solid #8f8f8f; line-height:0.1em; margin:10px 0 20px; color: #8f8f8f; }
.line span { background:#fff; padding:0 10px; margin-left: 50px; }
</style>
<link rel="stylesheet" href="/public/croppie.css" />
<script src="/public/croppie.js"></script>
<div class="container" style="margin-top: 100px;">
<div class="row">
<div class="col-md-3">
{{template "gallery_nav" .}}
</div>
<div class="col-md-9">
<div id="drag-drop-area"></div>
</div>
</div>
</div>
</div>
<script src="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.js"></script>
<script>

View file

@ -8,19 +8,7 @@
<div class="container" style="margin-top: 100px;">
<div class="row">
<div class="col-md-3">
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action active" aria-current="true">
General
</a>
<!--<a href="#" class="list-group-item list-group-item-action" aria-current="true">
Details
</a>!-->
<a href="#" class="list-group-item list-group-item-action" aria-current="true">
Images
</a>
<!--<a href="#" class="list-group-item list-group-item-action">Sicherheit</a>
<a class="list-group-item list-group-item-action disabled">A disabled link item</a>!-->
</div>
{{template "gallery_nav" .}}
</div>
<div class="col-md-9">

View file

@ -0,0 +1,15 @@
{{define "gallery_nav"}}
<div class="list-group">
<a href="/gallery/edit/{{ .id }}" class="list-group-item list-group-item-action {{if eq .active "general"}}active{{end}}" aria-current="true">
General
</a>
<!--<a href="#" class="list-group-item list-group-item-action" aria-current="true">
Details
</a>!-->
<a href="/file/upload?id={{ .id }}" class="list-group-item list-group-item-action {{if eq .active "upload"}}active{{end}} " aria-current="true">
Images Upload
</a>
<!--<a href="#" class="list-group-item list-group-item-action">Sicherheit</a>
<a class="list-group-item list-group-item-action disabled">A disabled link item</a>!-->
</div>
{{ end }}