small update with some improvements, updated readme

This commit is contained in:
arnaucode
2018-04-15 21:21:55 +02:00
parent 9bd5a48bcc
commit 9ecec88e7d
27 changed files with 58 additions and 16 deletions

View File

@@ -13,15 +13,20 @@ import (
"github.com/gorilla/mux"
)
//ItemModel is the model for each one of the files and directories in the directory of the pads
type ItemModel struct {
Name string
Path string
IsDir bool
}
//MenuModel is the struct for all the menu, containing Items
type MenuModel struct {
PageTitle string
Items []ItemModel
}
//PageModel is the data model used in the html templates
type PageModel struct {
Title string
MenuContent template.HTML
@@ -100,7 +105,7 @@ func getPage(w http.ResponseWriter, r *http.Request) {
check(err)
var page PageModel
page.Title = path
page.Title = strings.Replace(path, padArchiver.Storage, "", -1)
page.Content = template.HTML(content)
page.MenuContent = generateMenuHTML("")

View File

@@ -1,6 +1,6 @@
<ul class="list-group">
{{range .Items}} {{if .IsDir}}
<br><br>
<br>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item active" aria-current="page">

View File

@@ -57,7 +57,7 @@
</form>
</nav>
<br><br>
<br>
<div class="container">
<div class="row">
<div class="col-sm-3">

File diff suppressed because one or more lines are too long

Binary file not shown.