Add version, link to github.

This commit is contained in:
Justin Hawkins 2022-05-26 06:46:32 +09:30
parent adbf2ef450
commit 0fc2a597cd
4 changed files with 9 additions and 3 deletions

View File

@ -8,7 +8,7 @@ import (
"golang.org/x/mod/semver" "golang.org/x/mod/semver"
) )
const Tag = "v0.0.7" const Tag = "v0.0.8"
var versionInfo struct { var versionInfo struct {
Local struct { Local struct {

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -31,7 +31,12 @@
</div> </div>
<div class="top-bar-right"> <div class="top-bar-right">
<ul class="menu"> <ul class="menu">
<li><a href="https://github.com">gh</a></li> <li>
<a href="https://github.com/tardisx/linkwallet">
{{ version }}
<img src="/assets/image/GitHub-Mark-32px.png" />
</a>
</li>
<!-- <li><input type="search" placeholder="Search"></li> <!-- <li><input type="search" placeholder="Search"></li>
<li><button type="button" class="button">Search</button></li> --> <li><button type="button" class="button">Search</button></li> -->
</ul> </ul>

View File

@ -14,6 +14,7 @@ import (
"github.com/tardisx/linkwallet/db" "github.com/tardisx/linkwallet/db"
"github.com/tardisx/linkwallet/entity" "github.com/tardisx/linkwallet/entity"
"github.com/tardisx/linkwallet/version"
"github.com/hako/durafmt" "github.com/hako/durafmt"
@ -50,7 +51,7 @@ func Create(bmm *db.BookmarkManager) *Server {
} }
// templ := template.Must(template.New("").Funcs(template.FuncMap{"dict": dictHelper}).ParseFS(templateFiles, "templates/*.html")) // templ := template.Must(template.New("").Funcs(template.FuncMap{"dict": dictHelper}).ParseFS(templateFiles, "templates/*.html"))
templ := template.Must(template.New("").Funcs(template.FuncMap{"nicetime": niceTime, "niceURL": niceURL, "join": strings.Join}).ParseFS(templateFiles, "templates/*.html")) templ := template.Must(template.New("").Funcs(template.FuncMap{"nicetime": niceTime, "niceURL": niceURL, "join": strings.Join, "version": version.Is}).ParseFS(templateFiles, "templates/*.html"))
r := gin.Default() r := gin.Default()