Initial commit
This commit is contained in:
commit
f20c84a1c3
21 files changed
+13171
No files matched your search
+40
@@ -0,0 +1,40 @@
|
||||
# ---> VisualStudioCode
|
||||
.settings
|
||||
|
||||
|
||||
# ---> Go
|
||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
|
||||
# Folders
|
||||
_obj
|
||||
_test
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
[568vq].out
|
||||
|
||||
*.cgo1.go
|
||||
*.cgo2.c
|
||||
_cgo_defun.c
|
||||
_cgo_gotypes.go
|
||||
_cgo_export.*
|
||||
|
||||
_testmain.go
|
||||
|
||||
*.exe
|
||||
*.test
|
||||
*.prof
|
||||
|
||||
.vscode/*
|
||||
.history
|
||||
Fotos/*
|
||||
|
||||
debug
|
||||
|
||||
/backup/
|
||||
/data/
|
||||
/build/*.arm
|
||||
/build/*.bin
|
||||
@@ -0,0 +1,27 @@
|
||||
# GoWiki
|
||||
|
||||
Ein kleines, in Go gebasteltes Wiki.
|
||||
Jede Seite kann über den `Edit` Button oben rechts in der Ecke bearbeitet werden.
|
||||
Der Obere Teil der Sidebar kommt aus der Datei `sidebar.md` (kann auch über den Link: [/sidebar](/sidebar) aufgerufen werden).
|
||||
Der untere Teil der Sidebar wird dynmaisch zur Laufzeit generiert und spiegelt den Inhalt des `data`-Ordners wieder.
|
||||
|
||||
Eine Hilfe der Markdown-Syntax kann man unter [/hilfe](/hilfe) einsehen.
|
||||
Unter [/playground](/playground) gibt es eine Test-Seite zum Testen.
|
||||
|
||||
Standardmäßig wird das Wiki unter der `http://127.0.0.1` und dem Port `8000` gesartet und verwendet die `*.md` Files, welche sich im Unterverzeichnis `./data` befinden.
|
||||
Diese Einstellungen können durch eine `config.json` im Start-Verzeichnis geändert werden:
|
||||
|
||||
Eine `config.json` könnte z.B. wie folgt aussehen:
|
||||
```
|
||||
{
|
||||
"Host":"http://127.0.0.1",
|
||||
"Port":"8000",
|
||||
"DataPath":"./data"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Zum Kompilieren folgende Go-Abhängigkeiten installieren:
|
||||
- `go get github.com/gorilla/mux`
|
||||
|
||||
Die Buildscripte liegen im Unterordner `build`
|
||||
+447
@@ -0,0 +1,447 @@
|
||||
// Code generated by go-bindata. DO NOT EDIT.
|
||||
// sources:
|
||||
// web\index.html
|
||||
// web\misc\bootstrap.min.css
|
||||
// web\misc\bootstrap.min.js
|
||||
// web\misc\codemirror.css
|
||||
// web\misc\codemirror.js
|
||||
// web\misc\jquery.min.js
|
||||
// web\misc\markdown.js
|
||||
// web\misc\showdown.min.js
|
||||
// web\pages\hilfe.md
|
||||
// web\pages\playground.md
|
||||
// web\pages\sidebar.md
|
||||
// web\pages\start.md
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// bindataRead reads the given file from disk. It returns an error on failure.
|
||||
func bindataRead(path, name string) ([]byte, error) {
|
||||
buf, err := ioutil.ReadFile(path)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error reading asset %s at %s: %v", name, path, err)
|
||||
}
|
||||
return buf, err
|
||||
}
|
||||
|
||||
type asset struct {
|
||||
bytes []byte
|
||||
info os.FileInfo
|
||||
}
|
||||
|
||||
// bindataWebindexhtml reads file data from disk. It returns an error on failure.
|
||||
func bindataWebindexhtml() (*asset, error) {
|
||||
path := "P:\\Go\\gowiki\\web\\index.html"
|
||||
name := "web/index.html"
|
||||
bytes, err := bindataRead(path, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: fi}
|
||||
return a, err
|
||||
}
|
||||
|
||||
// bindataWebmiscbootstrapmincss reads file data from disk. It returns an error on failure.
|
||||
func bindataWebmiscbootstrapmincss() (*asset, error) {
|
||||
path := "P:\\Go\\gowiki\\web\\misc\\bootstrap.min.css"
|
||||
name := "web/misc/bootstrap.min.css"
|
||||
bytes, err := bindataRead(path, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: fi}
|
||||
return a, err
|
||||
}
|
||||
|
||||
// bindataWebmiscbootstrapminjs reads file data from disk. It returns an error on failure.
|
||||
func bindataWebmiscbootstrapminjs() (*asset, error) {
|
||||
path := "P:\\Go\\gowiki\\web\\misc\\bootstrap.min.js"
|
||||
name := "web/misc/bootstrap.min.js"
|
||||
bytes, err := bindataRead(path, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: fi}
|
||||
return a, err
|
||||
}
|
||||
|
||||
// bindataWebmisccodemirrorcss reads file data from disk. It returns an error on failure.
|
||||
func bindataWebmisccodemirrorcss() (*asset, error) {
|
||||
path := "P:\\Go\\gowiki\\web\\misc\\codemirror.css"
|
||||
name := "web/misc/codemirror.css"
|
||||
bytes, err := bindataRead(path, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: fi}
|
||||
return a, err
|
||||
}
|
||||
|
||||
// bindataWebmisccodemirrorjs reads file data from disk. It returns an error on failure.
|
||||
func bindataWebmisccodemirrorjs() (*asset, error) {
|
||||
path := "P:\\Go\\gowiki\\web\\misc\\codemirror.js"
|
||||
name := "web/misc/codemirror.js"
|
||||
bytes, err := bindataRead(path, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: fi}
|
||||
return a, err
|
||||
}
|
||||
|
||||
// bindataWebmiscjqueryminjs reads file data from disk. It returns an error on failure.
|
||||
func bindataWebmiscjqueryminjs() (*asset, error) {
|
||||
path := "P:\\Go\\gowiki\\web\\misc\\jquery.min.js"
|
||||
name := "web/misc/jquery.min.js"
|
||||
bytes, err := bindataRead(path, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: fi}
|
||||
return a, err
|
||||
}
|
||||
|
||||
// bindataWebmiscmarkdownjs reads file data from disk. It returns an error on failure.
|
||||
func bindataWebmiscmarkdownjs() (*asset, error) {
|
||||
path := "P:\\Go\\gowiki\\web\\misc\\markdown.js"
|
||||
name := "web/misc/markdown.js"
|
||||
bytes, err := bindataRead(path, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: fi}
|
||||
return a, err
|
||||
}
|
||||
|
||||
// bindataWebmiscshowdownminjs reads file data from disk. It returns an error on failure.
|
||||
func bindataWebmiscshowdownminjs() (*asset, error) {
|
||||
path := "P:\\Go\\gowiki\\web\\misc\\showdown.min.js"
|
||||
name := "web/misc/showdown.min.js"
|
||||
bytes, err := bindataRead(path, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: fi}
|
||||
return a, err
|
||||
}
|
||||
|
||||
// bindataWebpageshilfemd reads file data from disk. It returns an error on failure.
|
||||
func bindataWebpageshilfemd() (*asset, error) {
|
||||
path := "P:\\Go\\gowiki\\web\\pages\\hilfe.md"
|
||||
name := "web/pages/hilfe.md"
|
||||
bytes, err := bindataRead(path, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: fi}
|
||||
return a, err
|
||||
}
|
||||
|
||||
// bindataWebpagesplaygroundmd reads file data from disk. It returns an error on failure.
|
||||
func bindataWebpagesplaygroundmd() (*asset, error) {
|
||||
path := "P:\\Go\\gowiki\\web\\pages\\playground.md"
|
||||
name := "web/pages/playground.md"
|
||||
bytes, err := bindataRead(path, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: fi}
|
||||
return a, err
|
||||
}
|
||||
|
||||
// bindataWebpagessidebarmd reads file data from disk. It returns an error on failure.
|
||||
func bindataWebpagessidebarmd() (*asset, error) {
|
||||
path := "P:\\Go\\gowiki\\web\\pages\\sidebar.md"
|
||||
name := "web/pages/sidebar.md"
|
||||
bytes, err := bindataRead(path, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: fi}
|
||||
return a, err
|
||||
}
|
||||
|
||||
// bindataWebpagesstartmd reads file data from disk. It returns an error on failure.
|
||||
func bindataWebpagesstartmd() (*asset, error) {
|
||||
path := "P:\\Go\\gowiki\\web\\pages\\start.md"
|
||||
name := "web/pages/start.md"
|
||||
bytes, err := bindataRead(path, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: fi}
|
||||
return a, err
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Asset loads and returns the asset for the given name.
|
||||
// It returns an error if the asset could not be found or
|
||||
// could not be loaded.
|
||||
//
|
||||
func Asset(name string) ([]byte, error) {
|
||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
if f, ok := _bindata[cannonicalName]; ok {
|
||||
a, err := f()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
|
||||
}
|
||||
return a.bytes, nil
|
||||
}
|
||||
return nil, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist}
|
||||
}
|
||||
|
||||
//
|
||||
// MustAsset is like Asset but panics when Asset would return an error.
|
||||
// It simplifies safe initialization of global variables.
|
||||
// nolint: deadcode
|
||||
//
|
||||
func MustAsset(name string) []byte {
|
||||
a, err := Asset(name)
|
||||
if err != nil {
|
||||
panic("asset: Asset(" + name + "): " + err.Error())
|
||||
}
|
||||
|
||||
return a
|
||||
}
|
||||
|
||||
//
|
||||
// AssetInfo loads and returns the asset info for the given name.
|
||||
// It returns an error if the asset could not be found or could not be loaded.
|
||||
//
|
||||
func AssetInfo(name string) (os.FileInfo, error) {
|
||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
if f, ok := _bindata[cannonicalName]; ok {
|
||||
a, err := f()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
|
||||
}
|
||||
return a.info, nil
|
||||
}
|
||||
return nil, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist}
|
||||
}
|
||||
|
||||
//
|
||||
// AssetNames returns the names of the assets.
|
||||
// nolint: deadcode
|
||||
//
|
||||
func AssetNames() []string {
|
||||
names := make([]string, 0, len(_bindata))
|
||||
for name := range _bindata {
|
||||
names = append(names, name)
|
||||
}
|
||||
return names
|
||||
}
|
||||
|
||||
//
|
||||
// _bindata is a table, holding each asset generator, mapped to its name.
|
||||
//
|
||||
var _bindata = map[string]func() (*asset, error){
|
||||
"web/index.html": bindataWebindexhtml,
|
||||
"web/misc/bootstrap.min.css": bindataWebmiscbootstrapmincss,
|
||||
"web/misc/bootstrap.min.js": bindataWebmiscbootstrapminjs,
|
||||
"web/misc/codemirror.css": bindataWebmisccodemirrorcss,
|
||||
"web/misc/codemirror.js": bindataWebmisccodemirrorjs,
|
||||
"web/misc/jquery.min.js": bindataWebmiscjqueryminjs,
|
||||
"web/misc/markdown.js": bindataWebmiscmarkdownjs,
|
||||
"web/misc/showdown.min.js": bindataWebmiscshowdownminjs,
|
||||
"web/pages/hilfe.md": bindataWebpageshilfemd,
|
||||
"web/pages/playground.md": bindataWebpagesplaygroundmd,
|
||||
"web/pages/sidebar.md": bindataWebpagessidebarmd,
|
||||
"web/pages/start.md": bindataWebpagesstartmd,
|
||||
}
|
||||
|
||||
//
|
||||
// AssetDir returns the file names below a certain
|
||||
// directory embedded in the file by go-bindata.
|
||||
// For example if you run go-bindata on data/... and data contains the
|
||||
// following hierarchy:
|
||||
// data/
|
||||
// foo.txt
|
||||
// img/
|
||||
// a.png
|
||||
// b.png
|
||||
// then AssetDir("data") would return []string{"foo.txt", "img"}
|
||||
// AssetDir("data/img") would return []string{"a.png", "b.png"}
|
||||
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
|
||||
// AssetDir("") will return []string{"data"}.
|
||||
//
|
||||
func AssetDir(name string) ([]string, error) {
|
||||
node := _bintree
|
||||
if len(name) != 0 {
|
||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
pathList := strings.Split(cannonicalName, "/")
|
||||
for _, p := range pathList {
|
||||
node = node.Children[p]
|
||||
if node == nil {
|
||||
return nil, &os.PathError{
|
||||
Op: "open",
|
||||
Path: name,
|
||||
Err: os.ErrNotExist,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if node.Func != nil {
|
||||
return nil, &os.PathError{
|
||||
Op: "open",
|
||||
Path: name,
|
||||
Err: os.ErrNotExist,
|
||||
}
|
||||
}
|
||||
rv := make([]string, 0, len(node.Children))
|
||||
for childName := range node.Children {
|
||||
rv = append(rv, childName)
|
||||
}
|
||||
return rv, nil
|
||||
}
|
||||
|
||||
|
||||
type bintree struct {
|
||||
Func func() (*asset, error)
|
||||
Children map[string]*bintree
|
||||
}
|
||||
|
||||
var _bintree = &bintree{Func: nil, Children: map[string]*bintree{
|
||||
"web": {Func: nil, Children: map[string]*bintree{
|
||||
"index.html": {Func: bindataWebindexhtml, Children: map[string]*bintree{}},
|
||||
"misc": {Func: nil, Children: map[string]*bintree{
|
||||
"bootstrap.min.css": {Func: bindataWebmiscbootstrapmincss, Children: map[string]*bintree{}},
|
||||
"bootstrap.min.js": {Func: bindataWebmiscbootstrapminjs, Children: map[string]*bintree{}},
|
||||
"codemirror.css": {Func: bindataWebmisccodemirrorcss, Children: map[string]*bintree{}},
|
||||
"codemirror.js": {Func: bindataWebmisccodemirrorjs, Children: map[string]*bintree{}},
|
||||
"jquery.min.js": {Func: bindataWebmiscjqueryminjs, Children: map[string]*bintree{}},
|
||||
"markdown.js": {Func: bindataWebmiscmarkdownjs, Children: map[string]*bintree{}},
|
||||
"showdown.min.js": {Func: bindataWebmiscshowdownminjs, Children: map[string]*bintree{}},
|
||||
}},
|
||||
"pages": {Func: nil, Children: map[string]*bintree{
|
||||
"hilfe.md": {Func: bindataWebpageshilfemd, Children: map[string]*bintree{}},
|
||||
"playground.md": {Func: bindataWebpagesplaygroundmd, Children: map[string]*bintree{}},
|
||||
"sidebar.md": {Func: bindataWebpagessidebarmd, Children: map[string]*bintree{}},
|
||||
"start.md": {Func: bindataWebpagesstartmd, Children: map[string]*bintree{}},
|
||||
}},
|
||||
}},
|
||||
}}
|
||||
|
||||
// RestoreAsset restores an asset under the given directory
|
||||
func RestoreAsset(dir, name string) error {
|
||||
data, err := Asset(name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
info, err := AssetInfo(name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
|
||||
}
|
||||
|
||||
// RestoreAssets restores an asset under the given directory recursively
|
||||
func RestoreAssets(dir, name string) error {
|
||||
children, err := AssetDir(name)
|
||||
// File
|
||||
if err != nil {
|
||||
return RestoreAsset(dir, name)
|
||||
}
|
||||
// Dir
|
||||
for _, child := range children {
|
||||
err = RestoreAssets(dir, filepath.Join(name, child))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func _filePath(dir, name string) string {
|
||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
cd /d %~dp0
|
||||
cd ..
|
||||
go build -o gowiki.exe
|
||||
pause
|
||||
@@ -0,0 +1,29 @@
|
||||
cd ..
|
||||
echo "========================"
|
||||
echo " GOWiki BuildScript"
|
||||
echo "========================"
|
||||
|
||||
echo "Create Static Ressources (Release)"
|
||||
go-bindata -verbose -o bindata.go ./web/...
|
||||
|
||||
echo "Build Windows/amd64..."
|
||||
$env:GOOS="windows"; $env:GOARCH="amd64"; go build -ldflags="-s -w -X main.version=0.0.1" -o ./build/gowiki_amd64.exe
|
||||
echo "Build Windows/x86..."
|
||||
$env:GOOS="windows"; $env:GOARCH="386"; go build -ldflags="-s -w -X main.version=0.0.1" -o ./build/gowiki_x86.exe
|
||||
echo "Build Linux/amd64..."
|
||||
$env:GOOS="linux"; $env:GOARCH="amd64"; go build -ldflags="-s -w -X main.version=0.0.1" -o ./build/gowiki_amd64.bin
|
||||
echo "Build Linux/x86..."
|
||||
$env:GOOS="linux"; $env:GOARCH="386"; go build -ldflags="-s -w -X main.version=0.0.1" -o ./build/gowiki_x86.bin
|
||||
echo "Build Linux/arm..."
|
||||
$env:GOOS="linux"; $env:GOARCH="arm"; go build -ldflags="-s -w -X main.version=0.0.1" -o ./build/gowiki.arm
|
||||
|
||||
echo "UPX - Compress Static Binaries"
|
||||
..\upx-3.95-win64\upx.exe -9 ./build/gowiki_amd64.exe
|
||||
..\upx-3.95-win64\upx.exe -9 ./build/gowiki_x86.exe
|
||||
..\upx-3.95-win64\upx.exe -9 ./build/gowiki_amd64.bin
|
||||
..\upx-3.95-win64\upx.exe -9 ./build/gowiki_x86.bin
|
||||
..\upx-3.95-win64\upx.exe -9 ./build/gowiki.arm
|
||||
|
||||
echo "Create Static Ressources (Debug)"
|
||||
go-bindata -verbose -debug -o bindata.go ./web/...
|
||||
pause
|
||||
@@ -0,0 +1,4 @@
|
||||
cd /d %~dp0
|
||||
cd ..
|
||||
go-bindata -debug -verbose -o bindata.go ./web/...
|
||||
pause
|
||||
@@ -0,0 +1,4 @@
|
||||
cd /d %~dp0
|
||||
cd ..
|
||||
go-bindata -verbose -o bindata.go ./web/...
|
||||
pause
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"Host":"http://127.0.0.1",
|
||||
"Port":"8000",
|
||||
"DataPath":"./data"
|
||||
}
|
||||
@@ -0,0 +1,217 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
var config = readConfig("")
|
||||
|
||||
type Configuration struct {
|
||||
Host string
|
||||
Port string
|
||||
DataPath string
|
||||
}
|
||||
|
||||
// our main function
|
||||
func main() {
|
||||
|
||||
// Ausgeben der Config-Optionen
|
||||
fmt.Println("Host: " + config.Host)
|
||||
fmt.Println("Post: " + config.Port)
|
||||
fmt.Println("DataPath: " + config.DataPath)
|
||||
|
||||
// DataPath-Verzeichnis anlegen, wenn es noch nicht existiert
|
||||
if !directoryExists(config.DataPath) {
|
||||
os.MkdirAll(config.DataPath, os.ModePerm)
|
||||
|
||||
// Default Seiten anlegen
|
||||
bStartmd, _ := Asset("web/pages/start.md")
|
||||
bHilfemd, _ := Asset("web/pages/hilfe.md")
|
||||
bPlaygroundmd, _ := Asset("web/pages/playground.md")
|
||||
bSidebarmd, _ := Asset("web/pages/sidebar.md")
|
||||
|
||||
err := ioutil.WriteFile(path.Join(config.DataPath, "start.md"), bStartmd, 0644)
|
||||
check(err)
|
||||
err = ioutil.WriteFile(path.Join(config.DataPath, "sidebar.md"), bSidebarmd, 0644)
|
||||
check(err)
|
||||
err = ioutil.WriteFile(path.Join(config.DataPath, "hilfe.md"), bHilfemd, 0644)
|
||||
check(err)
|
||||
err = ioutil.WriteFile(path.Join(config.DataPath, "playground.md"), bPlaygroundmd, 0644)
|
||||
check(err)
|
||||
}
|
||||
|
||||
router := mux.NewRouter()
|
||||
router.HandleFunc("/p/{pagename:.*}", getRawPage).Methods("GET")
|
||||
router.HandleFunc("/{pagename:.*}", getHTMLPage).Methods("GET")
|
||||
router.HandleFunc("/{pagename:.*}", postHTMLPage).Methods("POST")
|
||||
|
||||
log.Fatal(http.ListenAndServe(":"+config.Port, router))
|
||||
|
||||
}
|
||||
|
||||
func getHTMLPage(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
params := mux.Vars(r)
|
||||
|
||||
if strings.HasSuffix(params["pagename"], ".css") {
|
||||
//fmt.Println("CSS: " + params["pagename"])
|
||||
b, _ := Asset("web/" + params["pagename"])
|
||||
w.Header().Set("Content-Type", "text/css")
|
||||
w.Write(b)
|
||||
} else if strings.HasSuffix(params["pagename"], ".js") {
|
||||
//fmt.Println("JS: " + params["pagename"])
|
||||
b, _ := Asset("web/" + params["pagename"])
|
||||
w.Header().Set("Content-Type", "application/javascript")
|
||||
w.Write(b)
|
||||
} else {
|
||||
// Directory Listing für die Sidebar
|
||||
sidebarAusgabe := " \r\n \r\n**Inhaltsverzeichnis** \r\n\r\n"
|
||||
filepath.Walk(config.DataPath, func(path string, info os.FileInfo, err error) error {
|
||||
|
||||
tmpPath := strings.Replace(path, "\\", "/", -1)
|
||||
tmpPath = strings.Replace(tmpPath, "data", "", -1)
|
||||
tmpPathSplit := strings.Split(tmpPath, "/")
|
||||
|
||||
sidebarTABs := ""
|
||||
for i, _ := range tmpPathSplit {
|
||||
//fmt.Println(i, " => ", string(c))
|
||||
if i > 1 {
|
||||
sidebarTABs = sidebarTABs + " "
|
||||
}
|
||||
}
|
||||
|
||||
if info.Name() != "data" && info.Name() != "start.md" && info.Name() != "sidebar.md" && info.Name() != "hilfe.md" {
|
||||
if !strings.HasSuffix(info.Name(), ".md") {
|
||||
sidebarAusgabe = sidebarAusgabe + sidebarTABs + "* [" + strings.TrimSuffix(info.Name(), ".md") + "](" + strings.TrimSuffix(tmpPath, ".md") + "/start) \r\n"
|
||||
} else {
|
||||
sidebarAusgabe = sidebarAusgabe + sidebarTABs + "* [" + strings.TrimSuffix(info.Name(), ".md") + "](" + strings.TrimSuffix(tmpPath, ".md") + ") \r\n"
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
//tmpl := template.Must(template.ParseFiles("./web/index.html"))
|
||||
bTmpl, _ := Asset("web/index.html")
|
||||
tmpl := template.Must(template.New("tml").Parse(string(bTmpl)))
|
||||
data := MarkDownData{
|
||||
PageTitle: " ",
|
||||
MDText: "",
|
||||
SideBar: sidebarAusgabe,
|
||||
}
|
||||
tmpl.Execute(w, data)
|
||||
}
|
||||
}
|
||||
|
||||
func getRawPage(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
params := mux.Vars(r)
|
||||
pPageName := params["pagename"] + ".md"
|
||||
// Hack für anzeige der start.md wenn / aufgerufen wird
|
||||
if pPageName == ".md" {
|
||||
pPageName = "start.md"
|
||||
}
|
||||
pageContent := "Empty"
|
||||
|
||||
//fmt.Println(path.Join(config.DataPath, pPageName))
|
||||
b, err := ioutil.ReadFile(path.Join(config.DataPath, pPageName))
|
||||
check(err)
|
||||
|
||||
pageContent = string(b)
|
||||
|
||||
json.NewEncoder(w).Encode(pageContent)
|
||||
}
|
||||
|
||||
func postHTMLPage(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
params := mux.Vars(r)
|
||||
pPageName := params["pagename"] + ".md"
|
||||
|
||||
// Verzeichnis erstellen
|
||||
dir := path.Dir(pPageName)
|
||||
if !directoryExists(path.Join(config.DataPath, dir)) {
|
||||
os.MkdirAll(path.Join(config.DataPath, dir), os.ModePerm)
|
||||
}
|
||||
|
||||
//{ "MDText":"**test3**" }
|
||||
var oBody TPostBody
|
||||
json.NewDecoder(r.Body).Decode(&oBody)
|
||||
//fmt.Println(oBody)
|
||||
|
||||
f, err := os.Create(path.Join(config.DataPath, pPageName))
|
||||
check(err)
|
||||
defer f.Close()
|
||||
fw := bufio.NewWriter(f)
|
||||
_, err = fw.WriteString(oBody.MDText)
|
||||
check(err)
|
||||
fw.Flush()
|
||||
|
||||
json.NewEncoder(w).Encode("OK")
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Typen
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
type MarkDownData struct {
|
||||
PageTitle string
|
||||
MDText string
|
||||
SideBar string
|
||||
}
|
||||
|
||||
type TPostBody struct {
|
||||
MDText string
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Hilfsfunktionen
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
func check(e error) {
|
||||
if e != nil {
|
||||
fmt.Println(e)
|
||||
}
|
||||
}
|
||||
|
||||
func fileExists(filename string) bool {
|
||||
info, err := os.Stat(filename)
|
||||
if os.IsNotExist(err) {
|
||||
return false
|
||||
}
|
||||
return !info.IsDir()
|
||||
}
|
||||
|
||||
func directoryExists(filename string) bool {
|
||||
info, err := os.Stat(filename)
|
||||
if os.IsNotExist(err) {
|
||||
return false
|
||||
}
|
||||
return info.IsDir()
|
||||
}
|
||||
|
||||
func readConfig(filename string) *Configuration {
|
||||
// initialize conf with default values.
|
||||
conf := &Configuration{Host: "http://127.0.0.1", Port: "8000", DataPath: "./data"}
|
||||
|
||||
b, err := ioutil.ReadFile("./config.json")
|
||||
if err != nil {
|
||||
return conf
|
||||
}
|
||||
if err = json.Unmarshal(b, conf); err != nil {
|
||||
return conf
|
||||
}
|
||||
return conf
|
||||
}
|
||||
+304
@@ -0,0 +1,304 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link rel=stylesheet href="/misc/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/misc/codemirror.css">
|
||||
<style>
|
||||
html {
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
}
|
||||
body {
|
||||
margin-top: 60px;
|
||||
}
|
||||
/*
|
||||
* Global add-ons
|
||||
*/
|
||||
|
||||
.sub-header {
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
/*
|
||||
* Top navigation
|
||||
* Hide default border to remove 1px line.
|
||||
*/
|
||||
.navbar-fixed-top {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sidebar
|
||||
*/
|
||||
|
||||
/* Hide for mobile, show later */
|
||||
.sidebar {
|
||||
display: none;
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
top: 51px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
display: block;
|
||||
padding: 20px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
|
||||
background-color: #f5f5f5;
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
/* Sidebar navigation */
|
||||
.nav-sidebar {
|
||||
margin-right: -21px; /* 20px padding + 1px border */
|
||||
margin-bottom: 20px;
|
||||
margin-left: -20px;
|
||||
}
|
||||
.nav-sidebar > li > a {
|
||||
padding-right: 20px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.nav-sidebar > .active > a,
|
||||
.nav-sidebar > .active > a:hover,
|
||||
.nav-sidebar > .active > a:focus {
|
||||
color: #fff;
|
||||
background-color: #428bca;
|
||||
}
|
||||
|
||||
/* Main Content */
|
||||
.main {
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
.sidebar ul, li {
|
||||
margin-left: 2px;
|
||||
padding-left: 1px;
|
||||
list-style-type: square;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<!-- Fixed navbar -->
|
||||
<nav class="navbar navbar-fixed-top navbar-default">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/start">GoWiki</a>
|
||||
<div id="breadcrumb" class="navbar-brand"></div>
|
||||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li id="btnEditpage"><a href="#" onclick="EditPage()">Edit</a></li>
|
||||
<li id="btnPreviewpage"><a href="#" onclick="PreviewPage()">Preview</a></li>
|
||||
<li id="btnSavepage"><a href="#" onclick="SavePage()">Save</a></li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-2 col-md-1 sidebar">
|
||||
<div id="outputsidebar" style="display: none;">{{.SideBar}}</div>
|
||||
</div>
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-1 main">
|
||||
<div id="markdowndiv" style="display: none;">{{.MDText}}</div>
|
||||
<div id="outputdiv" style="display: none;">{{.MDText}}</div>
|
||||
<div id="editdiv" style="display: none;">
|
||||
<form><textarea id="code" name="code"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script language=javascript src="/misc/jquery.min.js"></script>
|
||||
<script language=javascript src="/misc/bootstrap.min.js"></script>
|
||||
<script language=javascript src="/misc/showdown.min.js"></script>
|
||||
<script language=javascript src="/misc/codemirror.js"></script>
|
||||
<script language=javascript src="/misc/markdown.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var html = "EMPTY";
|
||||
var MD2HTMLConverter = new showdown.Converter({
|
||||
tables: true,
|
||||
strikethrough: true,
|
||||
simplifiedAutoLink: true,
|
||||
excludeTrailingPunctuationFromURLs: true,
|
||||
tasklists: true,
|
||||
emoji: true
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$(btnEditpage).show();
|
||||
$(btnSavepage).hide();
|
||||
$(btnPreviewpage).hide();
|
||||
|
||||
|
||||
//html = converter.makeHtml($("#outputdiv").html());
|
||||
//$("#outputdiv").html(html);
|
||||
|
||||
var breadcrumbHTML = "";
|
||||
var sPageURL = window.location.pathname.split('/');
|
||||
|
||||
for (i = 1; i < sPageURL.length; i++) {
|
||||
if(i==sPageURL.length-1) {
|
||||
breadcrumbHTML = breadcrumbHTML + '/'+sPageURL[i]+'';
|
||||
}
|
||||
else {
|
||||
breadcrumbHTML = breadcrumbHTML + '<a href="/'+sPageURL[i]+'/start">/'+sPageURL[i]+'</a> ';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#breadcrumb").html(breadcrumbHTML);
|
||||
|
||||
|
||||
window.myCodeMirror = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
mode: 'markdown',
|
||||
lineNumbers: true,
|
||||
theme: "default",
|
||||
extraKeys: {"Enter": "newlineAndIndentContinueMarkdownList"}
|
||||
});
|
||||
window.myCodeMirror.setSize("auto", "auto");
|
||||
|
||||
$(window.myCodeMirror.getWrapperElement()).slideDown('normal', function(){
|
||||
window.myCodeMirror.refresh();
|
||||
});
|
||||
|
||||
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
contentType:'application/json; charset=utf-8',
|
||||
url: '/p/'+window.location.pathname,
|
||||
dataType: "json",
|
||||
data: "",
|
||||
success: function(content){
|
||||
$("#outputdiv").html(MD2HTMLConverter.makeHtml(content));
|
||||
$("#outputdiv").show();
|
||||
|
||||
$('#outputdiv table').addClass('table table-sm table-bordered table-striped');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
contentType:'application/json; charset=utf-8',
|
||||
url: '/p/sidebar',
|
||||
dataType: "json",
|
||||
data: "",
|
||||
success: function(content){
|
||||
html = MD2HTMLConverter.makeHtml(content+$("#outputsidebar").html());
|
||||
$("#outputsidebar").html(html);
|
||||
$("#outputsidebar").show();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
function EditPage() {
|
||||
|
||||
$(btnEditpage).hide();
|
||||
$(btnSavepage).show();
|
||||
$(btnPreviewpage).show();
|
||||
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
contentType:'application/json; charset=utf-8',
|
||||
url: '/p/'+window.location.pathname,
|
||||
dataType: "json",
|
||||
data: "",
|
||||
success: function(content){
|
||||
|
||||
$("#outputdiv").hide();
|
||||
//$("#code").html(content);
|
||||
$("#editdiv").show();
|
||||
|
||||
window.myCodeMirror.setValue(content);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function PreviewPage() {
|
||||
var content = "###Vorschau\n ----- \n"+window.myCodeMirror.getValue()+"\n ----- \n";
|
||||
$("#outputdiv").html(MD2HTMLConverter.makeHtml(content));
|
||||
$("#outputdiv").show();
|
||||
}
|
||||
|
||||
function SavePage() {
|
||||
var obj = {
|
||||
MDText : window.myCodeMirror.getValue()
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
contentType:'application/json; charset=utf-8',
|
||||
url: window.location.pathname,
|
||||
dataType: "json",
|
||||
data: JSON.stringify(obj),
|
||||
success: function(data){
|
||||
$("#outputdiv").html(MD2HTMLConverter.makeHtml(obj.MDText));
|
||||
$("#outputdiv").show();
|
||||
$("#editdiv").hide();
|
||||
|
||||
$(btnEditpage).show();
|
||||
$(btnSavepage).hide();
|
||||
$(btnPreviewpage).hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<script>
|
||||
//--------------------------------------------------------------------------
|
||||
// Hilfsfunktionen
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
function getUrlParameter(sParam) {
|
||||
var sPageURL = window.location.search.substring(1),
|
||||
sURLVariables = sPageURL.split('&'),
|
||||
sParameterName,
|
||||
i;
|
||||
|
||||
for (i = 0; i < sURLVariables.length; i++) {
|
||||
sParameterName = sURLVariables[i].split('=');
|
||||
|
||||
if (sParameterName[0] === sParam) {
|
||||
return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</body></html>
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
/*!
|
||||
* Bootstrap v3.3.5 (http://getbootstrap.com)
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(/misc/glyphicons-halflings-regular.woff2) format('woff2'),url(/misc/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyLine truncated
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap v3.3.5 (http://getbootstrap.com)
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Licensed under the MIT license
|
||||
*/
|
||||
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&cLine truncated
|
||||
d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
|
||||
@@ -0,0 +1,351 @@
|
||||
/* BASICS */
|
||||
|
||||
.CodeMirror {
|
||||
/* Set height, width, borders, and global font properties here */
|
||||
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier;
|
||||
font-size: 0.9em;
|
||||
/*height: auto;*/
|
||||
/*width: auto;*/
|
||||
color: black;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
/* PADDING */
|
||||
|
||||
.CodeMirror-lines {
|
||||
padding: 4px 0; /* Vertical padding around content */
|
||||
}
|
||||
.CodeMirror pre.CodeMirror-line,
|
||||
.CodeMirror pre.CodeMirror-line-like {
|
||||
padding: 0 4px; /* Horizontal padding of content */
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
background-color: white; /* The little square between H and V scrollbars */
|
||||
}
|
||||
|
||||
/* GUTTER */
|
||||
|
||||
.CodeMirror-gutters {
|
||||
border-right: 1px solid #ddd;
|
||||
background-color: #f7f7f7;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.CodeMirror-linenumbers {}
|
||||
.CodeMirror-linenumber {
|
||||
padding: 0 3px 0 5px;
|
||||
min-width: 20px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.CodeMirror-guttermarker { color: black; }
|
||||
.CodeMirror-guttermarker-subtle { color: #999; }
|
||||
|
||||
/* CURSOR */
|
||||
|
||||
.CodeMirror-cursor {
|
||||
border-left: 1px solid black;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
}
|
||||
/* Shown when moving in bi-directional text */
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
.cm-fat-cursor .CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0 !important;
|
||||
background: #7e7;
|
||||
}
|
||||
.cm-fat-cursor div.CodeMirror-cursors {
|
||||
z-index: 1;
|
||||
}
|
||||
.cm-fat-cursor-mark {
|
||||
background-color: rgba(20, 255, 20, 0.5);
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
}
|
||||
.cm-animate-fat-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
background-color: #7e7;
|
||||
}
|
||||
@-moz-keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@-webkit-keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
|
||||
/* Can style cursor different in overwrite (non-insert) mode */
|
||||
.CodeMirror-overwrite .CodeMirror-cursor {}
|
||||
|
||||
.cm-tab { display: inline-block; text-decoration: inherit; }
|
||||
|
||||
.CodeMirror-rulers {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: -50px; bottom: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
top: 0; bottom: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* DEFAULT THEME */
|
||||
|
||||
.cm-s-default .cm-header {color: blue;}
|
||||
.cm-s-default .cm-quote {color: #090;}
|
||||
.cm-negative {color: #d44;}
|
||||
.cm-positive {color: #292;}
|
||||
.cm-header, .cm-strong {font-weight: bold;}
|
||||
.cm-em {font-style: italic;}
|
||||
.cm-link {text-decoration: underline;}
|
||||
.cm-strikethrough {text-decoration: line-through;}
|
||||
|
||||
.cm-s-default .cm-keyword {color: #708;}
|
||||
.cm-s-default .cm-atom {color: #219;}
|
||||
.cm-s-default .cm-number {color: #164;}
|
||||
.cm-s-default .cm-def {color: #00f;}
|
||||
.cm-s-default .cm-variable,
|
||||
.cm-s-default .cm-punctuation,
|
||||
.cm-s-default .cm-property,
|
||||
.cm-s-default .cm-operator {}
|
||||
.cm-s-default .cm-variable-2 {color: #05a;}
|
||||
.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
|
||||
.cm-s-default .cm-comment {color: #a50;}
|
||||
.cm-s-default .cm-string {color: #a11;}
|
||||
.cm-s-default .cm-string-2 {color: #f50;}
|
||||
.cm-s-default .cm-meta {color: #555;}
|
||||
.cm-s-default .cm-qualifier {color: #555;}
|
||||
.cm-s-default .cm-builtin {color: #30a;}
|
||||
.cm-s-default .cm-bracket {color: #997;}
|
||||
.cm-s-default .cm-tag {color: #170;}
|
||||
.cm-s-default .cm-attribute {color: #00c;}
|
||||
.cm-s-default .cm-hr {color: #999;}
|
||||
.cm-s-default .cm-link {color: #00c;}
|
||||
|
||||
.cm-s-default .cm-error {color: #f00;}
|
||||
.cm-invalidchar {color: #f00;}
|
||||
|
||||
.CodeMirror-composing { border-bottom: 2px solid; }
|
||||
|
||||
/* Default styles for common addons */
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
|
||||
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
|
||||
.CodeMirror-activeline-background {background: #e8f2ff;}
|
||||
|
||||
/* STOP */
|
||||
|
||||
/* The rest of this file contains styles related to the mechanics of
|
||||
the editor. You probably shouldn't touch them. */
|
||||
|
||||
.CodeMirror {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
overflow: scroll !important; /* Things will break if this is overridden */
|
||||
/* 30px is the magic margin used to hide the element's real scrollbars */
|
||||
/* See overflow: hidden in .CodeMirror */
|
||||
margin-bottom: -30px; margin-right: -30px;
|
||||
padding-bottom: 30px;
|
||||
height: 100%;
|
||||
outline: none; /* Prevent dragging from highlighting the element */
|
||||
position: relative;
|
||||
}
|
||||
.CodeMirror-sizer {
|
||||
position: relative;
|
||||
border-right: 30px solid transparent;
|
||||
}
|
||||
|
||||
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
||||
before actual scrolling happens, thus preventing shaking and
|
||||
flickering artifacts. */
|
||||
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none;
|
||||
}
|
||||
.CodeMirror-vscrollbar {
|
||||
right: 0; top: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.CodeMirror-hscrollbar {
|
||||
bottom: 0; left: 0;
|
||||
overflow-y: hidden;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
.CodeMirror-scrollbar-filler {
|
||||
right: 0; bottom: 0;
|
||||
}
|
||||
.CodeMirror-gutter-filler {
|
||||
left: 0; bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute; left: 0; top: 0;
|
||||
min-height: 100%;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-bottom: -30px;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
.CodeMirror-gutter-background {
|
||||
position: absolute;
|
||||
top: 0; bottom: 0;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-elt {
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
|
||||
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
min-height: 1px; /* prevents collapsing before first draw */
|
||||
}
|
||||
.CodeMirror pre.CodeMirror-line,
|
||||
.CodeMirror pre.CodeMirror-line-like {
|
||||
/* Reset some styles that the rest of the page might have set */
|
||||
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
margin: 0;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-font-variant-ligatures: contextual;
|
||||
font-variant-ligatures: contextual;
|
||||
}
|
||||
.CodeMirror-wrap pre.CodeMirror-line,
|
||||
.CodeMirror-wrap pre.CodeMirror-line-like {
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.CodeMirror-linebackground {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: 0; bottom: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-linewidget {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 0.1px; /* Force widget margins to stay inside of the container */
|
||||
}
|
||||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-rtl pre { direction: rtl; }
|
||||
|
||||
.CodeMirror-code {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Force content-box sizing for the elements where we expect it */
|
||||
.CodeMirror-scroll,
|
||||
.CodeMirror-sizer,
|
||||
.CodeMirror-gutter,
|
||||
.CodeMirror-gutters,
|
||||
.CodeMirror-linenumber {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
.CodeMirror-measure pre { position: static; }
|
||||
|
||||
div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
div.CodeMirror-dragcursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-focused div.CodeMirror-cursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-selected { background: #d9d9d9; }
|
||||
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
||||
.CodeMirror-crosshair { cursor: crosshair; }
|
||||
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
|
||||
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
|
||||
|
||||
.cm-searching {
|
||||
background-color: #ffa;
|
||||
background-color: rgba(255, 255, 0, .4);
|
||||
}
|
||||
|
||||
/* Used to force a border model for a node */
|
||||
.cm-force-border { padding-right: .1px; }
|
||||
|
||||
@media print {
|
||||
/* Hide the cursor when printing */
|
||||
.CodeMirror div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
/* See issue #2901 */
|
||||
.cm-tab-wrap-hack:after { content: ''; }
|
||||
|
||||
/* Help users use markselection to safely style text background */
|
||||
span.CodeMirror-selectedtext { background: none; }
|
||||
File diff suppressed because it is too large.
Load diff
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
|
||||
//@ sourceMappingURL=jquery.min.map
|
||||
*/
|
||||
(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(eLine truncated
|
||||
}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])whilLine truncated
|
||||
u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(iLine truncated
|
||||
@@ -0,0 +1,883 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"), require("../xml/xml"), require("../meta"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror", "../xml/xml", "../meta"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
||||
|
||||
var htmlMode = CodeMirror.getMode(cmCfg, "text/html");
|
||||
var htmlModeMissing = htmlMode.name == "null"
|
||||
|
||||
function getMode(name) {
|
||||
if (CodeMirror.findModeByName) {
|
||||
var found = CodeMirror.findModeByName(name);
|
||||
if (found) name = found.mime || found.mimes[0];
|
||||
}
|
||||
var mode = CodeMirror.getMode(cmCfg, name);
|
||||
return mode.name == "null" ? null : mode;
|
||||
}
|
||||
|
||||
// Should characters that affect highlighting be highlighted separate?
|
||||
// Does not include characters that will be output (such as `1.` and `-` for lists)
|
||||
if (modeCfg.highlightFormatting === undefined)
|
||||
modeCfg.highlightFormatting = false;
|
||||
|
||||
// Maximum number of nested blockquotes. Set to 0 for infinite nesting.
|
||||
// Excess `>` will emit `error` token.
|
||||
if (modeCfg.maxBlockquoteDepth === undefined)
|
||||
modeCfg.maxBlockquoteDepth = 0;
|
||||
|
||||
// Turn on task lists? ("- [ ] " and "- [x] ")
|
||||
if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;
|
||||
|
||||
// Turn on strikethrough syntax
|
||||
if (modeCfg.strikethrough === undefined)
|
||||
modeCfg.strikethrough = false;
|
||||
|
||||
if (modeCfg.emoji === undefined)
|
||||
modeCfg.emoji = false;
|
||||
|
||||
if (modeCfg.fencedCodeBlockHighlighting === undefined)
|
||||
modeCfg.fencedCodeBlockHighlighting = true;
|
||||
|
||||
if (modeCfg.xml === undefined)
|
||||
modeCfg.xml = true;
|
||||
|
||||
// Allow token types to be overridden by user-provided token types.
|
||||
if (modeCfg.tokenTypeOverrides === undefined)
|
||||
modeCfg.tokenTypeOverrides = {};
|
||||
|
||||
var tokenTypes = {
|
||||
header: "header",
|
||||
code: "comment",
|
||||
quote: "quote",
|
||||
list1: "variable-2",
|
||||
list2: "variable-3",
|
||||
list3: "keyword",
|
||||
hr: "hr",
|
||||
image: "image",
|
||||
imageAltText: "image-alt-text",
|
||||
imageMarker: "image-marker",
|
||||
formatting: "formatting",
|
||||
linkInline: "link",
|
||||
linkEmail: "link",
|
||||
linkText: "link",
|
||||
linkHref: "string",
|
||||
em: "em",
|
||||
strong: "strong",
|
||||
strikethrough: "strikethrough",
|
||||
emoji: "builtin"
|
||||
};
|
||||
|
||||
for (var tokenType in tokenTypes) {
|
||||
if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) {
|
||||
tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType];
|
||||
}
|
||||
}
|
||||
|
||||
var hrRE = /^([*\-_])(?:\s*\1){2,}\s*$/
|
||||
, listRE = /^(?:[*\-+]|^[0-9]+([.)]))\s+/
|
||||
, taskListRE = /^\[(x| )\](?=\s)/i // Must follow listRE
|
||||
, atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/
|
||||
, setextHeaderRE = /^ *(?:\={1,}|-{1,})\s*$/
|
||||
, textRE = /^[^#!\[\]*_\\<>` "'(~:]+/
|
||||
, fencedCodeRE = /^(~~~+|```+)[ \t]*([\w+#-]*)[^\n`]*$/
|
||||
, linkDefRE = /^\s*\[[^\]]+?\]:.*$/ // naive link-definition
|
||||
, punctuation = /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/
|
||||
, expandedTab = " " // CommonMark specifies tab as 4 spaces
|
||||
|
||||
function switchInline(stream, state, f) {
|
||||
state.f = state.inline = f;
|
||||
return f(stream, state);
|
||||
}
|
||||
|
||||
function switchBlock(stream, state, f) {
|
||||
state.f = state.block = f;
|
||||
return f(stream, state);
|
||||
}
|
||||
|
||||
function lineIsEmpty(line) {
|
||||
return !line || !/\S/.test(line.string)
|
||||
}
|
||||
|
||||
// Blocks
|
||||
|
||||
function blankLine(state) {
|
||||
// Reset linkTitle state
|
||||
state.linkTitle = false;
|
||||
state.linkHref = false;
|
||||
state.linkText = false;
|
||||
// Reset EM state
|
||||
state.em = false;
|
||||
// Reset STRONG state
|
||||
state.strong = false;
|
||||
// Reset strikethrough state
|
||||
state.strikethrough = false;
|
||||
// Reset state.quote
|
||||
state.quote = 0;
|
||||
// Reset state.indentedCode
|
||||
state.indentedCode = false;
|
||||
if (state.f == htmlBlock) {
|
||||
var exit = htmlModeMissing
|
||||
if (!exit) {
|
||||
var inner = CodeMirror.innerMode(htmlMode, state.htmlState)
|
||||
exit = inner.mode.name == "xml" && inner.state.tagStart === null &&
|
||||
(!inner.state.context && inner.state.tokenize.isInText)
|
||||
}
|
||||
if (exit) {
|
||||
state.f = inlineNormal;
|
||||
state.block = blockNormal;
|
||||
state.htmlState = null;
|
||||
}
|
||||
}
|
||||
// Reset state.trailingSpace
|
||||
state.trailingSpace = 0;
|
||||
state.trailingSpaceNewLine = false;
|
||||
// Mark this line as blank
|
||||
state.prevLine = state.thisLine
|
||||
state.thisLine = {stream: null}
|
||||
return null;
|
||||
}
|
||||
|
||||
function blockNormal(stream, state) {
|
||||
var firstTokenOnLine = stream.column() === state.indentation;
|
||||
var prevLineLineIsEmpty = lineIsEmpty(state.prevLine.stream);
|
||||
var prevLineIsIndentedCode = state.indentedCode;
|
||||
var prevLineIsHr = state.prevLine.hr;
|
||||
var prevLineIsList = state.list !== false;
|
||||
var maxNonCodeIndentation = (state.listStack[state.listStack.length - 1] || 0) + 3;
|
||||
|
||||
state.indentedCode = false;
|
||||
|
||||
var lineIndentation = state.indentation;
|
||||
// compute once per line (on first token)
|
||||
if (state.indentationDiff === null) {
|
||||
state.indentationDiff = state.indentation;
|
||||
if (prevLineIsList) {
|
||||
state.list = null;
|
||||
// While this list item's marker's indentation is less than the deepest
|
||||
// list item's content's indentation,pop the deepest list item
|
||||
// indentation off the stack, and update block indentation state
|
||||
while (lineIndentation < state.listStack[state.listStack.length - 1]) {
|
||||
state.listStack.pop();
|
||||
if (state.listStack.length) {
|
||||
state.indentation = state.listStack[state.listStack.length - 1];
|
||||
// less than the first list's indent -> the line is no longer a list
|
||||
} else {
|
||||
state.list = false;
|
||||
}
|
||||
}
|
||||
if (state.list !== false) {
|
||||
state.indentationDiff = lineIndentation - state.listStack[state.listStack.length - 1]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// not comprehensive (currently only for setext detection purposes)
|
||||
var allowsInlineContinuation = (
|
||||
!prevLineLineIsEmpty && !prevLineIsHr && !state.prevLine.header &&
|
||||
(!prevLineIsList || !prevLineIsIndentedCode) &&
|
||||
!state.prevLine.fencedCodeEnd
|
||||
);
|
||||
|
||||
var isHr = (state.list === false || prevLineIsHr || prevLineLineIsEmpty) &&
|
||||
state.indentation <= maxNonCodeIndentation && stream.match(hrRE);
|
||||
|
||||
var match = null;
|
||||
if (state.indentationDiff >= 4 && (prevLineIsIndentedCode || state.prevLine.fencedCodeEnd ||
|
||||
state.prevLine.header || prevLineLineIsEmpty)) {
|
||||
stream.skipToEnd();
|
||||
state.indentedCode = true;
|
||||
return tokenTypes.code;
|
||||
} else if (stream.eatSpace()) {
|
||||
return null;
|
||||
} else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(atxHeaderRE)) && match[1].length <= 6) {
|
||||
state.quote = 0;
|
||||
state.header = match[1].length;
|
||||
state.thisLine.header = true;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "header";
|
||||
state.f = state.inline;
|
||||
return getType(state);
|
||||
} else if (state.indentation <= maxNonCodeIndentation && stream.eat('>')) {
|
||||
state.quote = firstTokenOnLine ? 1 : state.quote + 1;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "quote";
|
||||
stream.eatSpace();
|
||||
return getType(state);
|
||||
} else if (!isHr && !state.setext && firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(listRE))) {
|
||||
var listType = match[1] ? "ol" : "ul";
|
||||
|
||||
state.indentation = lineIndentation + stream.current().length;
|
||||
state.list = true;
|
||||
state.quote = 0;
|
||||
|
||||
// Add this list item's content's indentation to the stack
|
||||
state.listStack.push(state.indentation);
|
||||
// Reset inline styles which shouldn't propagate aross list items
|
||||
state.em = false;
|
||||
state.strong = false;
|
||||
state.code = false;
|
||||
state.strikethrough = false;
|
||||
|
||||
if (modeCfg.taskLists && stream.match(taskListRE, false)) {
|
||||
state.taskList = true;
|
||||
}
|
||||
state.f = state.inline;
|
||||
if (modeCfg.highlightFormatting) state.formatting = ["list", "list-" + listType];
|
||||
return getType(state);
|
||||
} else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(fencedCodeRE, true))) {
|
||||
state.quote = 0;
|
||||
state.fencedEndRE = new RegExp(match[1] + "+ *$");
|
||||
// try switching mode
|
||||
state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2]);
|
||||
if (state.localMode) state.localState = CodeMirror.startState(state.localMode);
|
||||
state.f = state.block = local;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "code-block";
|
||||
state.code = -1
|
||||
return getType(state);
|
||||
// SETEXT has lowest block-scope precedence after HR, so check it after
|
||||
// the others (code, blockquote, list...)
|
||||
} else if (
|
||||
// if setext set, indicates line after ---/===
|
||||
state.setext || (
|
||||
// line before ---/===
|
||||
(!allowsInlineContinuation || !prevLineIsList) && !state.quote && state.list === false &&
|
||||
!state.code && !isHr && !linkDefRE.test(stream.string) &&
|
||||
(match = stream.lookAhead(1)) && (match = match.match(setextHeaderRE))
|
||||
)
|
||||
) {
|
||||
if ( !state.setext ) {
|
||||
state.header = match[0].charAt(0) == '=' ? 1 : 2;
|
||||
state.setext = state.header;
|
||||
} else {
|
||||
state.header = state.setext;
|
||||
// has no effect on type so we can reset it now
|
||||
state.setext = 0;
|
||||
stream.skipToEnd();
|
||||
if (modeCfg.highlightFormatting) state.formatting = "header";
|
||||
}
|
||||
state.thisLine.header = true;
|
||||
state.f = state.inline;
|
||||
return getType(state);
|
||||
} else if (isHr) {
|
||||
stream.skipToEnd();
|
||||
state.hr = true;
|
||||
state.thisLine.hr = true;
|
||||
return tokenTypes.hr;
|
||||
} else if (stream.peek() === '[') {
|
||||
return switchInline(stream, state, footnoteLink);
|
||||
}
|
||||
|
||||
return switchInline(stream, state, state.inline);
|
||||
}
|
||||
|
||||
function htmlBlock(stream, state) {
|
||||
var style = htmlMode.token(stream, state.htmlState);
|
||||
if (!htmlModeMissing) {
|
||||
var inner = CodeMirror.innerMode(htmlMode, state.htmlState)
|
||||
if ((inner.mode.name == "xml" && inner.state.tagStart === null &&
|
||||
(!inner.state.context && inner.state.tokenize.isInText)) ||
|
||||
(state.md_inside && stream.current().indexOf(">") > -1)) {
|
||||
state.f = inlineNormal;
|
||||
state.block = blockNormal;
|
||||
state.htmlState = null;
|
||||
}
|
||||
}
|
||||
return style;
|
||||
}
|
||||
|
||||
function local(stream, state) {
|
||||
var currListInd = state.listStack[state.listStack.length - 1] || 0;
|
||||
var hasExitedList = state.indentation < currListInd;
|
||||
var maxFencedEndInd = currListInd + 3;
|
||||
if (state.fencedEndRE && state.indentation <= maxFencedEndInd && (hasExitedList || stream.match(state.fencedEndRE))) {
|
||||
if (modeCfg.highlightFormatting) state.formatting = "code-block";
|
||||
var returnType;
|
||||
if (!hasExitedList) returnType = getType(state)
|
||||
state.localMode = state.localState = null;
|
||||
state.block = blockNormal;
|
||||
state.f = inlineNormal;
|
||||
state.fencedEndRE = null;
|
||||
state.code = 0
|
||||
state.thisLine.fencedCodeEnd = true;
|
||||
if (hasExitedList) return switchBlock(stream, state, state.block);
|
||||
return returnType;
|
||||
} else if (state.localMode) {
|
||||
return state.localMode.token(stream, state.localState);
|
||||
} else {
|
||||
stream.skipToEnd();
|
||||
return tokenTypes.code;
|
||||
}
|
||||
}
|
||||
|
||||
// Inline
|
||||
function getType(state) {
|
||||
var styles = [];
|
||||
|
||||
if (state.formatting) {
|
||||
styles.push(tokenTypes.formatting);
|
||||
|
||||
if (typeof state.formatting === "string") state.formatting = [state.formatting];
|
||||
|
||||
for (var i = 0; i < state.formatting.length; i++) {
|
||||
styles.push(tokenTypes.formatting + "-" + state.formatting[i]);
|
||||
|
||||
if (state.formatting[i] === "header") {
|
||||
styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.header);
|
||||
}
|
||||
|
||||
// Add `formatting-quote` and `formatting-quote-#` for blockquotes
|
||||
// Add `error` instead if the maximum blockquote nesting depth is passed
|
||||
if (state.formatting[i] === "quote") {
|
||||
if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
|
||||
styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.quote);
|
||||
} else {
|
||||
styles.push("error");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (state.taskOpen) {
|
||||
styles.push("meta");
|
||||
return styles.length ? styles.join(' ') : null;
|
||||
}
|
||||
if (state.taskClosed) {
|
||||
styles.push("property");
|
||||
return styles.length ? styles.join(' ') : null;
|
||||
}
|
||||
|
||||
if (state.linkHref) {
|
||||
styles.push(tokenTypes.linkHref, "url");
|
||||
} else { // Only apply inline styles to non-url text
|
||||
if (state.strong) { styles.push(tokenTypes.strong); }
|
||||
if (state.em) { styles.push(tokenTypes.em); }
|
||||
if (state.strikethrough) { styles.push(tokenTypes.strikethrough); }
|
||||
if (state.emoji) { styles.push(tokenTypes.emoji); }
|
||||
if (state.linkText) { styles.push(tokenTypes.linkText); }
|
||||
if (state.code) { styles.push(tokenTypes.code); }
|
||||
if (state.image) { styles.push(tokenTypes.image); }
|
||||
if (state.imageAltText) { styles.push(tokenTypes.imageAltText, "link"); }
|
||||
if (state.imageMarker) { styles.push(tokenTypes.imageMarker); }
|
||||
}
|
||||
|
||||
if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + "-" + state.header); }
|
||||
|
||||
if (state.quote) {
|
||||
styles.push(tokenTypes.quote);
|
||||
|
||||
// Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth
|
||||
if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
|
||||
styles.push(tokenTypes.quote + "-" + state.quote);
|
||||
} else {
|
||||
styles.push(tokenTypes.quote + "-" + modeCfg.maxBlockquoteDepth);
|
||||
}
|
||||
}
|
||||
|
||||
if (state.list !== false) {
|
||||
var listMod = (state.listStack.length - 1) % 3;
|
||||
if (!listMod) {
|
||||
styles.push(tokenTypes.list1);
|
||||
} else if (listMod === 1) {
|
||||
styles.push(tokenTypes.list2);
|
||||
} else {
|
||||
styles.push(tokenTypes.list3);
|
||||
}
|
||||
}
|
||||
|
||||
if (state.trailingSpaceNewLine) {
|
||||
styles.push("trailing-space-new-line");
|
||||
} else if (state.trailingSpace) {
|
||||
styles.push("trailing-space-" + (state.trailingSpace % 2 ? "a" : "b"));
|
||||
}
|
||||
|
||||
return styles.length ? styles.join(' ') : null;
|
||||
}
|
||||
|
||||
function handleText(stream, state) {
|
||||
if (stream.match(textRE, true)) {
|
||||
return getType(state);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function inlineNormal(stream, state) {
|
||||
var style = state.text(stream, state);
|
||||
if (typeof style !== 'undefined')
|
||||
return style;
|
||||
|
||||
if (state.list) { // List marker (*, +, -, 1., etc)
|
||||
state.list = null;
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
if (state.taskList) {
|
||||
var taskOpen = stream.match(taskListRE, true)[1] === " ";
|
||||
if (taskOpen) state.taskOpen = true;
|
||||
else state.taskClosed = true;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "task";
|
||||
state.taskList = false;
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
state.taskOpen = false;
|
||||
state.taskClosed = false;
|
||||
|
||||
if (state.header && stream.match(/^#+$/, true)) {
|
||||
if (modeCfg.highlightFormatting) state.formatting = "header";
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
var ch = stream.next();
|
||||
|
||||
// Matches link titles present on next line
|
||||
if (state.linkTitle) {
|
||||
state.linkTitle = false;
|
||||
var matchCh = ch;
|
||||
if (ch === '(') {
|
||||
matchCh = ')';
|
||||
}
|
||||
matchCh = (matchCh+'').replace(/([.?*+^\[\]\\(){}|-])/g, "\\$1");
|
||||
var regex = '^\\s*(?:[^' + matchCh + '\\\\]+|\\\\\\\\|\\\\.)' + matchCh;
|
||||
if (stream.match(new RegExp(regex), true)) {
|
||||
return tokenTypes.linkHref;
|
||||
}
|
||||
}
|
||||
|
||||
// If this block is changed, it may need to be updated in GFM mode
|
||||
if (ch === '`') {
|
||||
var previousFormatting = state.formatting;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "code";
|
||||
stream.eatWhile('`');
|
||||
var count = stream.current().length
|
||||
if (state.code == 0 && (!state.quote || count == 1)) {
|
||||
state.code = count
|
||||
return getType(state)
|
||||
} else if (count == state.code) { // Must be exact
|
||||
var t = getType(state)
|
||||
state.code = 0
|
||||
return t
|
||||
} else {
|
||||
state.formatting = previousFormatting
|
||||
return getType(state)
|
||||
}
|
||||
} else if (state.code) {
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
if (ch === '\\') {
|
||||
stream.next();
|
||||
if (modeCfg.highlightFormatting) {
|
||||
var type = getType(state);
|
||||
var formattingEscape = tokenTypes.formatting + "-escape";
|
||||
return type ? type + " " + formattingEscape : formattingEscape;
|
||||
}
|
||||
}
|
||||
|
||||
if (ch === '!' && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) {
|
||||
state.imageMarker = true;
|
||||
state.image = true;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "image";
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
if (ch === '[' && state.imageMarker && stream.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/, false)) {
|
||||
state.imageMarker = false;
|
||||
state.imageAltText = true
|
||||
if (modeCfg.highlightFormatting) state.formatting = "image";
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
if (ch === ']' && state.imageAltText) {
|
||||
if (modeCfg.highlightFormatting) state.formatting = "image";
|
||||
var type = getType(state);
|
||||
state.imageAltText = false;
|
||||
state.image = false;
|
||||
state.inline = state.f = linkHref;
|
||||
return type;
|
||||
}
|
||||
|
||||
if (ch === '[' && !state.image) {
|
||||
if (state.linkText && stream.match(/^.*?\]/)) return getType(state)
|
||||
state.linkText = true;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
if (ch === ']' && state.linkText) {
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
var type = getType(state);
|
||||
state.linkText = false;
|
||||
state.inline = state.f = stream.match(/\(.*?\)| ?\[.*?\]/, false) ? linkHref : inlineNormal
|
||||
return type;
|
||||
}
|
||||
|
||||
if (ch === '<' && stream.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, false)) {
|
||||
state.f = state.inline = linkInline;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
var type = getType(state);
|
||||
if (type){
|
||||
type += " ";
|
||||
} else {
|
||||
type = "";
|
||||
}
|
||||
return type + tokenTypes.linkInline;
|
||||
}
|
||||
|
||||
if (ch === '<' && stream.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, false)) {
|
||||
state.f = state.inline = linkInline;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
var type = getType(state);
|
||||
if (type){
|
||||
type += " ";
|
||||
} else {
|
||||
type = "";
|
||||
}
|
||||
return type + tokenTypes.linkEmail;
|
||||
}
|
||||
|
||||
if (modeCfg.xml && ch === '<' && stream.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i, false)) {
|
||||
var end = stream.string.indexOf(">", stream.pos);
|
||||
if (end != -1) {
|
||||
var atts = stream.string.substring(stream.start, end);
|
||||
if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) state.md_inside = true;
|
||||
}
|
||||
stream.backUp(1);
|
||||
state.htmlState = CodeMirror.startState(htmlMode);
|
||||
return switchBlock(stream, state, htmlBlock);
|
||||
}
|
||||
|
||||
if (modeCfg.xml && ch === '<' && stream.match(/^\/\w*?>/)) {
|
||||
state.md_inside = false;
|
||||
return "tag";
|
||||
} else if (ch === "*" || ch === "_") {
|
||||
var len = 1, before = stream.pos == 1 ? " " : stream.string.charAt(stream.pos - 2)
|
||||
while (len < 3 && stream.eat(ch)) len++
|
||||
var after = stream.peek() || " "
|
||||
// See http://spec.commonmark.org/0.27/#emphasis-and-strong-emphasis
|
||||
var leftFlanking = !/\s/.test(after) && (!punctuation.test(after) || /\s/.test(before) || punctuation.test(before))
|
||||
var rightFlanking = !/\s/.test(before) && (!punctuation.test(before) || /\s/.test(after) || punctuation.test(after))
|
||||
var setEm = null, setStrong = null
|
||||
if (len % 2) { // Em
|
||||
if (!state.em && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))
|
||||
setEm = true
|
||||
else if (state.em == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))
|
||||
setEm = false
|
||||
}
|
||||
if (len > 1) { // Strong
|
||||
if (!state.strong && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))
|
||||
setStrong = true
|
||||
else if (state.strong == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))
|
||||
setStrong = false
|
||||
}
|
||||
if (setStrong != null || setEm != null) {
|
||||
if (modeCfg.highlightFormatting) state.formatting = setEm == null ? "strong" : setStrong == null ? "em" : "strong em"
|
||||
if (setEm === true) state.em = ch
|
||||
if (setStrong === true) state.strong = ch
|
||||
var t = getType(state)
|
||||
if (setEm === false) state.em = false
|
||||
if (setStrong === false) state.strong = false
|
||||
return t
|
||||
}
|
||||
} else if (ch === ' ') {
|
||||
if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces
|
||||
if (stream.peek() === ' ') { // Surrounded by spaces, ignore
|
||||
return getType(state);
|
||||
} else { // Not surrounded by spaces, back up pointer
|
||||
stream.backUp(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (modeCfg.strikethrough) {
|
||||
if (ch === '~' && stream.eatWhile(ch)) {
|
||||
if (state.strikethrough) {// Remove strikethrough
|
||||
if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
|
||||
var t = getType(state);
|
||||
state.strikethrough = false;
|
||||
return t;
|
||||
} else if (stream.match(/^[^\s]/, false)) {// Add strikethrough
|
||||
state.strikethrough = true;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
|
||||
return getType(state);
|
||||
}
|
||||
} else if (ch === ' ') {
|
||||
if (stream.match(/^~~/, true)) { // Probably surrounded by space
|
||||
if (stream.peek() === ' ') { // Surrounded by spaces, ignore
|
||||
return getType(state);
|
||||
} else { // Not surrounded by spaces, back up pointer
|
||||
stream.backUp(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (modeCfg.emoji && ch === ":" && stream.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)) {
|
||||
state.emoji = true;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "emoji";
|
||||
var retType = getType(state);
|
||||
state.emoji = false;
|
||||
return retType;
|
||||
}
|
||||
|
||||
if (ch === ' ') {
|
||||
if (stream.match(/^ +$/, false)) {
|
||||
state.trailingSpace++;
|
||||
} else if (state.trailingSpace) {
|
||||
state.trailingSpaceNewLine = true;
|
||||
}
|
||||
}
|
||||
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
function linkInline(stream, state) {
|
||||
var ch = stream.next();
|
||||
|
||||
if (ch === ">") {
|
||||
state.f = state.inline = inlineNormal;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
var type = getType(state);
|
||||
if (type){
|
||||
type += " ";
|
||||
} else {
|
||||
type = "";
|
||||
}
|
||||
return type + tokenTypes.linkInline;
|
||||
}
|
||||
|
||||
stream.match(/^[^>]+/, true);
|
||||
|
||||
return tokenTypes.linkInline;
|
||||
}
|
||||
|
||||
function linkHref(stream, state) {
|
||||
// Check if space, and return NULL if so (to avoid marking the space)
|
||||
if(stream.eatSpace()){
|
||||
return null;
|
||||
}
|
||||
var ch = stream.next();
|
||||
if (ch === '(' || ch === '[') {
|
||||
state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]");
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link-string";
|
||||
state.linkHref = true;
|
||||
return getType(state);
|
||||
}
|
||||
return 'error';
|
||||
}
|
||||
|
||||
var linkRE = {
|
||||
")": /^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,
|
||||
"]": /^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/
|
||||
}
|
||||
|
||||
function getLinkHrefInside(endChar) {
|
||||
return function(stream, state) {
|
||||
var ch = stream.next();
|
||||
|
||||
if (ch === endChar) {
|
||||
state.f = state.inline = inlineNormal;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link-string";
|
||||
var returnState = getType(state);
|
||||
state.linkHref = false;
|
||||
return returnState;
|
||||
}
|
||||
|
||||
stream.match(linkRE[endChar])
|
||||
state.linkHref = true;
|
||||
return getType(state);
|
||||
};
|
||||
}
|
||||
|
||||
function footnoteLink(stream, state) {
|
||||
if (stream.match(/^([^\]\\]|\\.)*\]:/, false)) {
|
||||
state.f = footnoteLinkInside;
|
||||
stream.next(); // Consume [
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
state.linkText = true;
|
||||
return getType(state);
|
||||
}
|
||||
return switchInline(stream, state, inlineNormal);
|
||||
}
|
||||
|
||||
function footnoteLinkInside(stream, state) {
|
||||
if (stream.match(/^\]:/, true)) {
|
||||
state.f = state.inline = footnoteUrl;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
var returnType = getType(state);
|
||||
state.linkText = false;
|
||||
return returnType;
|
||||
}
|
||||
|
||||
stream.match(/^([^\]\\]|\\.)+/, true);
|
||||
|
||||
return tokenTypes.linkText;
|
||||
}
|
||||
|
||||
function footnoteUrl(stream, state) {
|
||||
// Check if space, and return NULL if so (to avoid marking the space)
|
||||
if(stream.eatSpace()){
|
||||
return null;
|
||||
}
|
||||
// Match URL
|
||||
stream.match(/^[^\s]+/, true);
|
||||
// Check for link title
|
||||
if (stream.peek() === undefined) { // End of line, set flag to check next line
|
||||
state.linkTitle = true;
|
||||
} else { // More content on line, check if link title
|
||||
stream.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/, true);
|
||||
}
|
||||
state.f = state.inline = inlineNormal;
|
||||
return tokenTypes.linkHref + " url";
|
||||
}
|
||||
|
||||
var mode = {
|
||||
startState: function() {
|
||||
return {
|
||||
f: blockNormal,
|
||||
|
||||
prevLine: {stream: null},
|
||||
thisLine: {stream: null},
|
||||
|
||||
block: blockNormal,
|
||||
htmlState: null,
|
||||
indentation: 0,
|
||||
|
||||
inline: inlineNormal,
|
||||
text: handleText,
|
||||
|
||||
formatting: false,
|
||||
linkText: false,
|
||||
linkHref: false,
|
||||
linkTitle: false,
|
||||
code: 0,
|
||||
em: false,
|
||||
strong: false,
|
||||
header: 0,
|
||||
setext: 0,
|
||||
hr: false,
|
||||
taskList: false,
|
||||
list: false,
|
||||
listStack: [],
|
||||
quote: 0,
|
||||
trailingSpace: 0,
|
||||
trailingSpaceNewLine: false,
|
||||
strikethrough: false,
|
||||
emoji: false,
|
||||
fencedEndRE: null
|
||||
};
|
||||
},
|
||||
|
||||
copyState: function(s) {
|
||||
return {
|
||||
f: s.f,
|
||||
|
||||
prevLine: s.prevLine,
|
||||
thisLine: s.thisLine,
|
||||
|
||||
block: s.block,
|
||||
htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),
|
||||
indentation: s.indentation,
|
||||
|
||||
localMode: s.localMode,
|
||||
localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,
|
||||
|
||||
inline: s.inline,
|
||||
text: s.text,
|
||||
formatting: false,
|
||||
linkText: s.linkText,
|
||||
linkTitle: s.linkTitle,
|
||||
linkHref: s.linkHref,
|
||||
code: s.code,
|
||||
em: s.em,
|
||||
strong: s.strong,
|
||||
strikethrough: s.strikethrough,
|
||||
emoji: s.emoji,
|
||||
header: s.header,
|
||||
setext: s.setext,
|
||||
hr: s.hr,
|
||||
taskList: s.taskList,
|
||||
list: s.list,
|
||||
listStack: s.listStack.slice(0),
|
||||
quote: s.quote,
|
||||
indentedCode: s.indentedCode,
|
||||
trailingSpace: s.trailingSpace,
|
||||
trailingSpaceNewLine: s.trailingSpaceNewLine,
|
||||
md_inside: s.md_inside,
|
||||
fencedEndRE: s.fencedEndRE
|
||||
};
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
|
||||
// Reset state.formatting
|
||||
state.formatting = false;
|
||||
|
||||
if (stream != state.thisLine.stream) {
|
||||
state.header = 0;
|
||||
state.hr = false;
|
||||
|
||||
if (stream.match(/^\s*$/, true)) {
|
||||
blankLine(state);
|
||||
return null;
|
||||
}
|
||||
|
||||
state.prevLine = state.thisLine
|
||||
state.thisLine = {stream: stream}
|
||||
|
||||
// Reset state.taskList
|
||||
state.taskList = false;
|
||||
|
||||
// Reset state.trailingSpace
|
||||
state.trailingSpace = 0;
|
||||
state.trailingSpaceNewLine = false;
|
||||
|
||||
if (!state.localState) {
|
||||
state.f = state.block;
|
||||
if (state.f != htmlBlock) {
|
||||
var indentation = stream.match(/^\s*/, true)[0].replace(/\t/g, expandedTab).length;
|
||||
state.indentation = indentation;
|
||||
state.indentationDiff = null;
|
||||
if (indentation > 0) return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return state.f(stream, state);
|
||||
},
|
||||
|
||||
innerMode: function(state) {
|
||||
if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};
|
||||
if (state.localState) return {state: state.localState, mode: state.localMode};
|
||||
return {state: state, mode: mode};
|
||||
},
|
||||
|
||||
indent: function(state, textAfter, line) {
|
||||
if (state.block == htmlBlock && htmlMode.indent) return htmlMode.indent(state.htmlState, textAfter, line)
|
||||
if (state.localState && state.localMode.indent) return state.localMode.indent(state.localState, textAfter, line)
|
||||
return CodeMirror.Pass
|
||||
},
|
||||
|
||||
blankLine: blankLine,
|
||||
|
||||
getType: getType,
|
||||
|
||||
blockCommentStart: "<!--",
|
||||
blockCommentEnd: "-->",
|
||||
closeBrackets: "()[]{}''\"\"``",
|
||||
fold: "markdown"
|
||||
};
|
||||
return mode;
|
||||
}, "xml");
|
||||
|
||||
CodeMirror.defineMIME("text/markdown", "markdown");
|
||||
|
||||
CodeMirror.defineMIME("text/x-markdown", "markdown");
|
||||
|
||||
});
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
/*! showdown v 1.9.1 - 02-11-2019 */
|
||||
(function(){function e(e){"use strict";var r={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as <br> (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex: <div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(r));var t={};for(var a in r)r.hasOwnProperty(a)&&(t[a]=r[a].defaultValue);return t}function r(e,r){"use strict";var t=r?"Error in "+r+" extension->":"Error in unnamed extension",n={valid:!0,error:""};a.helper.isArray(e)||(e=[e]);for(var s=0;s<e.length;++s){var o=t+" sub-extension "+s+": ",i=e[s];if("object"!=typeof i)return n.valid=!1,n.error=o+"must be an object, but "+typeof i+" given",n;if(!a.helper.isString(i.type))return n.valid=!1,n.error=o+'property "type" must be a string, but '+typeof i.type+" given",n;var l=i.type=i.type.toLowerCase();if("language"===l&&(l=i.type="lang"),"html"===l&&(l=i.type="output"),"lang"!==l&&"output"!==l&&"listLine truncated
|
||||
//# sourceMappingURL=showdown.min.js.map
|
||||
@@ -0,0 +1,983 @@
|
||||
# GoWiki Markdown Syntax Hilfe
|
||||
|
||||
----
|
||||
### Überschriften
|
||||
|
||||
|
||||
```
|
||||
# Header 1
|
||||
```
|
||||
|
||||
# Header 1
|
||||
|
||||
```
|
||||
## Header 2
|
||||
```
|
||||
## Header 2
|
||||
|
||||
```
|
||||
### Header 3
|
||||
```
|
||||
### Header 3
|
||||
|
||||
```
|
||||
#### Header 4
|
||||
```
|
||||
#### Header 4
|
||||
|
||||
```
|
||||
##### Header 5
|
||||
```
|
||||
##### Header 5
|
||||
|
||||
----
|
||||
### Text-Formatierung
|
||||
```**Bold**```
|
||||
**Bold**
|
||||
|
||||
```*Italic*```
|
||||
*Italic*
|
||||
|
||||
```~~Strikethrough~~```
|
||||
~~Strikethrough~~
|
||||
|
||||
-----
|
||||
### Listen
|
||||
```
|
||||
- Listenpunkt1
|
||||
- Listenpunkt2
|
||||
- Listenpunkt3
|
||||
```
|
||||
- Listenpunkt1
|
||||
- Listenpunkt2
|
||||
- Listenpunkt3
|
||||
|
||||
```
|
||||
1. James Madison
|
||||
2. James Monroe
|
||||
3. John Quincy Adams
|
||||
```
|
||||
1. James Madison
|
||||
2. James Monroe
|
||||
3. John Quincy Adams
|
||||
|
||||
```
|
||||
1. Make my changes
|
||||
1. Fix bug
|
||||
2. Improve formatting
|
||||
* Make the headings bigger
|
||||
2. Push my commits to GitHub
|
||||
3. Open a pull request
|
||||
* Describe my changes
|
||||
* Mention all the members of my team
|
||||
* Ask for feedback
|
||||
```
|
||||
|
||||
1. Make my changes
|
||||
1. Fix bug
|
||||
2. Improve formatting
|
||||
* Make the headings bigger
|
||||
2. Push my commits to GitHub
|
||||
3. Open a pull request
|
||||
* Describe my changes
|
||||
* Mention all the members of my team
|
||||
* Ask for feedback
|
||||
|
||||
-----
|
||||
### Zitate
|
||||
|
||||
```
|
||||
In the words of Abraham Lincoln:
|
||||
> Pardon my French
|
||||
```
|
||||
|
||||
In the words of Abraham Lincoln:
|
||||
> Pardon my French
|
||||
|
||||
-----
|
||||
### Links
|
||||
|
||||
Syntax:
|
||||
`[Link Text](http://www.link.de)`
|
||||
|
||||
**Beispiel Externer Link:**
|
||||
```
|
||||
Dies ist ein Beispiel [Link Text](http://www.link.de).
|
||||
```
|
||||
|
||||
Ausgabe:
|
||||
Dies ist ein Beispiel [Link Text](http://www.link.de).
|
||||
|
||||
**Beispiel Interner Wiki Link:**
|
||||
```
|
||||
Hier geht es zur [Startseite](/start).
|
||||
```
|
||||
|
||||
Ausgabe:
|
||||
Hier geht es zur [Startseite](/start).
|
||||
|
||||
-----
|
||||
### Bilder
|
||||
|
||||
Syntax:
|
||||
`[]`
|
||||
|
||||
Beispiel:
|
||||
```
|
||||
[]
|
||||
```
|
||||
|
||||
Ausgabe:
|
||||
[](http://www.frickelblog.de)
|
||||
|
||||
Alternativ: Bild mit Link:
|
||||
`[](http://www.frickelblog.de)`
|
||||
|
||||
-----
|
||||
### Emojis
|
||||
|
||||
|
||||
**People:**
|
||||
|
||||
:smile:
|
||||
:laughing:
|
||||
:blush:
|
||||
:smiley:
|
||||
:relaxed:
|
||||
:smirk:
|
||||
:heart_eyes:
|
||||
:kissing_heart:
|
||||
:kissing_closed_eyes:
|
||||
:flushed:
|
||||
:relieved:
|
||||
:grin:
|
||||
:wink:
|
||||
:stuck_out_tongue_winking_eye:
|
||||
:stuck_out_tongue_closed_eyes:
|
||||
:grinning:
|
||||
:kissing:
|
||||
:kissing_smiling_eyes:
|
||||
:stuck_out_tongue:
|
||||
:sleeping:
|
||||
:worried:
|
||||
:frowning:
|
||||
:anguished:
|
||||
:open_mouth:
|
||||
:grimacing:
|
||||
:confused:
|
||||
:hushed:
|
||||
:expressionless:
|
||||
:unamused:
|
||||
:sweat_smile:
|
||||
:sweat:
|
||||
:disappointed_relieved:
|
||||
:weary:
|
||||
:pensive:
|
||||
:disappointed:
|
||||
:confounded:
|
||||
:fearful:
|
||||
:cold_sweat:
|
||||
:persevere:
|
||||
:cry:
|
||||
:sob:
|
||||
:joy:
|
||||
:astonished:
|
||||
:scream:
|
||||
:tired_face:
|
||||
:angry:
|
||||
:rage:
|
||||
:triumph:
|
||||
:sleepy:
|
||||
:yum:
|
||||
:mask:
|
||||
:sunglasses:
|
||||
:dizzy_face:
|
||||
:imp:
|
||||
:smiling_imp:
|
||||
:neutral_face:
|
||||
:no_mouth:
|
||||
:innocent:
|
||||
:alien:
|
||||
:yellow_heart:
|
||||
:blue_heart:
|
||||
:purple_heart:
|
||||
:heart:
|
||||
:green_heart:
|
||||
:broken_heart:
|
||||
:heartbeat:
|
||||
:heartpulse:
|
||||
:two_hearts:
|
||||
:revolving_hearts:
|
||||
:cupid:
|
||||
:sparkling_heart:
|
||||
:sparkles:
|
||||
:star:
|
||||
:star2:
|
||||
:dizzy:
|
||||
:boom:
|
||||
:anger:
|
||||
:exclamation:
|
||||
:question:
|
||||
:grey_exclamation:
|
||||
:grey_question:
|
||||
:zzz:
|
||||
:dash:
|
||||
:sweat_drops:
|
||||
:notes:
|
||||
:musical_note:
|
||||
:fire:
|
||||
:hankey:
|
||||
:+1:
|
||||
:-1:
|
||||
:ok_hand:
|
||||
:v:
|
||||
:wave:
|
||||
:hand:
|
||||
:open_hands:
|
||||
:point_up:
|
||||
:point_down:
|
||||
:point_left:
|
||||
:point_right:
|
||||
:raised_hands:
|
||||
:pray:
|
||||
:point_up_2:
|
||||
:clap:
|
||||
:muscle:
|
||||
:metal:
|
||||
:couple:
|
||||
:two_men_holding_hands:
|
||||
:two_women_holding_hands:
|
||||
:dancer:
|
||||
:ok_woman:
|
||||
:bride_with_veil:
|
||||
:nail_care:
|
||||
:boy:
|
||||
:girl:
|
||||
:woman:
|
||||
:man:
|
||||
:baby:
|
||||
:older_woman:
|
||||
:older_man:
|
||||
:man_with_gua_pi_mao:
|
||||
:man_with_turban:
|
||||
:angel:
|
||||
:princess:
|
||||
:smiley_cat:
|
||||
:smile_cat:
|
||||
:heart_eyes_cat:
|
||||
:kissing_cat:
|
||||
:smirk_cat:
|
||||
:scream_cat:
|
||||
:crying_cat_face:
|
||||
:joy_cat:
|
||||
:pouting_cat:
|
||||
:japanese_ogre:
|
||||
:japanese_goblin:
|
||||
:see_no_evil:
|
||||
:hear_no_evil:
|
||||
:speak_no_evil:
|
||||
:guardsman:
|
||||
:skull:
|
||||
:feet:
|
||||
:lips:
|
||||
:kiss:
|
||||
:droplet:
|
||||
:ear:
|
||||
:eyes:
|
||||
:nose:
|
||||
:tongue:
|
||||
:love_letter:
|
||||
:bust_in_silhouette:
|
||||
:busts_in_silhouette:
|
||||
:speech_balloon:
|
||||
:thought_balloon:
|
||||
|
||||
|
||||
**Nature:**
|
||||
|
||||
:sunny:
|
||||
:umbrella:
|
||||
:cloud:
|
||||
:snowflake:
|
||||
:snowman:
|
||||
:zap:
|
||||
:cyclone:
|
||||
:foggy:
|
||||
:ocean:
|
||||
:cat:
|
||||
:dog:
|
||||
:mouse:
|
||||
:hamster:
|
||||
:rabbit:
|
||||
:wolf:
|
||||
:frog:
|
||||
:tiger:
|
||||
:koala:
|
||||
:bear:
|
||||
:pig:
|
||||
:pig_nose:
|
||||
:cow:
|
||||
:boar:
|
||||
:monkey_face:
|
||||
:monkey:
|
||||
:horse:
|
||||
:racehorse:
|
||||
:camel:
|
||||
:sheep:
|
||||
:elephant:
|
||||
:panda_face:
|
||||
:snake:
|
||||
:bird:
|
||||
:baby_chick:
|
||||
:hatched_chick:
|
||||
:hatching_chick:
|
||||
:chicken:
|
||||
:penguin:
|
||||
:turtle:
|
||||
:bug:
|
||||
:ant:
|
||||
:beetle:
|
||||
:snail:
|
||||
:octopus:
|
||||
:tropical_fish:
|
||||
:fish:
|
||||
:whale:
|
||||
:whale2:
|
||||
:dolphin:
|
||||
:cow2:
|
||||
:ram:
|
||||
:rat:
|
||||
:water_buffalo:
|
||||
:tiger2:
|
||||
:rabbit2:
|
||||
:dragon:
|
||||
:goat:
|
||||
:rooster:
|
||||
:dog2:
|
||||
:pig2:
|
||||
:mouse2:
|
||||
:ox:
|
||||
:dragon_face:
|
||||
:blowfish:
|
||||
:crocodile:
|
||||
:dromedary_camel:
|
||||
:leopard:
|
||||
:cat2:
|
||||
:poodle:
|
||||
:bouquet:
|
||||
:cherry_blossom:
|
||||
:tulip:
|
||||
:four_leaf_clover:
|
||||
:rose:
|
||||
:sunflower:
|
||||
:hibiscus:
|
||||
:maple_leaf:
|
||||
:leaves:
|
||||
:fallen_leaf:
|
||||
:herb:
|
||||
:mushroom:
|
||||
:cactus:
|
||||
:palm_tree:
|
||||
:evergreen_tree:
|
||||
:deciduous_tree:
|
||||
:chestnut:
|
||||
:seedling:
|
||||
:blossom:
|
||||
:ear_of_rice:
|
||||
:shell:
|
||||
:globe_with_meridians:
|
||||
:sun_with_face:
|
||||
:full_moon_with_face:
|
||||
:new_moon_with_face:
|
||||
:new_moon:
|
||||
:waxing_crescent_moon:
|
||||
:first_quarter_moon:
|
||||
:full_moon:
|
||||
:last_quarter_moon:
|
||||
:waning_crescent_moon:
|
||||
:last_quarter_moon_with_face:
|
||||
:first_quarter_moon_with_face:
|
||||
:moon:
|
||||
:earth_africa:
|
||||
:earth_americas:
|
||||
:earth_asia:
|
||||
:volcano:
|
||||
:milky_way:
|
||||
:partly_sunny:
|
||||
|
||||
|
||||
**Objects:**
|
||||
|
||||
:bamboo:
|
||||
:gift_heart:
|
||||
:dolls:
|
||||
:school_satchel:
|
||||
:mortar_board:
|
||||
:flags:
|
||||
:fireworks:
|
||||
:sparkler:
|
||||
:wind_chime:
|
||||
:rice_scene:
|
||||
:jack_o_lantern:
|
||||
:ghost:
|
||||
:santa:
|
||||
:christmas_tree:
|
||||
:gift:
|
||||
:bell:
|
||||
:no_bell:
|
||||
:tanabata_tree:
|
||||
:tada:
|
||||
:confetti_ball:
|
||||
:balloon:
|
||||
:crystal_ball:
|
||||
:cd:
|
||||
:dvd:
|
||||
:floppy_disk:
|
||||
:camera:
|
||||
:video_camera:
|
||||
:movie_camera:
|
||||
:computer:
|
||||
:tv:
|
||||
:iphone:
|
||||
:phone:
|
||||
:telephone_receiver:
|
||||
:pager:
|
||||
:fax:
|
||||
:minidisc:
|
||||
:vhs:
|
||||
:sound:
|
||||
:speaker:
|
||||
:mute:
|
||||
:loudspeaker:
|
||||
:mega:
|
||||
:hourglass:
|
||||
:hourglass_flowing_sand:
|
||||
:alarm_clock:
|
||||
:watch:
|
||||
:radio:
|
||||
:satellite:
|
||||
:loop:
|
||||
:mag:
|
||||
:mag_right:
|
||||
:unlock:
|
||||
:lock:
|
||||
:lock_with_ink_pen:
|
||||
:closed_lock_with_key:
|
||||
:key:
|
||||
:bulb:
|
||||
:flashlight:
|
||||
:high_brightness:
|
||||
:low_brightness:
|
||||
:electric_plug:
|
||||
:battery:
|
||||
:calling:
|
||||
:email:
|
||||
:mailbox:
|
||||
:postbox:
|
||||
:bath:
|
||||
:bathtub:
|
||||
:shower:
|
||||
:toilet:
|
||||
:wrench:
|
||||
:nut_and_bolt:
|
||||
:hammer:
|
||||
:seat:
|
||||
:moneybag:
|
||||
:yen:
|
||||
:dollar:
|
||||
:pound:
|
||||
:euro:
|
||||
:credit_card:
|
||||
:money_with_wings:
|
||||
:e-mail:
|
||||
:inbox_tray:
|
||||
:outbox_tray:
|
||||
:incoming_envelope:
|
||||
:postal_horn:
|
||||
:mailbox_closed:
|
||||
:mailbox_with_mail:
|
||||
:mailbox_with_no_mail:
|
||||
:package:
|
||||
:door:
|
||||
:smoking:
|
||||
:bomb:
|
||||
:gun:
|
||||
:hocho:
|
||||
:pill:
|
||||
:syringe:
|
||||
:page_facing_up:
|
||||
:page_with_curl:
|
||||
:bookmark_tabs:
|
||||
:bar_chart:
|
||||
:chart_with_upwards_trend:
|
||||
:chart_with_downwards_trend:
|
||||
:scroll:
|
||||
:clipboard:
|
||||
:calendar:
|
||||
:date:
|
||||
:card_index:
|
||||
:file_folder:
|
||||
:open_file_folder:
|
||||
:scissors:
|
||||
:pushpin:
|
||||
:paperclip:
|
||||
:black_nib:
|
||||
:pencil2:
|
||||
:straight_ruler:
|
||||
:triangular_ruler:
|
||||
:closed_book:
|
||||
:green_book:
|
||||
:blue_book:
|
||||
:orange_book:
|
||||
:notebook:
|
||||
:notebook_with_decorative_cover:
|
||||
:ledger:
|
||||
:books:
|
||||
:bookmark:
|
||||
:name_badge:
|
||||
:microscope:
|
||||
:telescope:
|
||||
:newspaper:
|
||||
:football:
|
||||
:basketball:
|
||||
:soccer:
|
||||
:baseball:
|
||||
:tennis:
|
||||
:8ball:
|
||||
:rugby_football:
|
||||
:bowling:
|
||||
:golf:
|
||||
:horse_racing:
|
||||
:snowboarder:
|
||||
:ski:
|
||||
:spades:
|
||||
:hearts:
|
||||
:clubs:
|
||||
:diamonds:
|
||||
:gem:
|
||||
:ring:
|
||||
:trophy:
|
||||
:musical_score:
|
||||
:musical_keyboard:
|
||||
:violin:
|
||||
:space_invader:
|
||||
:video_game:
|
||||
:black_joker:
|
||||
:flower_playing_cards:
|
||||
:game_die:
|
||||
:dart:
|
||||
:mahjong:
|
||||
:clapper:
|
||||
:memo:
|
||||
:book:
|
||||
:art:
|
||||
:microphone:
|
||||
:headphones:
|
||||
:trumpet:
|
||||
:saxophone:
|
||||
:guitar:
|
||||
:sandal:
|
||||
:high_heel:
|
||||
:lipstick:
|
||||
:boot:
|
||||
:shirt:
|
||||
:necktie:
|
||||
:womans_clothes:
|
||||
:dress:
|
||||
:running_shirt_with_sash:
|
||||
:jeans:
|
||||
:kimono:
|
||||
:bikini:
|
||||
:ribbon:
|
||||
:tophat:
|
||||
:crown:
|
||||
:womans_hat:
|
||||
:mans_shoe:
|
||||
:closed_umbrella:
|
||||
:briefcase:
|
||||
:handbag:
|
||||
:pouch:
|
||||
:purse:
|
||||
:eyeglasses:
|
||||
:fishing_pole_and_fish:
|
||||
:coffee:
|
||||
:tea:
|
||||
:sake:
|
||||
:baby_bottle:
|
||||
:beer:
|
||||
:beers:
|
||||
:cocktail:
|
||||
:tropical_drink:
|
||||
:wine_glass:
|
||||
:fork_and_knife:
|
||||
:pizza:
|
||||
:hamburger:
|
||||
:fries:
|
||||
:poultry_leg:
|
||||
:meat_on_bone:
|
||||
:spaghetti:
|
||||
:curry:
|
||||
:fried_shrimp:
|
||||
:bento:
|
||||
:sushi:
|
||||
:fish_cake:
|
||||
:rice_ball:
|
||||
:rice_cracker:
|
||||
:rice:
|
||||
:ramen:
|
||||
:stew:
|
||||
:oden:
|
||||
:dango:
|
||||
:egg:
|
||||
:bread:
|
||||
:doughnut:
|
||||
:custard:
|
||||
:icecream:
|
||||
:ice_cream:
|
||||
:shaved_ice:
|
||||
:birthday:
|
||||
:cake:
|
||||
:cookie:
|
||||
:chocolate_bar:
|
||||
:candy:
|
||||
:lollipop:
|
||||
:honey_pot:
|
||||
:apple:
|
||||
:green_apple:
|
||||
:tangerine:
|
||||
:lemon:
|
||||
:cherries:
|
||||
:grapes:
|
||||
:watermelon:
|
||||
:strawberry:
|
||||
:peach:
|
||||
:melon:
|
||||
:banana:
|
||||
:pear:
|
||||
:pineapple:
|
||||
:sweet_potato:
|
||||
:eggplant:
|
||||
:tomato:
|
||||
:corn:
|
||||
|
||||
|
||||
**Places:**
|
||||
|
||||
:house:
|
||||
:house_with_garden:
|
||||
:school:
|
||||
:office:
|
||||
:post_office:
|
||||
:hospital:
|
||||
:bank:
|
||||
:convenience_store:
|
||||
:love_hotel:
|
||||
:hotel:
|
||||
:wedding:
|
||||
:church:
|
||||
:department_store:
|
||||
:european_post_office:
|
||||
:city_sunrise:
|
||||
:city_sunset:
|
||||
:japanese_castle:
|
||||
:european_castle:
|
||||
:tent:
|
||||
:factory:
|
||||
:tokyo_tower:
|
||||
:japan:
|
||||
:mount_fuji:
|
||||
:sunrise_over_mountains:
|
||||
:sunrise:
|
||||
:stars:
|
||||
:statue_of_liberty:
|
||||
:bridge_at_night:
|
||||
:carousel_horse:
|
||||
:rainbow:
|
||||
:ferris_wheel:
|
||||
:fountain:
|
||||
:roller_coaster:
|
||||
:ship:
|
||||
:speedboat:
|
||||
:boat:
|
||||
:anchor:
|
||||
:rocket:
|
||||
:airplane:
|
||||
:helicopter:
|
||||
:steam_locomotive:
|
||||
:tram:
|
||||
:mountain_railway:
|
||||
:bike:
|
||||
:aerial_tramway:
|
||||
:suspension_railway:
|
||||
:mountain_cableway:
|
||||
:tractor:
|
||||
:blue_car:
|
||||
:oncoming_automobile:
|
||||
:car:
|
||||
:taxi:
|
||||
:oncoming_taxi:
|
||||
:articulated_lorry:
|
||||
:bus:
|
||||
:oncoming_bus:
|
||||
:rotating_light:
|
||||
:police_car:
|
||||
:oncoming_police_car:
|
||||
:fire_engine:
|
||||
:ambulance:
|
||||
:minibus:
|
||||
:truck:
|
||||
:train:
|
||||
:station:
|
||||
:train2:
|
||||
:bullettrain_front:
|
||||
:bullettrain_side:
|
||||
:light_rail:
|
||||
:monorail:
|
||||
:railway_car:
|
||||
:trolleybus:
|
||||
:ticket:
|
||||
:fuelpump:
|
||||
:vertical_traffic_light:
|
||||
:traffic_light:
|
||||
:warning:
|
||||
:construction:
|
||||
:beginner:
|
||||
:atm:
|
||||
:slot_machine:
|
||||
:busstop:
|
||||
:barber:
|
||||
:hotsprings:
|
||||
:checkered_flag:
|
||||
:crossed_flags:
|
||||
:izakaya_lantern:
|
||||
:moyai:
|
||||
:circus_tent:
|
||||
:performing_arts:
|
||||
:round_pushpin:
|
||||
:triangular_flag_on_post:
|
||||
|
||||
|
||||
**Symbols:**
|
||||
|
||||
:keycap_ten:
|
||||
:1234:
|
||||
:symbols:
|
||||
:arrow_backward:
|
||||
:arrow_down:
|
||||
:arrow_forward:
|
||||
:arrow_left:
|
||||
:capital_abcd:
|
||||
:abcd:
|
||||
:abc:
|
||||
:arrow_lower_left:
|
||||
:arrow_lower_right:
|
||||
:arrow_right:
|
||||
:arrow_up:
|
||||
:arrow_upper_left:
|
||||
:arrow_upper_right:
|
||||
:arrow_double_down:
|
||||
:arrow_double_up:
|
||||
:arrow_down_small:
|
||||
:arrow_heading_down:
|
||||
:arrow_heading_up:
|
||||
:leftwards_arrow_with_hook:
|
||||
:arrow_right_hook:
|
||||
:left_right_arrow:
|
||||
:arrow_up_down:
|
||||
:arrow_up_small:
|
||||
:arrows_clockwise:
|
||||
:arrows_counterclockwise:
|
||||
:rewind:
|
||||
:fast_forward:
|
||||
:information_source:
|
||||
:ok:
|
||||
:twisted_rightwards_arrows:
|
||||
:repeat:
|
||||
:repeat_one:
|
||||
:new:
|
||||
:top:
|
||||
:up:
|
||||
:cool:
|
||||
:free:
|
||||
:ng:
|
||||
:cinema:
|
||||
:koko:
|
||||
:signal_strength:
|
||||
:u5272:
|
||||
:u5408:
|
||||
:u55b6:
|
||||
:u6307:
|
||||
:u6708:
|
||||
:u6709:
|
||||
:u6e80:
|
||||
:u7121:
|
||||
:u7533:
|
||||
:u7a7a:
|
||||
:u7981:
|
||||
:sa:
|
||||
:restroom:
|
||||
:mens:
|
||||
:womens:
|
||||
:baby_symbol:
|
||||
:no_smoking:
|
||||
:parking:
|
||||
:wheelchair:
|
||||
:metro:
|
||||
:baggage_claim:
|
||||
:accept:
|
||||
:wc:
|
||||
:potable_water:
|
||||
:put_litter_in_its_place:
|
||||
:secret:
|
||||
:congratulations:
|
||||
:m:
|
||||
:passport_control:
|
||||
:left_luggage:
|
||||
:customs:
|
||||
:ideograph_advantage:
|
||||
:cl:
|
||||
:sos:
|
||||
:id:
|
||||
:no_entry_sign:
|
||||
:underage:
|
||||
:no_mobile_phones:
|
||||
:do_not_litter:
|
||||
:non-potable_water:
|
||||
:no_bicycles:
|
||||
:no_pedestrians:
|
||||
:children_crossing:
|
||||
:no_entry:
|
||||
:eight_spoked_asterisk:
|
||||
:sparkle:
|
||||
:eight_pointed_black_star:
|
||||
:heart_decoration:
|
||||
:vs:
|
||||
:vibration_mode:
|
||||
:mobile_phone_off:
|
||||
:chart:
|
||||
:currency_exchange:
|
||||
:aries:
|
||||
:taurus:
|
||||
:gemini:
|
||||
:cancer:
|
||||
:leo:
|
||||
:virgo:
|
||||
:libra:
|
||||
:scorpius:
|
||||
:sagittarius:
|
||||
:capricorn:
|
||||
:aquarius:
|
||||
:pisces:
|
||||
:ophiuchus:
|
||||
:six_pointed_star:
|
||||
:negative_squared_cross_mark:
|
||||
:a:
|
||||
:b:
|
||||
:ab:
|
||||
:o2:
|
||||
:diamond_shape_with_a_dot_inside:
|
||||
:recycle:
|
||||
:end:
|
||||
:back:
|
||||
:on:
|
||||
:soon:
|
||||
:clock1:
|
||||
:clock130:
|
||||
:clock10:
|
||||
:clock1030:
|
||||
:clock11:
|
||||
:clock1130:
|
||||
:clock12:
|
||||
:clock1230:
|
||||
:clock2:
|
||||
:clock230:
|
||||
:clock3:
|
||||
:clock330:
|
||||
:clock4:
|
||||
:clock430:
|
||||
:clock5:
|
||||
:clock530:
|
||||
:clock6:
|
||||
:clock630:
|
||||
:clock7:
|
||||
:clock730:
|
||||
:clock8:
|
||||
:clock830:
|
||||
:clock9:
|
||||
:clock930:
|
||||
:heavy_dollar_sign:
|
||||
:copyright:
|
||||
:registered:
|
||||
:tm:
|
||||
:x:
|
||||
:bangbang:
|
||||
:interrobang:
|
||||
:o:
|
||||
:heavy_multiplication_x:
|
||||
:heavy_plus_sign:
|
||||
:heavy_minus_sign:
|
||||
:heavy_division_sign:
|
||||
:white_flower:
|
||||
:100:
|
||||
:heavy_check_mark:
|
||||
:ballot_box_with_check:
|
||||
:radio_button:
|
||||
:link:
|
||||
:curly_loop:
|
||||
:wavy_dash:
|
||||
:part_alternation_mark:
|
||||
:trident:
|
||||
:black_small_square:
|
||||
:white_small_square:
|
||||
:black_medium_small_square:
|
||||
:white_medium_small_square:
|
||||
:black_medium_square:
|
||||
:white_medium_square:
|
||||
:black_large_square:
|
||||
:white_large_square:
|
||||
:white_check_mark:
|
||||
:black_square_button:
|
||||
:white_square_button:
|
||||
:black_circle:
|
||||
:white_circle:
|
||||
:red_circle:
|
||||
:large_blue_circle:
|
||||
:large_blue_diamond:
|
||||
:large_orange_diamond:
|
||||
:small_blue_diamond:
|
||||
:small_orange_diamond:
|
||||
:small_red_triangle:
|
||||
:small_red_triangle_down:
|
||||
|
||||
-----
|
||||
### ToDo-Listen
|
||||
|
||||
```
|
||||
- [x] ToDo 1
|
||||
- [ ] ToDo 2
|
||||
- [ ] ToDo 3
|
||||
```
|
||||
- [x] ToDo 1
|
||||
- [ ] ToDo 2
|
||||
- [ ] ToDo 3
|
||||
|
||||
-----
|
||||
### Tabellen (Pipe-Style)
|
||||
|
||||
```
|
||||
|Right | Left | Default | Center |
|
||||
|-----:|:-----|---------|:------:|
|
||||
| 12 | 12 | 12 | 12 |
|
||||
| 123 | 123 | 123 | 123 |
|
||||
| 1 | 1 | 1 | 1 |
|
||||
```
|
||||
|
||||
|Right | Left | Default | Center |
|
||||
|-----:|:-----|---------|:------:|
|
||||
| 12 | 12 | 12 | 12 |
|
||||
| 123 | 123 | 123 | 123 |
|
||||
| 1 | 1 | 1 | 1 |
|
||||
|
||||
|
||||
-----
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# Testseite
|
||||
|
||||
-----
|
||||
|
||||
Eine Liste:
|
||||
* Ein Listenpunkt
|
||||
* Ein zweiter Listenpunkt
|
||||
* Der dritte Listenpunkt
|
||||
* Noch ein vierter Listenpunkt
|
||||
|
||||
-----
|
||||
|
||||
Code im Tag: `code code code`
|
||||
|
||||
-----
|
||||
|
||||
**FETT**
|
||||
_kursiv_
|
||||
~~durchgestrichen~~
|
||||
|
||||
-----
|
||||
|
||||
* listenpunkt `1`
|
||||
* listenpunkt `1.1`
|
||||
* listenpunkt `2`
|
||||
* listenpunkt `2.1`
|
||||
* listenpunkt `3`
|
||||
* listenpunkt `3.1`
|
||||
|
||||
-----
|
||||
|
||||
**Mehrzeiliger Code**
|
||||
Code kann auch Mehrzeilig erfolgen, z.B:
|
||||
```
|
||||
{
|
||||
"Host":"http://127.0.0.1",
|
||||
"Port":"8000",
|
||||
"IMGPath":"./data"
|
||||
}
|
||||
```
|
||||
|
||||
-----
|
||||
@@ -0,0 +1,4 @@
|
||||
**Sidebar**
|
||||
|
||||
[Start](/start)
|
||||
[Hilfe](/hilfe)
|
||||
@@ -0,0 +1,23 @@
|
||||
# GoWiki
|
||||
|
||||
## Startseite
|
||||
|
||||
Ein kleines, in Go gebasteltes Wiki.
|
||||
Jede Seite kann über den `Edit` Button oben rechts in der Ecke bearbeitet werden.
|
||||
Der Obere Teil der Sidebar kommt aus der Datei `sidebar.md` (kann auch über den Link: [/sidebar](/sidebar) aufgerufen werden).
|
||||
Der untere Teil der Sidebar wird dynmaisch zur Laufzeit generiert und spiegelt den Inhalt des `data`-Ordners wieder.
|
||||
|
||||
Eine Hilfe der Markdown-Syntax kann man unter [/hilfe](/hilfe) einsehen.
|
||||
Unter [/playground](/playground) gibt es eine Test-Seite zum Testen.
|
||||
|
||||
Standardmäßig wird das Wiki unter der `http://127.0.0.1` und dem Port `8000` gesartet und verwendet die `*.md` Files, welche sich im Unterverzeichnis `./data` befinden.
|
||||
Diese Einstellungen können durch eine `config.json` im Start-Verzeichnis geändert werden:
|
||||
|
||||
Eine `config.json` könnte z.B. wie folgt aussehen:
|
||||
```
|
||||
{
|
||||
"Host":"http://127.0.0.1",
|
||||
"Port":"8000",
|
||||
"DataPath":"./data"
|
||||
}
|
||||
```
|
||||
Reference in new issue
Block a user