diff options
| author | lost+skunk <[email protected]> | 2024-07-05 11:08:32 +0300 |
|---|---|---|
| committer | lost+skunk <[email protected]> | 2024-07-05 11:08:32 +0300 |
| commit | 8b839f94063704782872cc11251975cfeae4584c (patch) | |
| tree | 327044de56afbeaf6356132e2594f5ca4100edf5 /app/wraper.go | |
| parent | 68248094e89b6af134147668a9add429b9a6fa77 (diff) | |
| download | skunky-art-8b839f94063704782872cc11251975cfeae4584c.tar.gz skunky-art-8b839f94063704782872cc11251975cfeae4584c.tar.bz2 skunky-art-8b839f94063704782872cc11251975cfeae4584c.zip | |
временная реализация RSS
Diffstat (limited to 'app/wraper.go')
| -rw-r--r-- | app/wraper.go | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/app/wraper.go b/app/wraper.go index f3f025d..757602c 100644 --- a/app/wraper.go +++ b/app/wraper.go @@ -20,6 +20,7 @@ type skunkyart struct { Type rune Query string Page int + atom bool Templates struct { GroupUser struct { GR devianter.GRuser @@ -64,6 +65,7 @@ func (s skunkyart) GRUser() { switch s.Type { case 'a': g := group.GR + s.atom = false for _, x := range g.Gruser.Page.Modules { switch x.Name { case "about", "group_about": @@ -173,7 +175,9 @@ func (s skunkyart) GRUser() { s.ReturnHTTPError(400) } - s.ExecuteTemplate("html/gruser.htm", &s) + if !s.atom { + s.ExecuteTemplate("html/gruser.htm", &s) + } } // посты @@ -217,13 +221,17 @@ func (s skunkyart) Deviation(author, postname string) { func (s skunkyart) DD() { dd := devianter.DailyDeviationsFunc(s.Page) - s.ExecuteTemplate("html/list.htm", s.DeviationList(dd.Deviations, dlist{ + ddparsed := s.DeviationList(dd.Deviations, dlist{ Pages: 0, More: dd.HasMore, - })) + }) + if !s.atom { + s.ExecuteTemplate("html/list.htm", &ddparsed) + } } func (s skunkyart) Search() { + s.atom = false var e error ss := &s.Templates.Search switch s.Type { |
