Skip to content

Commit

Permalink
add umami analytics, tidy image classes up a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
krustowski committed Sep 10, 2024
1 parent 0164f49 commit c669b41
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
#

APP_NAME=littr
APP_VERSION=0.39.27
APP_VERSION=0.39.28
GOLANG_VERSION=1.23
2 changes: 1 addition & 1 deletion api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"name": "MIT",
"url": "https://github.com/krustowski/littr/blob/master/LICENSE"
},
"version": "0.39.27"
"version": "0.39.28"
},
"host": "www.littr.eu",
"basePath": "/api/v1",
Expand Down
2 changes: 1 addition & 1 deletion pkg/backend/router.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @title littr
// @version 0.39.27
// @version 0.39.28
// @description a simple nanoblogging platform as PWA built on go-app framework
// @termsOfService https://littr.eu/tos

Expand Down
8 changes: 4 additions & 4 deletions pkg/frontend/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -1491,8 +1491,8 @@ func (c *flowContent) Render() app.UI {
app.Div().Class("small-space"),
app.Div().Class("loader center large deep-orange active"),
),
//app.Img().Class("no-padding absolute center middle lazy").Src(pixDestination).Style("max-width", "100%").Style("max-height", "100%").Attr("loading", "lazy"),
app.Img().Class("no-padding absolute center middle lazy").Src(imgSrc).Style("max-width", "100%").Style("max-height", "100%").Attr("loading", "lazy").OnClick(c.onClickImage).ID(post.ID),
//app.Img().Class("no-padding center middle lazy").Src(pixDestination).Style("max-width", "100%").Style("max-height", "100%").Attr("loading", "lazy"),
app.Img().Class("no-padding center middle lazy").Src(imgSrc).Style("max-width", "100%").Style("max-height", "100%").Attr("loading", "lazy").OnClick(c.onClickImage).ID(post.ID),
),

// reply + post
Expand Down Expand Up @@ -1537,8 +1537,8 @@ func (c *flowContent) Render() app.UI {
app.Div().Class("small-space"),
app.Div().Class("loader center large deep-orange active"),
),
//app.Img().Class("no-padding absolute center middle lazy").Src(pixDestination).Style("max-width", "100%").Style("max-height", "100%").Attr("loading", "lazy"),
app.Img().Class("no-padding absolute center middle lazy").Src(imgSrc).Style("max-width", "100%").Style("max-height", "100%").Attr("loading", "lazy").OnClick(c.onClickImage).ID(post.ID),
//app.Img().Class("no-padding center middle lazy").Src(pixDestination).Style("max-width", "100%").Style("max-height", "100%").Attr("loading", "lazy"),
app.Img().Class("no-padding center middle lazy").Src(imgSrc).Style("max-width", "100%").Style("max-height", "100%").Attr("loading", "lazy").OnClick(c.onClickImage).ID(post.ID),
),
),
),
Expand Down
15 changes: 9 additions & 6 deletions web/littr.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,15 @@
})()

// add Umami analytics - https://umami.is
// ;(function () {
// var x = document.createElement('script')
// x.setAttribute('src', 'https://umami.gscloud.cz/script.js')
// x.setAttribute('data-website-id', '9c3bf149-ca5c-4e90-af79-1e228ec4cf4b')
// document.body.appendChild(x)
// })()
const host = window.location.hostname;
if (host != "localhost") {
window.onload = () => {
var x = document.createElement('script')
x.setAttribute('src', 'https://umami.vxn.dev/script.js')
x.setAttribute('data-website-id', '23275649-ae96-43b8-9362-93af740f6560')
document.body.appendChild(x)
}
};

// add Sortable tables - https://www.cssscript.com/fast-html-table-sorting/
//;(function () {
Expand Down

0 comments on commit c669b41

Please sign in to comment.