web.components.wiki #
fn new_wiki_controller #
fn new_wiki_controller(config ControllerConfig) &WikiController
struct Context #
struct Context {
veb.Context
}
struct ControllerConfig #
struct ControllerConfig {
pub:
wiki Wiki
base_url string = 'wiki/cyberpandemic/'
}
struct Custom #
struct Custom {
pub mut:
content string
}
fn (Custom) html #
fn (custom Custom) html() string
struct Wiki #
struct Wiki {
pub:
name string
title string
directory string // directory of wiki
static_url string
summary_path string
content_path string
}
fn (Wiki) html #
fn (wiki Wiki) html(path string) string
struct WikiController #
struct WikiController {
wiki Wiki
pub:
base_url string = 'wiki/cyberpandemic/'
mut:
view View
}
fn (WikiController) index #
fn (mut app WikiController) index(mut ctx Context) veb.Result
finds index of wiki from summary and redirects to there
fn (WikiController) path #
fn (mut app WikiController) path(mut ctx Context, path_ string) veb.Result
struct WikiLayout #
struct WikiLayout {
pub mut:
summary string
sidebar IComponent
main IComponent
links string
}
fn (WikiLayout) html #
fn (layout WikiLayout) html() string