Documentation
¶
Index ¶
- Constants
- func AboutPage(rctx *Context) (err error)
- func EditsPage(rctx *Context, history []*masta.StatusHistory, current *masta.Status) error
- func EmojiPage(rctx *Context, ems []*masta.Emoji) (err error)
- func ErrorPage(rctx *Context, err error, retry bool) error
- func FiltersPage(rctx *Context, filters []*masta.Filter) (err error)
- func LikedByPage(rctx *Context, likers []*masta.Account) (err error)
- func ListPage(rctx *Context, data *ListData) error
- func ListsPage(rctx *Context, lists []*masta.List) error
- func MutePage(rctx *Context, acct *masta.Account) (err error)
- func NavPage(rctx *Context, user *masta.Account) (err error)
- func NotificationPage(rctx *Context, notifs []*masta.Notification) (err error)
- func QuickReplyPage(rctx *Context, replyee *masta.Status, parent *masta.Status) (err error)
- func ReactionsPage(rctx *Context, reactions []masta.EmojiReaction) (err error)
- func RetweetedByPage(rctx *Context, retweeters []*masta.Account) (err error)
- func RootPage(rctx *Context) (err error)
- func SearchPage(rctx *Context, results *masta.Results, q string, qType string, offset int) (err error)
- func SettingsPage(rctx *Context) (err error)
- func SigninPage(rctx *Context) error
- func ThreadPage(rctx *Context, status *masta.Status, context *masta.Context, mutate bool, ...) (err error)
- func TimelinePage(rctx *Context, data *TimelineData) error
- func UserPage[up userPageEntry](rctx *Context, user *masta.Account, rel *masta.Relationship, pdata up, ...) (err error)
- func UserSearchPage(rctx *Context, offset int, res *masta.Results, acct *masta.Account, ...) (err error)
- type Context
- type EditContext
- type EmojiData
- type ErrorData
- type FiltersData
- type HomePageData
- type LikedByData
- type ListData
- type ListsData
- type MuteData
- type NavData
- type NotificationData
- type Page
- type PostContext
- type QuickReplyData
- type ReactionsData
- type ReplyContext
- type RetweetedByData
- type RootData
- type SearchData
- type Settings
- type SettingsData
- type SigninData
- type StatusData
- type TemplateData
- type ThreadData
- type ThreadReplyData
- type TimelineData
- type UserData
- type UserSearchData
Constants ¶
View Source
const ( SigninPageTmpl = "signin.tmpl" ErrorPageTmpl = "error.tmpl" RootPageTmpl = "root.tmpl" TimelinePageTmpl = "timeline.tmpl" ListsPageTmpl = "lists.tmpl" ListPageTmpl = "list.tmpl" ThreadPageTmpl = "thread.tmpl" QuickReplyPageTmpl = "quickreply.tmpl" NotificationPageTmpl = "notification.tmpl" UserPageTmpl = "user.tmpl" UserSearchPageTmpl = "usersearch.tmpl" AboutPageTmpl = "about.tmpl" EmojiPageTmpl = "emoji.tmpl" LikedByPageTmpl = "likedby.tmpl" RetweetedByPageTmpl = "retweetedby.tmpl" ReactionsPageTmpl = "reactions.tmpl" SearchPageTmpl = "search.tmpl" SettingsPageTmpl = "settings.tmpl" FiltersPageTmpl = "filters.tmpl" MutePageTmpl = "mute.tmpl" StatusEditsTmpl = "statusedits.tmpl" )
View Source
const ( UserPageStatuses userPageType = "statuses" UserPagePinned userPageType = "pinned" UserPageMedia userPageType = "media" UserPageFollowers userPageType = "followers" UserPageFollowing userPageType = "following" UserPageBookmarks userPageType = "bookmarks" UserPageMutes userPageType = "mutes" UserPageBlocks userPageType = "blocks" UserPageLikes userPageType = "likes" UserPageRequests userPageType = "requests" )
Variables ¶
This section is empty.
Functions ¶
func NotificationPage ¶
func NotificationPage(rctx *Context, notifs []*masta.Notification) (err error)
func QuickReplyPage ¶
func ReactionsPage ¶
func ReactionsPage(rctx *Context, reactions []masta.EmojiReaction) (err error)
func SearchPage ¶
func SettingsPage ¶
func SigninPage ¶
func ThreadPage ¶
func TimelinePage ¶
func TimelinePage(rctx *Context, data *TimelineData) error
We don't abstract this stuff away that much because there's too many transport-level details and too little data reshuffling for the templating.
Types ¶
type Context ¶
type Context struct { Settings Settings CSRFToken string UserID string Referrer string W io.Writer Pagination *masta.Pagination Conf *conf.Configuration // contains filtered or unexported fields }
func (*Context) RefreshInterval ¶
type FiltersData ¶
type HomePageData ¶
type HomePageData struct {
*Context
}
type LikedByData ¶
type NotificationData ¶
type NotificationData struct { Notifications []*masta.Notification UnmarkedCount int ReadID string NextLink string }
type PostContext ¶
type PostContext struct { DefaultVisibility string DefaultFormat string ReplyContext *ReplyContext EditContext *EditContext Formats []conf.PostFormat }
type QuickReplyData ¶
type QuickReplyData struct { Ancestor *masta.Status Status *masta.Status PostContext PostContext }
type ReactionsData ¶
type ReactionsData struct {
Reactions []masta.EmojiReaction
}
type ReplyContext ¶
type ReplyContext struct { InReplyToID string InReplyToName string QuickReply bool ReplyContent string ReplySubjectHeader string ForceVisibility bool }
func (*ReplyContext) ReifiedSubjectHeader ¶
func (r *ReplyContext) ReifiedSubjectHeader() string
type RetweetedByData ¶
type SearchData ¶
type Settings ¶
type Settings struct { DefaultVisibility string `json:"dv,omitempty"` DefaultFormat string `json:"df,omitempty"` CopyScope bool `json:"cs,omitempty"` ThreadInNewTab bool `json:"tnt,omitempty"` HideAttachments bool `json:"ha,omitempty"` MaskNSFW bool `json:"mn,omitempty"` NotificationInterval int `json:"ni,omitempty"` FluorideMode bool `json:"fm,omitempty"` DarkMode bool `json:"dm,omitempty"` AntiDopamineMode bool `json:"adm,omitempty"` HideUnsupportedNotifs bool `json:"hun,omitempty"` CSS string `json:"css,omitempty"` Stamp string `json:"stamp,omitempty"` }
func NewSettings ¶
func NewSettings() *Settings
type SettingsData ¶
type SettingsData struct { Settings *Settings PostFormats []conf.PostFormat }
type SigninData ¶
type SigninData struct {
*Context
}
type StatusData ¶
type TemplateData ¶
type TemplateData struct { Data interface{} Ctx *Context }
type ThreadData ¶
type ThreadData struct { Statuses []*StatusData PostContext PostContext }
type ThreadReplyData ¶
type TimelineData ¶
Click to show internal directories.
Click to hide internal directories.