mirror of
https://github.com/rjNemo/go-wiki
synced 2026-06-06 02:36:40 +00:00
added a footer
This commit is contained in:
parent
58ff4e0d17
commit
6c0e2ef558
4 changed files with 16 additions and 14 deletions
1
TODO.md
1
TODO.md
|
|
@ -3,3 +3,4 @@
|
||||||
- [x] The mail field is case sensitive. Convert mail to lowercase before they are sent to InsertUser
|
- [x] The mail field is case sensitive. Convert mail to lowercase before they are sent to InsertUser
|
||||||
- [ ] All errors are fatal. Provide proper error handling.
|
- [ ] All errors are fatal. Provide proper error handling.
|
||||||
- [ ] Refactor UserStore code
|
- [ ] Refactor UserStore code
|
||||||
|
- [ ] Request-scoped [context](https://www.alexedwards.net/blog/organising-database-access)
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,6 @@ import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
_ "github.com/lib/pq" // postgresql database package
|
_ "github.com/lib/pq" // postgresql database package
|
||||||
|
|
||||||
"github.com/rjNemo/go-wiki/models"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewDB read the connection parameters to establish a connection to the
|
// NewDB read the connection parameters to establish a connection to the
|
||||||
|
|
@ -43,8 +41,8 @@ func NewContext(db *sql.DB) Context {
|
||||||
type Store interface {
|
type Store interface {
|
||||||
CreateTable()
|
CreateTable()
|
||||||
Add(i interface{})
|
Add(i interface{})
|
||||||
Get(id int) (models.User, error)
|
Get(i interface{}) (interface{}, error)
|
||||||
GetAll(id int) ([]models.User, error)
|
GetAll() (interface{}, error)
|
||||||
Delete(id int)
|
Delete(id int)
|
||||||
// Find(ex string)
|
// Find(ex string)
|
||||||
Update(id int, i interface{})
|
Update(id int, i interface{})
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,19 @@
|
||||||
{{template "content" .}}
|
{{template "content" .}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<footer class="footer bg-light">
|
||||||
|
<div class="container ">
|
||||||
|
<span
|
||||||
|
class="text-muted text-center text-sm-left d-block d-sm-inline-block"
|
||||||
|
>
|
||||||
|
© 2020 🐹Go-Wiki. All rights reserved.
|
||||||
|
</span>
|
||||||
|
<span class="float-none float-sm-right d-block mt-1 mt-sm-0 text-center"
|
||||||
|
>Hand-crafted & made with 🍻
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
<script
|
<script
|
||||||
src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
|
src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
|
||||||
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
|
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
|
||||||
|
|
|
||||||
|
|
@ -15,16 +15,6 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div>
|
|
||||||
<ul>
|
|
||||||
{{ range $index, $entry := .Wikis }}
|
|
||||||
<li>
|
|
||||||
{{ $index }}: <a href="/view/{{ $entry.Title }}">{{ $entry.Title }}</a>
|
|
||||||
</li>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h2>Go-Wiki Index</h2>
|
<h2>Go-Wiki Index</h2>
|
||||||
<p>Some description</p>
|
<p>Some description</p>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue