mirror of
https://github.com/arnaucube/padArchiver.git
synced 2026-02-06 19:26:48 +01:00
small update with some improvements, updated readme
This commit is contained in:
@@ -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("")
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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.
Reference in New Issue
Block a user