2017-07-12 06:43:11 +00:00
|
|
|
package yatwiki
|
2017-07-09 01:26:26 +00:00
|
|
|
|
|
|
|
import (
|
2017-11-18 02:04:19 +00:00
|
|
|
"html/template"
|
2017-07-09 01:26:26 +00:00
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (this *WikiServer) routeFormatting(w http.ResponseWriter, r *http.Request) {
|
|
|
|
pto := DefaultPageTemplateOptions(this.opts)
|
|
|
|
pto.CurrentPageName = "Formatting help"
|
2017-11-18 02:04:19 +00:00
|
|
|
|
|
|
|
content := `
|
2017-07-09 01:26:26 +00:00
|
|
|
<h2>Formatting help</h2><br><br>
|
|
|
|
<ul>
|
|
|
|
<li>[h]header[/h]</li>
|
|
|
|
<li>[b]bold[/b]</li>
|
|
|
|
<li>[u]underline[/u]</li>
|
|
|
|
<li>[i]italic[/i]</li>
|
|
|
|
<li>[s]strikethrough[/s]</li>
|
|
|
|
<li>[spoiler]spoiler[/spoiler]</li>
|
|
|
|
<li>[list] item [*] item [/list]</li>
|
|
|
|
<li>[url=address]title[/url]</li>
|
|
|
|
<li>[article=page name]title[/article] or [rev=id]title[/rev]</li>
|
|
|
|
<li>[img]image-url[/img]</li>
|
|
|
|
<li>[imgur]asdf.jpg[/imgur]</li>
|
2017-11-18 02:04:19 +00:00
|
|
|
`
|
|
|
|
if len(this.opts.ContentedBBCodeTag) > 0 {
|
|
|
|
content += `
|
|
|
|
<li>[` + this.opts.ContentedBBCodeTag + `]abc[/` + this.opts.ContentedBBCodeTag + `]</li>
|
|
|
|
`
|
|
|
|
}
|
|
|
|
|
|
|
|
content += `
|
2017-07-09 01:26:26 +00:00
|
|
|
<li>[code]fixed width[/code]</li>
|
|
|
|
<li>[section=header]content[/section]</li>
|
2018-04-02 03:57:24 +00:00
|
|
|
<li>[youtube]id[/youtube]</li>
|
2017-07-09 01:26:26 +00:00
|
|
|
<li>[html]raw html[/html]</li>
|
|
|
|
</ul>`
|
2017-11-18 02:04:19 +00:00
|
|
|
|
|
|
|
pto.Content = template.HTML(content)
|
|
|
|
|
2017-07-09 01:26:26 +00:00
|
|
|
this.servePageResponse(w, r, pto)
|
|
|
|
}
|