view

package
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EditPageView

func EditPageView(data EditPage) template.HTML

EditPageView ...編集ページの表示(内部は新規作成と同じ)。

func ErrorPageView

func ErrorPageView(data ErrorPage) template.HTML

ErrorPageView ...エラーページ部分。

func NewView

func NewView(c *gin.Context, data PageData)

NewView ...表示する。

func SearchPageView

func SearchPageView(data SearchPage) template.HTML

SearchPageView ...検索ページの表示。

func WordPageView

func WordPageView(data WordPage) template.HTML

WordPageView ...単語のページの表示。

func WritePageView

func WritePageView(data WritePage) template.HTML

WritePageView ...新規作成ページの表示。

Types

type EditPage

type EditPage struct {
	EditText string
	EditName string
	IsNew    bool
}

EditPage ...編集ページに必要な情報。

type ErrorPage

type ErrorPage struct {
	ErrorCode    string
	ErrorMessage string
}

ErrorPage ...エラーページの表示に必要な情報です。

type MenuInfo struct {
	MenuTop     bool
	MenuSearch  bool
	MenuNewPage bool
	MenuEdit    bool
	Word        string
}

MenuInfo ...メニューバー用。現在の位置を示すため。

type PageData

type PageData struct {
	MenuInfo  MenuInfo
	HTML      template.HTML
	PageTitle string
}

PageData ...表示用。

type PageStatus

type PageStatus struct {
	Exist bool `json:"is_exist,bool"`
}

PageStatus ...ページの情報を返すときに使います。

type PathData

type PathData struct {
	PathName string
	Path     string
}

PathData ...検索パスの情報。

type SearchPage

type SearchPage struct {
	Path       string
	Keyword    string
	WordList   []PathData
	FolderList []PathData
}

SearchPage ...検索ページの表示に必要な情報。

type WordPage

type WordPage struct {
	CanEdit      bool
	Word         string
	Title        template.HTML
	MarkdownText string
	MarkdownHTML template.HTML
}

WordPage ...単語のページを表示するのに必要な情報です。

type WritePage

type WritePage struct {
	Word     string
	EditText string
	EditName string
	IsNew    bool
}

WritePage ...新規作成ページに必要な情報です。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL