Documentation
¶
Overview ¶
Package shell renders the HTML page that a rendered article is placed into.
Index ¶
- Constants
- func SystemNotFound(bundle *i18n.Bundle, assets *static.Assets) http.Handler
- type Accept
- type ActivityCell
- type ActivityMonth
- type Breadcrumb
- type Data
- type Device
- type Login
- type Mute
- type NotFound
- type Notice
- type NotifyChoice
- type PlatformChoice
- type PluginSection
- type Profile
- type ProfileActivity
- type ProfileEdit
- type ProfileFeed
- type ProfileField
- type ProfileFlag
- type ProfileFolder
- type ProfileItem
- type ProfileLinkRow
- type ProfilePage
- type ProfileRoles
- type ProfileSocial
- type ProfileStats
- type ProfileTab
- type Reactive
- type Renderer
- func (r *Renderer) Accept(d Accept) (string, error)
- func (r *Renderer) Forbidden(pageID string) (string, error)
- func (r *Renderer) Login(d Login) (string, error)
- func (r *Renderer) Missing(w http.ResponseWriter, req *http.Request, message string)
- func (r *Renderer) NotFound(d NotFound) (string, error)
- func (r *Renderer) Notice(d Notice) (string, error)
- func (r *Renderer) Page(w io.Writer, d Data) error
- func (r *Renderer) Print(w io.Writer, d Data) error
- func (r *Renderer) Profile(d Profile) (string, error)
- func (r *Renderer) ProfileEdit(d ProfileEdit) (string, error)
- func (r *Renderer) Reactive(w io.Writer, d Reactive) error
- func (r *Renderer) Reset(d Reset) (string, error)
- func (r *Renderer) Signup(d Signup) (string, error)
- func (r *Renderer) SystemPage(w io.Writer, d System) error
- type Reset
- type ScoreTrend
- type Signup
- type SiteChoice
- type System
- type Tag
- type TagCategory
- type Unread
- type YearChoice
Constants ¶
const ( SettingsTabBasic = "" SettingsTabEmail = "email" SettingsTabPassword = "password" SettingsTabDevices = "devices" SettingsTabNotify = "notify" )
const ( ProfileTabAbout = "" ProfileTabEdits = "edits" ProfileTabPosts = "posts" ProfileTabPages = "pages" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActivityMonth ¶
type Breadcrumb ¶
type Data ¶
type Data struct {
SiteName string
SiteHeadline string
SiteTitle string
SiteIcon string
License string
OGTitle string
OGDescription string
OGImage string
OGURL string
NoIndex bool
GoogleTagID string
ThemeURL string
NoBaseStyle bool
ComputedStyles []string
Title string
Content string
Breadcrumbs []Breadcrumb
TagCategories []TagCategory
RevNumber int
UpdatedAt time.Time
TimeZone *time.Location
LoginStatusConfig string
OptionsConfig string
}
Data is one page's worth of shell. NavTop, NavSide and Content arrive as rendered HTML and are written through untouched.
type NotifyChoice ¶
type PlatformChoice ¶
type PluginSection ¶
type Profile ¶
type Profile struct {
ID int64
ProfileURL string
DisplayName string
Avatar string
Subtitle string
AuthIcon string
SiteTitle string
IsSelf bool
Unread Unread
CanDirectMessage bool
IsBlocked bool
ActionsConfig string
FromWikidot bool
IsBot bool
FullName string
Bio string
BioHTML string
JoinedAt time.Time
TimeZone *time.Location
Fields []ProfileField
Socials []ProfileSocial
Activity *ProfileActivity
Stats *ProfileStats
Trend *ScoreTrend
Sites []SiteChoice
Years []YearChoice
Pins []ProfilePage
PinChoices []ProfilePage
PinPicker bool
Folders []ProfileFolder
FolderAsked bool
OpenFolder *ProfileFolder
FolderPagination string
Pages []ProfilePage
PinLimit int
CSRF string
Tab string
Tabs []ProfileTab
Roles []ProfileRoles
Edits ProfileFeed
Posts ProfileFeed
PagesFrom, PagesTo string
PagesPagination string
PluginSections []PluginSection
PluginBadges []PluginSection
}
type ProfileActivity ¶
type ProfileActivity struct {
Weeks [][]ActivityCell
Months []ActivityMonth
Total int
Summary string
From string
To string
}
type ProfileEdit ¶
type ProfileEdit struct {
AuthIcon string
SiteTitle string
DisplayName string
Avatar string
ProfileURL string
FullName string
Bio string
Unread Unread
Notify []NotifyChoice
Mutes []Mute
Fields []ProfileField
Links []ProfileLinkRow
Platforms []PlatformChoice
ShowPins bool
ShowStats bool
ShowTrend bool
AdvancedEditor bool
Language string
Languages []i18n.Choice
Email string
EmailVerified bool
EmailPending string
EmailHeld string
EmailHeldUntil *time.Time
CanRename bool
Devices []Device
Tab string
Tabs []ProfileTab
Said string
CSRF string
Error string
Saved bool
}
type ProfileFeed ¶
type ProfileFeed struct {
Items []ProfileItem
Pagination string
Tab, From, To string
}
type ProfileField ¶
type ProfileFlag ¶
type ProfileFolder ¶
type ProfileFolder struct {
Key string
Name string
URL string
Count int
Pages []ProfilePage
}
type ProfileItem ¶
type ProfileLinkRow ¶
type ProfilePage ¶
type ProfileRoles ¶
type ProfileSocial ¶
type ProfileTab ¶
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
func (*Renderer) ProfileEdit ¶
func (r *Renderer) ProfileEdit(d ProfileEdit) (string, error)
type ScoreTrend ¶
type SiteChoice ¶
type System ¶
type System struct {
Title string
SiteTitle string
ThemeURL string
Before string
Heading string
BodyClass string
BackLink bool
Content string
Stylesheets []string
}
System is the page the wiki's own pages sit in, which is not the one an article sits in.