fixed permissions and style
This commit is contained in:
parent
3fb1cfc17d
commit
575a41127f
12 changed files with 107 additions and 53 deletions
|
|
@ -18,23 +18,40 @@ const (
|
|||
<h2>{{.BodyTitle}}</h2>
|
||||
</div>
|
||||
</div>
|
||||
{{if .Data}}
|
||||
<div class="row mt-5">
|
||||
<ul type="circle">
|
||||
{{range $item := .Data}}
|
||||
<li><a href="/{{$item.StoreTitle}}"><b>{{$item.Title}}</b></a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
{{$idx0 := index .Data 0}}
|
||||
{{$owner := $idx0.Owner}}
|
||||
<strong>{{$owner}}</strong>
|
||||
</div>
|
||||
<div class="row">
|
||||
<ul type="circle">
|
||||
{{range $item := .Data}}
|
||||
{{if ne $owner $item.Owner}}
|
||||
{{$owner := $item.Owner}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="row">
|
||||
<strong>{{$owner}}</strong>
|
||||
</div>
|
||||
<div class="row">
|
||||
<ul type="circle">
|
||||
{{end}}
|
||||
<li><a href="/{{$item.StoreTitle}}"><b>{{$item.Title}}</b></a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}`
|
||||
index = `<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>GoWiki | {{.Title}}</title>
|
||||
<link rel="stylesheet" type="text/css" href="/bootstrap.css" media="screen" integrity="sha256-NeLmQ7cX66J4MdtgGlG3O/TgvsSyP1b9WbaQtxYZUbQ="></link>
|
||||
<link rel="stylesheet" type="text/css" href="/custom.css" media="screen" integrity="sha256-18JBUnR8x0NOdgbyBI/2x1NPN5IZvpdHdKTeGR2PLuA="></link>
|
||||
<link rel="stylesheet" type="text/css" href="/custom.css" media="screen" integrity="sha256-4M0Ran7skk1gZoHDDh/mtuzwXN51uagML7tkWnhE0JI="></link>
|
||||
</head>
|
||||
<body style="padding-top:60px">
|
||||
<div class="navbar navbar-expand-lg fixed-top navbar-dark bg-primary">
|
||||
<div class="navbar navbar-expand fixed-top navbar-dark bg-primary">
|
||||
<div class="container">
|
||||
<a href="/" class="navbar-brand">GoWiki</a>
|
||||
<div class="collapse navbar-collapse">
|
||||
|
|
@ -55,14 +72,14 @@ const (
|
|||
<div class="push"></div>
|
||||
<footer>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="col">
|
||||
<ul class="list-unstyled">
|
||||
<li class="float-lg-right"><a href="#back-to-top">Back to top</a></li>
|
||||
<li class="float-md-right"><a href="#back-to-top">Back to top</a></li>
|
||||
{{if .Login}}
|
||||
<li><a href="/blacklist">Blacklist</a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
<p>© 2018 GoWiki {{.Version}} Request: <strong>{{.Time}}ms</strong></p>
|
||||
<p>© GoWiki {{.Version}} Request: <strong>{{.Time}}ms</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
@ -104,9 +121,9 @@ const (
|
|||
<li class="nav-item"><a class="nav-link" href="/new">New Page</a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
<form class="form-inline my2 my-lg-0" method="post" action="/search">
|
||||
<form class="form-inline" method="post" action="/search">
|
||||
<input type="hidden" name="token" value="{{.Token}}">
|
||||
<input type="text" class="form-control mr-sm-2" placeholder="Search" name="search" value="{{.Search}}" autocomplete="off">
|
||||
<input type="text" class="form-control mr-sm-2 menu" placeholder="Search" name="search" value="{{.Search}}" autocomplete="off">
|
||||
<button class="btn btn-sm btn-info" type="submit">Search</button>
|
||||
</form>
|
||||
<ul class="nav navbar-nav ml-auto">
|
||||
|
|
@ -222,7 +239,7 @@ const (
|
|||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-lg-12">
|
||||
<div class="col">
|
||||
<strong>Created by:</strong> {{.Data.Created}}<br>
|
||||
{{if .Data.Updated}}
|
||||
<strong>Updated by:</strong> {{.Data.Updated}}
|
||||
|
|
@ -231,11 +248,11 @@ const (
|
|||
</div>
|
||||
</div>
|
||||
<div class="row mt-5">
|
||||
<div class="col-lg-6">
|
||||
<div class="col">
|
||||
{{.Data.PageIndex}}
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="btn-group float-lg-right">
|
||||
<div class="col">
|
||||
<div class="btn-group float-md-right">
|
||||
<a href="/{{.Data.StoreTitle}}/md" class="btn btn-sm btn-primary">Markdown</a>
|
||||
{{if .Login}}
|
||||
<a href="/{{.Data.StoreTitle}}/edit" class="btn btn-sm btn-primary">Edit</a>
|
||||
|
|
@ -309,13 +326,17 @@ const (
|
|||
</div>
|
||||
<div class="card-body">
|
||||
{{if .Key}}
|
||||
<div class="form-group">
|
||||
<label class="col-form-label" for="key">Key</label>
|
||||
<input class="form-control input-sm" type="text" id="key" value="{{.Key}}" disabled>
|
||||
</div>
|
||||
<a href="/view/{{.Key}}">Share Link</a>
|
||||
{{else}}
|
||||
<form class="form-horizontal" action="/{{.Data}}/share" method="post">
|
||||
<input type="hidden" name="token" value="{{.Token}}">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label" for="duration">Lifetime</label>
|
||||
<input class="form-control input-sm" type="text" id="duration" name="duration" autofocus required>
|
||||
<input class="form-control input-sm" type="text" id="duration" name="duration" placeholder="1d (day) 10m (minutes)" autofocus required>
|
||||
</div>
|
||||
<button class="btn btn-sm btn-primary" type="submit">Share</button>
|
||||
</form>
|
||||
|
|
@ -333,7 +354,7 @@ const (
|
|||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-lg-12">
|
||||
<div class="col">
|
||||
<strong>Created by:</strong> {{.Data.Created}}<br>
|
||||
{{if .Data.Updated}}
|
||||
<strong>Updated by:</strong> {{.Data.Updated}}
|
||||
|
|
@ -342,11 +363,11 @@ const (
|
|||
</div>
|
||||
</div>
|
||||
<div class="row mt-5">
|
||||
<div class="col-lg-6">
|
||||
<div class="col">
|
||||
{{.Data.PageIndex}}
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="btn-group float-lg-right">
|
||||
<div class="col">
|
||||
<div class="btn-group float-md-right">
|
||||
<a href="/view/{{.Key}}/md" class="btn btn-sm btn-primary">Markdown</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -375,7 +396,7 @@ const (
|
|||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-lg-12">
|
||||
<div class="col">
|
||||
{{range $item := .Data}}
|
||||
<a href="/{{$item.StoreTitle}}"><b>{{$item.Title}}</b></a>
|
||||
<pre style="white-space:pre-wrap">{{$item.Text}}</pre><br>
|
||||
|
|
@ -470,13 +491,13 @@ const (
|
|||
</div>
|
||||
{{if .Admin}}
|
||||
<div class="row mb-3">
|
||||
<div class="col-lg-5">
|
||||
<div class="col-xs-5">
|
||||
<a class="btn btn-sm btn-primary" href="/user/new"><b>New User</b></a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="col">
|
||||
{{if .Data}}
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
|
|
@ -654,6 +675,10 @@ textarea,input,select {
|
|||
color: #e2e2e2 !important;
|
||||
background-color: #444444 !important;
|
||||
}
|
||||
input.menu {
|
||||
color: #e2e2e2 !important;
|
||||
background-color: #222222 !important;
|
||||
}
|
||||
.menu-search-bar {
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue