package board
import (
"github.com/GeertJohan/go.rice/embedded"
"time"
)
func init() {
// define files
file2 := &embedded.EmbeddedFile{
Filename: `board.html`,
FileModTime: time.Unix(1489412682, 0),
Content: string("\n\n
\n \n {{ $board := .Board }}\n {{ $csrf := .CSRFToken }}\n {{ $session := .Session }}\n {{range .Threads}}\n {{ template \"thread/postlists\" dict \"Thread\" . \"Board\" $board \"CSRFToken\" $csrf \"Session\" $session }}\n {{end}}\n
\n\n"),
}
file3 := &embedded.EmbeddedFile{
Filename: `dir.html`,
FileModTime: time.Unix(1489315156, 0),
Content: string("\n\n\n \n {{ $boardlink := .Board.ShortName }}\n {{ $threadrid := .Thread.GetReply.ID }}\n {{ $threadid := .Thread.ID }}\n {{ $csrf := .CSRFToken }}\n {{ $session := .Session }}\n {{ with .Thread }}\n {{ with .GetReply }}\n {{ with dict \"Reply\" . \"Boardlink\" $boardlink \"CSRF\" $csrf \"ThreadID\" $threadid \"Session\" $session }}\n {{ template \"thread/reply\" . }}\n {{ end }}\n {{ end }}\n {{range .GetReplies}}\n {{ if ne .ID $threadrid }}\n
>> | \n \n {{ with dict \"Reply\" . \"Boardlink\" $boardlink \"CSRF\" $csrf \"ThreadID\" $threadid \"Session\" $session }}\n {{ template \"thread/reply\" . }}\n {{ end }}\n | \n
\n {{end}}\n {{end}}\n {{end}}\n
\n
\n{{ end }}\n\n{{ template \"thread/main\" . }}"),
}
// define dirs
dir1 := &embedded.EmbeddedDir{
Filename: ``,
DirModTime: time.Unix(1489566591, 0),
ChildFiles: []*embedded.EmbeddedFile{
file2, // board.html
file3, // dir.html
file4, // thread.html
file5, // thread.tmpl.html
},
}
// link ChildDirs
dir1.ChildDirs = []*embedded.EmbeddedDir{}
// register embeddedBox
embedded.RegisterEmbeddedBox(`board_res/`, &embedded.EmbeddedBox{
Name: `board_res/`,
Time: time.Unix(1489566591, 0),
Dirs: map[string]*embedded.EmbeddedDir{
"": dir1,
},
Files: map[string]*embedded.EmbeddedFile{
"board.html": file2,
"dir.html": file3,
"thread.html": file4,
"thread.tmpl.html": file5,
},
})
}