Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernise, sticky item list header #142

Merged
merged 8 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,9 @@ clean:
rm -Rf dist
rm -Rf .test_dummy
rm -f rssole

deploycolin:
-ssh colin.local "killall rssole"
GOOS=linux make build
scp rssole colin.local:.
ssh colin.local "nohup ./rssole 2>rssole.out 1>rssole.out &"
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![badge](./badge.svg) ![workflow status](https://github.com/TheMightyGit/rssole/actions/workflows/build.yml/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/TheMightyGit/rssole)](https://goreportcard.com/report/github.com/TheMightyGit/rssole)

# rssole (aka rissole)
# rssole

An RSS Reader inspired by the late Google Reader. Runs on your local machine or local network serving your RSS feeds via a clean responsive web interface.

Expand All @@ -16,8 +16,6 @@ I really miss Google Reader. Recently I noticed I'd gone back to an old habbit o

So I made this non-SaaS ode to Google Reader so I can triage my incoming information in one place with one interface in a way I like. At heart this is a very self serving project solely based around my needs, and because of that it's something I use constantly. Hopefully it's of use to some other people, or you can build upon it (MIT license, do what you want to it - make it comfortable for you).

The name is supposed to be a pun on 'rissole'. As well as 'rissole' containing the letters R S and S, a rissole is a "*a compressed mixture of meat and spices, coated in breadcrumbs and fried*" and that struck me as similar to the role of an RSS reader (compressing the mixed meat of the internet into a handy faceful).

## Pre-Built Binaries and Packages

Check out the [Releases](https://github.com/TheMightyGit/rssole/releases/) section in github, there should be a good selection of pre-built binaries
Expand Down
2 changes: 1 addition & 1 deletion cmd/rssole/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func getFeedsFileConfigSection(filename string) (rssole.ConfigSection, error) {
func handleFlags(configFilename, configReadCacheFilename *string) {
originalUsage := flag.Usage
flag.Usage = func() {
fmt.Println("RiSSOLE version", rssole.Version)
fmt.Println("RSSOLE version", rssole.Version)
fmt.Println()
originalUsage()
}
Expand Down
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ require (
github.com/NYTimes/gziphandler v1.1.1
github.com/andybalholm/cascadia v1.3.2
github.com/k3a/html2text v1.2.1
github.com/mmcdole/gofeed v1.2.1
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a
golang.org/x/net v0.21.0
github.com/mmcdole/gofeed v1.3.0
golang.org/x/exp v0.0.0-20240823005443-9b4947da3948
golang.org/x/net v0.28.0
)

require (
github.com/PuerkitoBio/goquery v1.8.1 // indirect
github.com/PuerkitoBio/goquery v1.9.2 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mmcdole/goxpp v1.1.0 // indirect
github.com/mmcdole/goxpp v1.1.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/text v0.17.0 // indirect
)
12 changes: 12 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cq
github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM=
github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ=
github.com/PuerkitoBio/goquery v1.9.2 h1:4/wZksC3KgkQw7SQgkKotmKljk0M6V8TUvA8Wb4yPeE=
github.com/PuerkitoBio/goquery v1.9.2/go.mod h1:GHPCaP0ODyyxqcNoFGYlAprUFH81NuRPd0GX3Zu2Mvk=
github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA=
github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss=
github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU=
Expand All @@ -19,8 +21,12 @@ github.com/k3a/html2text v1.2.1 h1:nvnKgBvBR/myqrwfLuiqecUtaK1lB9hGziIJKatNFVY=
github.com/k3a/html2text v1.2.1/go.mod h1:ieEXykM67iT8lTvEWBh6fhpH4B23kB9OMKPdIBmgUqA=
github.com/mmcdole/gofeed v1.2.1 h1:tPbFN+mfOLcM1kDF1x2c/N68ChbdBatkppdzf/vDe1s=
github.com/mmcdole/gofeed v1.2.1/go.mod h1:2wVInNpgmC85q16QTTuwbuKxtKkHLCDDtf0dCmnrNr4=
github.com/mmcdole/gofeed v1.3.0 h1:5yn+HeqlcvjMeAI4gu6T+crm7d0anY85+M+v6fIFNG4=
github.com/mmcdole/gofeed v1.3.0/go.mod h1:9TGv2LcJhdXePDzxiuMnukhV2/zb6VtnZt1mS+SjkLE=
github.com/mmcdole/goxpp v1.1.0 h1:WwslZNF7KNAXTFuzRtn/OKZxFLJAAyOA9w82mDz2ZGI=
github.com/mmcdole/goxpp v1.1.0/go.mod h1:v+25+lT2ViuQ7mVxcncQ8ch1URund48oH+jhjiwEgS8=
github.com/mmcdole/goxpp v1.1.1 h1:RGIX+D6iQRIunGHrKqnA2+700XMCnNv0bAOOv5MUhx8=
github.com/mmcdole/goxpp v1.1.1/go.mod h1:v+25+lT2ViuQ7mVxcncQ8ch1URund48oH+jhjiwEgS8=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
Expand All @@ -41,6 +47,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE=
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 h1:kx6Ds3MlpiUHKj7syVnbp57++8WpuKPcR5yjLBjvLEA=
golang.org/x/exp v0.0.0-20240823005443-9b4947da3948/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
Expand All @@ -53,6 +61,8 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -76,6 +86,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
Expand Down
2 changes: 1 addition & 1 deletion internal/rssole/libs/htmx.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internal/rssole/rssole.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func loadTemplates() error {
}

func Start(configFilename, configReadCacheFilename, listenAddress string, updateTime time.Duration) error {
slog.Info("RiSSOLE", "version", Version)
slog.Info("RSSOLE", "version", Version)

err := loadTemplates()
if err != nil {
Expand Down
11 changes: 2 additions & 9 deletions internal/rssole/templates/base.go.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!doctype html>
<html lang="en">
<head>
<title>RiSSOLE</title>
<title>RSSOLE</title>
<script src="/libs/htmx.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
Expand Down Expand Up @@ -44,7 +44,7 @@
</button>
</div>
<div class="p-0 flex-grow-1 text-end text-truncate">
<a href="https://github.com/TheMightyGit/rssole" target="_new" class="btn text-secondary fs-6">RiSSOLE {{.Version}}</a>
<a href="https://github.com/TheMightyGit/rssole" target="_new" class="btn text-secondary fs-6">RSSOLE {{.Version}}</a>
</div>
</div>

Expand All @@ -64,12 +64,5 @@
</div>

<script src="/libs/bootstrap.bundle.min.js"></script>
<script>
htmx.on("htmx:afterSwap", function(evt) {
if(evt.target.id == "items") {
evt.detail.elt.scrollIntoView();
}
});
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion internal/rssole/templates/feedlist.go.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class="p-1 {{if eq $.Selected .Title}}active{{end}} list-group-item list-group-item-action d-flex flex-row"
hx-get="/items?url={{.URL | urlquery}}"
hx-target="#items"
hx-swap="innerHTML">
hx-swap="innerHTML show:top">
{{template "components/feedline" .}}
</a>
{{end}}
Expand Down
18 changes: 9 additions & 9 deletions internal/rssole/templates/items.go.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="container m-0 p-0">
<div class="row">
<div class="container m-0 p-0 sticky-top bg-body">
<div class="row m-0 p-0">
<div class="col col-sm-8">
{{if .Link}}
<a target="_new" class="lead link-primary link-underline-opacity-0" href="{{.Link}}">{{.Title}}</a>
Expand Down Expand Up @@ -43,10 +43,10 @@

<div class="accordion accordion-flush" id="itemsAccordion">
{{range $idx, $item := .Items}}
<div class="accordion-item">
<div class="accordion-item">
<h2 class="accordion-header">
<div class="p-2 accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse{{$idx}}" aria-expanded="true" aria-controls="collapse{{$idx}}">
<div id="content{{.ID}}" class="w-100">
<div id="content{{$item.ID}}" class="w-100">
{{template "components/itemline" $item}}
</div>
</div>
Expand All @@ -55,22 +55,22 @@ <h2 class="accordion-header">
<div id="collapse{{$idx}}" class="accordion-collapse collapse">
<div class="accordion-body m-0 p-2">
<div class="w-100 d-flex justify-content-between">
{{if .Link}}
{{if $item.Link}}
<div class="me-3">
<a href="{{.Link}}" class="icon-link mr-1 text-nowrap" target="_new" alt="go to story"><i class="bi-box-arrow-up-right"></i>&nbsp;link</a>
<a href="{{$item.Link}}" class="icon-link mr-1 text-nowrap" target="_new" alt="go to story"><i class="bi-box-arrow-up-right"></i>&nbsp;link</a>
</div>
{{end}}
{{if .Categories}}
{{if $item.Categories}}
<div>
<small>
{{range .Categories}}
{{range $item.Categories}}
<span class="badge rounded-pill text-bg-secondary">{{.}}</span>
{{end}}
</small>
</div>
{{end}}
<div class="ms-3">
<small>{{.PublishedParsed}}</small>
<small>{{$item.PublishedParsed}}</small>
</div>
</div>
<hr class="w-100" />
Expand Down
Loading