diff --git a/LICENSE.md b/_stuff/LICENSE.md similarity index 100% rename from LICENSE.md rename to _stuff/LICENSE.md diff --git a/README.md b/_stuff/README.md similarity index 100% rename from README.md rename to _stuff/README.md diff --git a/routes/editor/get.go b/_stuff/editor.go similarity index 95% rename from routes/editor/get.go rename to _stuff/editor.go index e68cbf51..5295d209 100644 --- a/routes/editor/get.go +++ b/_stuff/editor.go @@ -1,4 +1,4 @@ -package editor +package hugo import ( "bytes" @@ -10,7 +10,6 @@ import ( "strings" "text/template" - "github.com/hacdias/caddy-hugo/config" "github.com/hacdias/caddy-hugo/tools/frontmatter" "github.com/hacdias/caddy-hugo/tools/templates" "github.com/hacdias/caddy-hugo/tools/variables" @@ -24,11 +23,11 @@ type editor struct { Mode string Content string FrontMatter interface{} - Config *config.Config + Config *Config } // GET handles the GET method on editor page -func GET(w http.ResponseWriter, r *http.Request, c *config.Config, filename string) (int, error) { +func GET(w http.ResponseWriter, r *http.Request, c *Config, filename string) (int, error) { // Check if the file format is supported. If not, send a "Not Acceptable" // header and an error if !templates.CanBeEdited(filename) { diff --git a/_stuff/git.go b/_stuff/git.go new file mode 100644 index 00000000..5e918f88 --- /dev/null +++ b/_stuff/git.go @@ -0,0 +1,66 @@ +package hugo + +import ( + "bytes" + "encoding/json" + "net/http" + "os/exec" + "strings" +) + +// HandleGit handles the POST method on GIT page which is only an API. +func HandleGit(w http.ResponseWriter, r *http.Request, c *Config) (int, error) { + response := &Response{ + Code: http.StatusOK, + Err: nil, + Content: "OK", + } + + // Check if git is installed on the computer + if _, err := exec.LookPath("git"); err != nil { + response.Code = http.StatusNotImplemented + response.Content = "Git is not installed on your computer." + return response.Send(w) + } + + // Get the JSON information sent using a buffer + buff := new(bytes.Buffer) + buff.ReadFrom(r.Body) + + // Creates the raw file "map" using the JSON + var info map[string]interface{} + json.Unmarshal(buff.Bytes(), &info) + + // Check if command was sent + if _, ok := info["command"]; !ok { + response.Code = http.StatusBadRequest + response.Content = "Command not specified." + return response.Send(w) + } + + command := info["command"].(string) + args := strings.Split(command, " ") + + if len(args) > 0 && args[0] == "git" { + args = append(args[:0], args[1:]...) + } + + if len(args) == 0 { + response.Code = http.StatusBadRequest + response.Content = "Command not specified." + return response.Send(w) + } + + cmd := exec.Command("git", args...) + cmd.Dir = c.Path + output, err := cmd.CombinedOutput() + + if err != nil { + response.Code = http.StatusInternalServerError + response.Content = err.Error() + return response.Send(w) + } + + response.Content = string(output) + return response.Send(w) +} diff --git a/_stuff/hugo.go b/_stuff/hugo.go new file mode 100644 index 00000000..187064a9 --- /dev/null +++ b/_stuff/hugo.go @@ -0,0 +1,98 @@ +// Package hugo makes the bridge between the static website generator Hugo +// and the webserver Caddy, also providing an administrative user interface. +package hugo + +import ( + "net/http" + "net/url" + "os" + "path/filepath" + "strings" + + "github.com/hacdias/caddy-filemanager" + "github.com/mholt/caddy/caddyhttp/httpserver" +) + +// Hugo contais the next middleware to be run and the configuration +// of the current one. +type Hugo struct { + FileManager *filemanager.FileManager + Next httpserver.Handler + Config *Config +} + +// ServeHTTP is the main function of the whole plugin that routes every single +// request to its function. +func (h Hugo) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) { + // Check if the current request if for this plugin + if httpserver.Path(r.URL.Path).Matches(h.Config.Admin) { + // If this request requires a raw file or a download, return the FileManager + query := r.URL.Query() + if val, ok := query["raw"]; ok && val[0] == "true" { + return h.FileManager.ServeHTTP(w, r) + } + + if val, ok := query["download"]; ok && val[0] == "true" { + return h.FileManager.ServeHTTP(w, r) + } + + // If the url matches exactly with /{admin}/settings/, redirect + // to the page of the configuration file + if r.URL.Path == h.Config.Admin+"/settings/" { + var frontmatter string + + if _, err := os.Stat(h.Config.Path + "config.yaml"); err == nil { + frontmatter = "yaml" + } + + if _, err := os.Stat(h.Config.Path + "config.json"); err == nil { + frontmatter = "json" + } + + if _, err := os.Stat(h.Config.Path + "config.toml"); err == nil { + frontmatter = "toml" + } + + http.Redirect(w, r, h.Config.Admin+"/config."+frontmatter, http.StatusTemporaryRedirect) + return 0, nil + } + + filename := strings.Replace(r.URL.Path, c.Admin+"/edit/", "", 1) + filename = c.Path + filename + + if strings.HasPrefix(r.URL.Path, h.Config.Admin+"/api/git/") && r.Method == http.MethodPost { + return HandleGit(w, r, h.Config) + } + + if h.ShouldHandle(r.URL) { + // return editor + return 0, nil + } + + return h.FileManager.ServeHTTP(w, r) + } + + return h.Next.ServeHTTP(w, r) +} + +var extensions = []string{ + "md", "markdown", "mdown", "mmark", + "asciidoc", "adoc", "ad", + "rst", + "html", "htm", + "js", + "toml", "yaml", "json", +} + +// ShouldHandle checks if this extension should be handled by this plugin +func (h Hugo) ShouldHandle(url *url.URL) bool { + extension := strings.TrimPrefix(filepath.Ext(url.Path), ".") + + for _, ext := range extensions { + if ext == extension { + return true + } + } + + return false +} diff --git a/_stuff/page.go b/_stuff/page.go new file mode 100644 index 00000000..12cf60b1 --- /dev/null +++ b/_stuff/page.go @@ -0,0 +1,119 @@ +package hugo + +import ( + "encoding/json" + "html/template" + "log" + "net/http" + "strings" +) + +// Page contains the informations and functions needed to show the page +type Page struct { + Info *PageInfo +} + +// PageInfo contains the information of a page +type PageInfo struct { + Name string + Path string + IsDir bool + Config *Config + Data interface{} +} + +// BreadcrumbMap returns p.Path where every element is a map +// of URLs and path segment names. +func (p PageInfo) BreadcrumbMap() map[string]string { + result := map[string]string{} + + if len(p.Path) == 0 { + return result + } + + // skip trailing slash + lpath := p.Path + if lpath[len(lpath)-1] == '/' { + lpath = lpath[:len(lpath)-1] + } + + parts := strings.Split(lpath, "/") + for i, part := range parts { + if i == 0 && part == "" { + // Leading slash (root) + result["/"] = "/" + continue + } + result[strings.Join(parts[:i+1], "/")] = part + } + + return result +} + +// PreviousLink returns the path of the previous folder +func (p PageInfo) PreviousLink() string { + parts := strings.Split(strings.TrimSuffix(p.Path, "/"), "/") + if len(parts) <= 1 { + return "" + } + + if parts[len(parts)-2] == "" { + if p.Config.BaseURL == "" { + return "/" + } + return p.Config.BaseURL + } + + return parts[len(parts)-2] +} + +// PrintAsHTML formats the page in HTML and executes the template +func (p Page) PrintAsHTML(w http.ResponseWriter, templates ...string) (int, error) { + templates = append(templates, "actions", "base") + var tpl *template.Template + + // For each template, add it to the the tpl variable + for i, t := range templates { + // Get the template from the assets + page, err := Asset("templates/" + t + ".tmpl") + + // Check if there is some error. If so, the template doesn't exist + if err != nil { + log.Print(err) + return http.StatusInternalServerError, err + } + + // If it's the first iteration, creates a new template and add the + // functions map + if i == 0 { + tpl, err = template.New(t).Parse(string(page)) + } else { + tpl, err = tpl.Parse(string(page)) + } + + if err != nil { + log.Print(err) + return http.StatusInternalServerError, err + } + } + + w.Header().Set("Content-Type", "text/html; charset=utf-8") + err := tpl.Execute(w, p.Info) + + if err != nil { + return http.StatusInternalServerError, err + } + + return http.StatusOK, nil +} + +// PrintAsJSON prints the current page infromation in JSON +func (p Page) PrintAsJSON(w http.ResponseWriter) (int, error) { + marsh, err := json.Marshal(p.Info.Data) + if err != nil { + return http.StatusInternalServerError, err + } + + w.Header().Set("Content-Type", "application/json; charset=utf-8") + return w.Write(marsh) +} diff --git a/_stuff/response.go b/_stuff/response.go new file mode 100644 index 00000000..7bde4863 --- /dev/null +++ b/_stuff/response.go @@ -0,0 +1,28 @@ +package hugo + +import ( + "encoding/json" + "net/http" +) + +// Response conta +type Response struct { + Code int + Err error + Content string +} + +// Send used to send JSON responses to the web server +func (r *Response) Send(w http.ResponseWriter) (int, error) { + content := map[string]string{"message": r.Content} + msg, msgErr := json.Marshal(content) + + if msgErr != nil { + return 500, msgErr + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(r.Code) + w.Write(msg) + return 0, r.Err +} diff --git a/tools/hugo/hugo.go b/_stuff/run.go similarity index 59% rename from tools/hugo/hugo.go rename to _stuff/run.go index 023afd05..38ab10a0 100644 --- a/tools/hugo/hugo.go +++ b/_stuff/run.go @@ -4,16 +4,16 @@ import ( "log" "os" - "github.com/hacdias/caddy-hugo/config" "github.com/hacdias/caddy-hugo/tools/commands" + "github.com/hacdias/caddy-hugo/tools/variables" ) // Run is used to run the static website generator -func Run(c *config.Config, force bool) { +func Run(c *Config, force bool) { os.RemoveAll(c.Path + "public") // Prevent running if watching is enabled - if b, pos := stringInSlice("--watch", c.Args); b && !force { + if b, pos := variables.StringInSlice("--watch", c.Args); b && !force { if len(c.Args) > pos && c.Args[pos+1] != "false" { return } @@ -27,12 +27,3 @@ func Run(c *config.Config, force bool) { log.Panic(err) } } - -func stringInSlice(a string, list []string) (bool, int) { - for i, b := range list { - if b == a { - return true, i - } - } - return false, 0 -} diff --git a/_stuff/setup.go b/_stuff/setup.go new file mode 100644 index 00000000..8c4634f2 --- /dev/null +++ b/_stuff/setup.go @@ -0,0 +1,145 @@ +package hugo + +import ( + "log" + "net/http" + "os" + "path/filepath" + "strings" + + "github.com/hacdias/caddy-filemanager" + "github.com/hacdias/caddy-hugo/tools/commands" + "github.com/hacdias/caddy-hugo/tools/installer" + "github.com/mholt/caddy" + "github.com/mholt/caddy/caddyhttp/httpserver" +) + +func init() { + caddy.RegisterPlugin("hugo", caddy.Plugin{ + ServerType: "http", + Action: setup, + }) +} + +// Setup is the init function of Caddy plugins and it configures the whole +// middleware thing. +func setup(c *caddy.Controller) error { + cnf := httpserver.GetConfig(c.Key) + conf, _ := ParseHugo(c, cnf.Root) + + // Checks if there is an Hugo website in the path that is provided. + // If not, a new website will be created. + create := true + + if _, err := os.Stat(conf.Path + "config.yaml"); err == nil { + create = false + } + + if _, err := os.Stat(conf.Path + "config.json"); err == nil { + create = false + } + + if _, err := os.Stat(conf.Path + "config.toml"); err == nil { + create = false + } + + if create { + err := commands.Run(conf.Hugo, []string{"new", "site", conf.Path, "--force"}, ".") + if err != nil { + log.Panic(err) + } + } + + // Generates the Hugo website for the first time the plugin is activated. + go Run(conf, true) + + mid := func(next httpserver.Handler) httpserver.Handler { + return &Hugo{ + Next: next, + FileManager: &filemanager.FileManager{ + Next: next, + Configs: []filemanager.Config{ + filemanager.Config{ + PathScope: conf.Path, + Root: http.Dir(conf.Path), + BaseURL: conf.Admin, + }, + }, + }, + Config: conf, + } + } + + cnf.AddMiddleware(mid) + return nil +} + +// Config is the add-on configuration set on Caddyfile +type Config struct { + Public string // Public content path + Path string // Hugo files path + Styles string // Admin styles path + Args []string // Hugo arguments + Hugo string // Hugo executable path + Admin string // Hugo admin URL + Git bool // Is this site a git repository +} + +// ParseHugo parses the configuration file +func ParseHugo(c *caddy.Controller, root string) (*Config, error) { + conf := &Config{ + Public: strings.Replace(root, "./", "", -1), + Admin: "/admin", + Path: "./", + Git: false, + } + + conf.Hugo = installer.GetPath() + + for c.Next() { + args := c.RemainingArgs() + + switch len(args) { + case 1: + conf.Path = args[0] + conf.Path = strings.TrimSuffix(conf.Path, "/") + conf.Path += "/" + } + + for c.NextBlock() { + switch c.Val() { + case "styles": + if !c.NextArg() { + return nil, c.ArgErr() + } + conf.Styles = c.Val() + // Remove the beginning slash if it exists or not + conf.Styles = strings.TrimPrefix(conf.Styles, "/") + // Add a beginning slash to make a + conf.Styles = "/" + conf.Styles + case "admin": + if !c.NextArg() { + return nil, c.ArgErr() + } + conf.Admin = c.Val() + conf.Admin = strings.TrimPrefix(conf.Admin, "/") + conf.Admin = "/" + conf.Admin + default: + key := "--" + c.Val() + value := "true" + + if c.NextArg() { + value = c.Val() + } + + conf.Args = append(conf.Args, key+"="+value) + } + } + } + + if _, err := os.Stat(filepath.Join(conf.Path, ".git")); err == nil { + conf.Git = true + } + + return conf, nil +} diff --git a/routes/assets/.gitkeep b/_stuff/templates.go similarity index 100% rename from routes/assets/.gitkeep rename to _stuff/templates.go diff --git a/tools/commands/commands.go b/_stuff/tools/commands/commands.go similarity index 100% rename from tools/commands/commands.go rename to _stuff/tools/commands/commands.go diff --git a/tools/frontmatter/frontmatter.go b/_stuff/tools/frontmatter/frontmatter.go similarity index 100% rename from tools/frontmatter/frontmatter.go rename to _stuff/tools/frontmatter/frontmatter.go diff --git a/tools/installer/hashes.go b/_stuff/tools/installer/hashes.go similarity index 100% rename from tools/installer/hashes.go rename to _stuff/tools/installer/hashes.go diff --git a/tools/installer/installer.go b/_stuff/tools/installer/installer.go similarity index 100% rename from tools/installer/installer.go rename to _stuff/tools/installer/installer.go diff --git a/_stuff/tools/server/response.go b/_stuff/tools/server/response.go new file mode 100644 index 00000000..97fa55df --- /dev/null +++ b/_stuff/tools/server/response.go @@ -0,0 +1,30 @@ +package server + +import ( + "encoding/json" + "net/http" +) + +type Response struct { + Code int + Err error + Content interface{} +} + +// RespondJSON used to send JSON responses to the web server +func RespondJSON(w http.ResponseWriter, r *Response) (int, error) { + if r.Content == nil { + r.Content = map[string]string{} + } + + msg, msgErr := json.Marshal(r.Content) + + if msgErr != nil { + return 500, msgErr + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(r.Code) + w.Write(msg) + return 0, r.Err +} diff --git a/tools/server/url.go b/_stuff/tools/server/url.go similarity index 100% rename from tools/server/url.go rename to _stuff/tools/server/url.go diff --git a/tools/templates/templates.go b/_stuff/tools/templates/templates.go similarity index 100% rename from tools/templates/templates.go rename to _stuff/tools/templates/templates.go diff --git a/tools/templates/templates_test.go b/_stuff/tools/templates/templates_test.go similarity index 100% rename from tools/templates/templates_test.go rename to _stuff/tools/templates/templates_test.go diff --git a/_stuff/tools/variables/strings.go b/_stuff/tools/variables/strings.go new file mode 100644 index 00000000..cd29ee59 --- /dev/null +++ b/_stuff/tools/variables/strings.go @@ -0,0 +1,10 @@ +package variables + +func StringInSlice(a string, list []string) (bool, int) { + for i, b := range list { + if b == a { + return true, i + } + } + return false, 0 +} diff --git a/tools/variables/transform.go b/_stuff/tools/variables/transform.go similarity index 100% rename from tools/variables/transform.go rename to _stuff/tools/variables/transform.go diff --git a/tools/variables/transform_test.go b/_stuff/tools/variables/transform_test.go similarity index 100% rename from tools/variables/transform_test.go rename to _stuff/tools/variables/transform_test.go diff --git a/tools/variables/types.go b/_stuff/tools/variables/types.go similarity index 100% rename from tools/variables/types.go rename to _stuff/tools/variables/types.go diff --git a/tools/variables/variables.go b/_stuff/tools/variables/variables.go similarity index 100% rename from tools/variables/variables.go rename to _stuff/tools/variables/variables.go diff --git a/tools/variables/variables_test.go b/_stuff/tools/variables/variables_test.go similarity index 100% rename from tools/variables/variables_test.go rename to _stuff/tools/variables/variables_test.go diff --git a/tools/server/response.go b/_stuff/utilities.go similarity index 96% rename from tools/server/response.go rename to _stuff/utilities.go index e56699c4..5bd088d0 100644 --- a/tools/server/response.go +++ b/_stuff/utilities.go @@ -1,4 +1,4 @@ -package server +package hugo import ( "encoding/json" diff --git a/assets/Gruntfile.js b/assets/Gruntfile.js deleted file mode 100644 index 39b84a5f..00000000 --- a/assets/Gruntfile.js +++ /dev/null @@ -1,79 +0,0 @@ -// NOTE: https://github.com/gruntjs/grunt-contrib-htmlmin - -module.exports = function(grunt) { - grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-contrib-copy'); - grunt.loadNpmTasks('grunt-contrib-concat'); - grunt.loadNpmTasks('grunt-contrib-cssmin'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - - grunt.initConfig({ - watch: { - sass: { - files: ['src/css/**/*.css'], - tasks: ['concat', 'cssmin'] - }, - js: { - files: ['src/js/**/*.js'], - tasks: ['uglify:main'] - }, - }, - concat: { - css: { - src: ['node_modules/normalize.css/normalize.css', - 'node_modules/font-awesome/css/font-awesome.css', - 'node_modules/animate.css/source/_base.css', - 'node_modules/animate.css/source/bouncing_entrances/bounceInRight.css', - 'node_modules/animate.css/source/fading_entrances/fadeIn.css', - 'node_modules/animate.css/source/fading_exits/fadeOut.css', - 'src/css/main.css' - ], - dest: 'temp/css/main.css', - }, - }, - copy: { - main: { - files: [{ - expand: true, - flatten: true, - src: ['node_modules/font-awesome/fonts/**'], - dest: 'dist/public/fonts' - }], - }, - }, - cssmin: { - options: { - keepSpecialComments: 0 - }, - target: { - files: [{ - expand: true, - cwd: 'temp/css/', - src: ['*.css', '!*.min.css'], - dest: 'dist/public/css/', - ext: '.min.css' - }] - } - }, - uglify: { - plugins: { - files: { - 'assets/dist/public/js/plugins.min.js': ['node_modules/jquery/dist/jquery.min.js', - 'node_modules/perfect-scrollbar/dist/js/min/perfect-scrollbar.jquery.min.js', - 'node_modules/showdown/dist/showdown.min.js', - 'node_modules/noty/js/noty/packaged/jquery.noty.packaged.min.js', - 'node_modules/jquery-pjax/jquery.pjax.js', - 'node_modules/jquery-serializejson/jquery.serializejson.min.js', - ] - } - }, - main: { - files: { - 'dist/public/js/app.min.js': ['src/js/**/*.js'] - } - } - } - }); - - grunt.registerTask('default', ['copy', 'concat', 'cssmin', 'uglify']); -}; diff --git a/assets/dist/public/css/main.min.css b/assets/dist/public/css/main.min.css deleted file mode 100644 index 310234ec..00000000 --- a/assets/dist/public/css/main.min.css +++ /dev/null @@ -1 +0,0 @@ -img,legend{border:0}legend,td,th{padding:0}.fa-ul>li,sub,sup{position:relative}.fa-fw,.fa-li{text-align:center}a:active,a:hover,input{outline:0}.browse a,a,body>nav ul li a{text-decoration:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-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}.fa,.fa-stack{display:inline-block}abbr[title]{border-bottom:1px dotted}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{max-width:100%}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre,textarea{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}.fa.fa-pull-left,.fa.pull-left{margin-right:.3em}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{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{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-appearance:textfield;box-sizing:content-box}*,.block,.noty_icon,.noty_text,body>nav,fieldset{box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}table{border-collapse:collapse;border-spacing:0}@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.6.3);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.6.3) format('embedded-opentype'),url(../fonts/fontawesome-webfont.woff2?v=4.6.3) format('woff2'),url(../fonts/fontawesome-webfont.woff?v=4.6.3) format('woff'),url(../fonts/fontawesome-webfont.ttf?v=4.6.3) format('truetype'),url(../fonts/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular) format('svg');font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.browse .actions .fa,.fa-stack,body>nav ul li{vertical-align:middle}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right,.pull-right{float:right}.pull-left{float:left}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-y-combinator:before,.fa-yc:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-television:before,.fa-tv:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:"\f2a3"}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-sign-language:before,.fa-signing:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.animated{animation-duration:1s;animation-fill-mode:both}.animated.infinite{animation-iteration-count:infinite}.animated.hinge{animation-duration:2s}.animated.bounceIn,.animated.bounceOut,.animated.flipOutX,.animated.flipOutY{animation-duration:.75s}@keyframes bounceInRight{60%,75%,90%,from,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}.bounceInRight{animation-name:bounceInRight}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.fadeIn{animation-name:fadeIn}@keyframes fadeOut{from{opacity:1}to{opacity:0}}.fadeOut{animation-name:fadeOut}body{font-family:Roboto,sans-serif;color:#212121;background-color:#f5f5f5;height:100%;width:100%;padding-top:3em}a{background-color:transparent;color:#1976D2}code{border-radius:.2em}h2{margin:.83em 0}.container{margin:0 auto;width:95%;max-width:1000px}.hidden{display:none}.left{text-align:left}.right{text-align:right}#content>header{background-color:#00BCD4;padding:1px 0}body>nav{position:fixed;top:0;left:0;height:3em;width:100%;background-color:#0097A7;padding:0 1em;z-index:999;color:#eee;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}body>nav ul{margin:0;padding:0;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex}body>nav ul li{list-style-type:none;display:inline-block}body>nav ul li:first-child a{margin-left:-.5em}body>nav ul li:last-child a{margin-right:-.5em}body>nav ul li:last-child{margin-left:auto}body>nav img{height:2em}body>nav ul li a{padding:.5em;line-height:2em;display:block;color:inherit;-webkit-transition:.5s ease background-color;transition:.5s ease background-color}body>nav ul li a:hover{background-color:rgba(0,0,0,.1)}body>footer{font-size:.8em;text-align:center;padding:1em 0;margin-top:1em}body>footer p{width:95%;max-width:1000px;margin:0 auto;color:#78909C;font-size:.9em}body>footer a{color:#aaa}#noty_topRight_layout_container{font-family:sans-serif;top:4em!important;right:1em!important;position:fixed!important;width:310px;height:auto;margin:0;padding:0;list-style-type:none;z-index:10000000}#noty_topRight_layout_container li{overflow:hidden;margin:0 0 .25em}.noty_bar{color:#fff;background-color:#cfd8dc;border-radius:.3em}.noty_message{font-size:.75em;font-weight:700;line-height:1.2em;text-align:left;padding:1em;width:auto;position:relative}.noty_text{display:block;margin-left:3em;top:1em}.noty_icon{position:absolute;left:0;top:0;height:100%;padding:1em;background-color:rgba(0,0,0,.1);border-top-left-radius:.3em;border-bottom-left-radius:.3em;text-align:center}.noty_icon .fa{width:1em!important}.noty_type_success{background-color:#00c853}.noty_type_error{background-color:#ff5252}.noty_type_warning{background-color:#ffd600}.noty_type_information{background-color:#448aff}button,input[type=submit]{border-radius:.2em;border:0;padding:.5em 1em;color:#000;font-weight:400;background-color:#FFEB3B;box-shadow:0 1px 3px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.12);-webkit-transition:.5s ease background-color;transition:.5s ease background-color}.block,.block textarea,.editor h1 textarea,fieldset,input{border:0;width:100%}.block,.popup,fieldset{box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}button.darker{background-color:#F9A825}button.darker:hover{background-color:#F57F17}button:active,button:focus,button:hover,input[type=submit]:active,input[type=submit]:focus,input[type=submit]:hover{outline:0;background-color:#FDD835}button.add,button.delete,button.rename{color:#fff;padding:.063em .375em}button.add{background-color:#8BC34A}button.add:hover{background-color:#689F38}button.delete{background-color:#F44336}button.delete:hover{background-color:#D32F2F}button.rename{background-color:#1565C0}button.rename:hover{background-color:#0D47A1}.frontmatter>.actions{margin-top:0;text-align:right}.frontmatter>.actions button.add{padding:.5em 1em}.toolbar .right{float:right}.toolbar input[type=submit]{background-color:#00BCD4;color:#fff}.toolbar input.default{background-color:#8BC34A}.editor h1 textarea{font-size:2em;font-weight:400;resize:none;overflow:hidden;line-height:1em;height:1em;background-color:transparent}.block>.actions,fieldset>.actions{position:absolute;top:.5em;right:.5em}.blocks{-webkit-column-count:4;-moz-column-count:4;column-count:4;-webkit-column-gap:1em;-moz-column-gap:1em;column-gap:1em}.block,fieldset{display:inline-block;background-color:#fff;padding:.6em;margin:0 0 1em;position:relative}.block label,fieldset h3,fieldset label{font-weight:700;display:block;margin-top:0;font-size:1em}.block textarea{resize:vertical;background-color:inherit;overflow:hidden}input{background-color:transparent}input[type=submit]{width:auto}fieldset input{width:calc(100% - 1.57em);margin:.5em 0}.complete .block[data-content=title]{display:none}.editor .content{border-radius:.5em;border:1px solid #d8d8d8;background-color:#f7f7f7}.editor .content nav a{padding:1em;line-height:3em;cursor:pointer;font-size:1em;color:inherit}.editor .content nav a.active{font-weight:700}#editor-preview{padding:4% 13%;background-color:#fff;display:none}.ace_editor{margin:0;border-bottom-left-radius:.5em;border-bottom-right-radius:.5em}.ace_gutter{background-color:#f7f7f7!important}.browse a{color:inherit}.browse .actions{background-color:#00BCD4;color:#fff;padding:1.5em 0}.browse .actions .container{margin:0 auto;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.browse .actions .container>a,.browse .actions .container>span{line-height:2em;vertical-align:middle}.browse .actions .container>a{margin-right:.5em}.browse .actions .container>span{font-weight:700;font-size:1.1em}.browse .actions .go-right{margin-left:auto;position:relative}.browse .go-right input[type=file]{display:none}.browse table{margin:1em 0;width:100%}.browse tr{line-height:2em;border-bottom:1px solid rgba(0,0,0,.03);-webkit-transition:.2s ease background-color;transition:.2s ease background-color}.browse tr:hover{background-color:rgba(0,0,0,.04)}.browse th.buttons{width:4em}.browse tr button{line-height:1.5em;border-radius:50%;width:1.5em;height:1.5em;padding:0}.browse #new-file{display:none;position:absolute;right:0;top:2.5em;background-color:#263238;color:rgba(255,255,255,.5);border-radius:.5em;padding:1em;width:182%}#foreground,#loading,.popup{position:fixed}#foreground{z-index:99999;top:0;left:0;height:100%;width:100%;background-color:rgba(0,0,0,.1)}.popup{z-index:999999;margin:0 auto;max-width:25em;width:95%;top:10%;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);background-color:#006064;color:#fff;padding:1em 2em;border-radius:.5em}.popup input[type=text]{border-bottom:.15em solid #fff}#loading{z-index:99999;top:0;left:0;height:100%;width:100%;background-color:rgba(0,0,0,.41)}#loading .centerize{position:relative;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.sk-folding-cube{margin:20px auto;width:40px;height:40px;position:relative;-webkit-transform:rotateZ(45deg);transform:rotateZ(45deg)}.sk-folding-cube .sk-cube{float:left;width:50%;height:50%;position:relative;-webkit-transform:scale(1.1);transform:scale(1.1)}.sk-folding-cube .sk-cube:before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:#fff;-webkit-animation:sk-foldCubeAngle 2.4s infinite linear both;animation:sk-foldCubeAngle 2.4s infinite linear both;-webkit-transform-origin:100% 100%;transform-origin:100% 100%}.sk-folding-cube .sk-cube2{-webkit-transform:scale(1.1) rotateZ(90deg);transform:scale(1.1) rotateZ(90deg)}.sk-folding-cube .sk-cube3{-webkit-transform:scale(1.1) rotateZ(180deg);transform:scale(1.1) rotateZ(180deg)}.sk-folding-cube .sk-cube4{-webkit-transform:scale(1.1) rotateZ(270deg);transform:scale(1.1) rotateZ(270deg)}.sk-folding-cube .sk-cube2:before{-webkit-animation-delay:.3s;animation-delay:.3s}.sk-folding-cube .sk-cube3:before{-webkit-animation-delay:.6s;animation-delay:.6s}.sk-folding-cube .sk-cube4:before{-webkit-animation-delay:.9s;animation-delay:.9s}@-webkit-keyframes sk-foldCubeAngle{0%,10%{-webkit-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{-webkit-transform:perspective(140px) rotateX(0);transform:perspective(140px) rotateX(0);opacity:1}100%,90%{-webkit-transform:perspective(140px) rotateY(180deg);transform:perspective(140px) rotateY(180deg);opacity:0}}@keyframes sk-foldCubeAngle{0%,10%{-webkit-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{-webkit-transform:perspective(140px) rotateX(0);transform:perspective(140px) rotateX(0);opacity:1}100%,90%{-webkit-transform:perspective(140px) rotateY(180deg);transform:perspective(140px) rotateY(180deg);opacity:0}}@media screen and (max-width:900px){.blocks{-webkit-column-count:3;-moz-column-count:3;column-count:3}}@media screen and (max-width:600px){.hideable,body>nav span{display:none}.blocks{-webkit-column-count:2;-moz-column-count:2;column-count:2}body>nav ul li:last-child{margin-left:0}body>nav .container{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;text-align:center}}@media screen and (max-width:350px){.blocks{-webkit-column-count:1;-moz-column-count:1;column-count:1}.browse .actions{text-align:center}.browse .actions .container,.browse .container .go-right{display:block}} \ No newline at end of file diff --git a/assets/dist/public/fonts/FontAwesome.otf b/assets/dist/public/fonts/FontAwesome.otf deleted file mode 100644 index 3ed7f8b4..00000000 Binary files a/assets/dist/public/fonts/FontAwesome.otf and /dev/null differ diff --git a/assets/dist/public/fonts/fontawesome-webfont.eot b/assets/dist/public/fonts/fontawesome-webfont.eot deleted file mode 100644 index 9b6afaed..00000000 Binary files a/assets/dist/public/fonts/fontawesome-webfont.eot and /dev/null differ diff --git a/assets/dist/public/fonts/fontawesome-webfont.svg b/assets/dist/public/fonts/fontawesome-webfont.svg deleted file mode 100644 index d05688e9..00000000 --- a/assets/dist/public/fonts/fontawesome-webfont.svg +++ /dev/null @@ -1,655 +0,0 @@ - - - \ No newline at end of file diff --git a/assets/dist/public/fonts/fontawesome-webfont.ttf b/assets/dist/public/fonts/fontawesome-webfont.ttf deleted file mode 100644 index 26dea795..00000000 Binary files a/assets/dist/public/fonts/fontawesome-webfont.ttf and /dev/null differ diff --git a/assets/dist/public/fonts/fontawesome-webfont.woff b/assets/dist/public/fonts/fontawesome-webfont.woff deleted file mode 100644 index dc35ce3c..00000000 Binary files a/assets/dist/public/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/assets/dist/public/fonts/fontawesome-webfont.woff2 b/assets/dist/public/fonts/fontawesome-webfont.woff2 deleted file mode 100644 index 500e5172..00000000 Binary files a/assets/dist/public/fonts/fontawesome-webfont.woff2 and /dev/null differ diff --git a/assets/dist/public/js/app.min.js b/assets/dist/public/js/app.min.js deleted file mode 100644 index b24ff3f3..00000000 --- a/assets/dist/public/js/app.min.js +++ /dev/null @@ -1 +0,0 @@ -var basePath="/";$(document).ready(function(){basePath+=window.location.pathname.split("/")[0],$("#logout").click(function(a){return a.preventDefault(),$.ajax({type:"GET",url:basePath+"",async:!1,username:"username",password:"password",headers:{Authorization:"Basic xxx"}}).fail(function(){window.location="/"}),!1}),$(document).pjax("a[data-pjax]","#content")}),$(document).on("ready pjax:end",function(){function a(){this.style.height="5px",this.style.height=this.scrollHeight+"px"}return $("#content").off(),document.title=document.getElementById("site-title").innerHTML,$("textarea").each(a),$("textarea").keyup(a),$(window).resize(function(){$("textarea").each(a)}),$("main").hasClass("browse")&&$(document).trigger("page:browse"),$(".editor")[0]&&$(document).trigger("page:editor"),!1}),$(document).on("page:browse",function(){var a="#foreground",b="form#delete",c=null;$("#content").on("click",".delete",function(d){return d.preventDefault(),c=new Object,c.url=$(this).data("file"),c.row=$(this).parent().parent(),c.filename=$(c.row).find(".filename").text(),$(b).find("span").text(c.filename),$(b).fadeIn(200),$(a).fadeIn(200),!1}),$("#content").on("submit",b,function(d){if(d.preventDefault(),null==c)return notification({text:"Something is wrong with your form.",type:"error"}),!1;var e=new XMLHttpRequest;return e.open("DELETE",c.url),e.send(),e.onreadystatechange=function(){if(4==e.readyState){var d=JSON.parse(e.responseText),f="success",g=5e3;$(a).fadeOut(200),$(b).fadeOut(200),$(c.row).fadeOut(200),200!=e.status&&(f="error",g=!1),notification({text:d.message,type:f,timeout:g}),c=null}},!1}),$("#content").on("change",'input[type="file"]',function(a){a.preventDefault(),files=a.target.files,$("#loading").fadeIn();var b=new FormData;return $.each(files,function(a,c){b.append(a,c)}),$.ajax({url:window.location.pathname,type:"POST",data:b,cache:!1,dataType:"json",headers:{"X-Upload":"true"},processData:!1,contentType:!1}).done(function(a){notification({text:"File(s) uploaded successfully.",type:"success",timeout:5e3}),$("#loading").fadeOut(),$.pjax({url:window.location.pathname,container:"#content"})}).fail(function(a){$("#loading").fadeOut(),notification({text:"Something went wrong.",type:"error"}),console.log(a)}),!1}),$("#content").on("click","#upload",function(a){return a.preventDefault(),$('.actions input[type="file"]').click(),!1});var d="form#new",e=d+' input[type="text"]';$("#content").on("click",".new",function(b){return b.preventDefault(),$(a).fadeIn(200),$(d).fadeIn(200),!1}),$("#content").on("keypress",e,function(a){return 13==a.keyCode?(a.preventDefault(),$(d).submit(),!1):void 0}),$("#content").on("submit",d,function(a){a.preventDefault();var b=$(e).val(),c=b.split(":"),d="",f="";if(""==b)return notification({text:"You have to write something. If you want to close the box, click the button again.",type:"warning",timeout:5e3}),!1;if(1==c.length)d=b;else{if(2!=c.length)return notification({text:"Hmm... I don't understand you. Try writing something like 'name[:archetype]'.",type:"error"}),!1;d=c[0],f=c[1]}var g={filename:d,archetype:f},h=new XMLHttpRequest;return h.open("POST",window.location.pathname),h.setRequestHeader("Content-Type","application/json;charset=UTF-8"),h.send(JSON.stringify(g)),h.onreadystatechange=function(){if(4==h.readyState){var a=JSON.parse(h.responseText),b="success",c=5e3;200!=h.status&&(b="error",c=!1),notification({text:a.message,type:b,timeout:c}),200==h.status&&$.pjax({url:a.location,container:"#content"})}},!1});var f="form#rename",g=f+' input[type="text"]',h=null;$("#content").on("click",".rename",function(b){return b.preventDefault(),h=$(this).parent().parent().find(".filename").text(),$(a).fadeIn(200),$(f).fadeIn(200),$(f).find("span").text(h),$(f).find('input[type="text"]').val(h),!1}),$("#content").on("keypress",g,function(a){return 13==a.keyCode?(a.preventDefault(),$(f).submit(),!1):void 0}),$("#content").on("submit",f,function(a){a.preventDefault();var b=$(this).find('input[type="text"]').val();if(""===b)return!1;"/"!=b.substring(0,1)&&(b=window.location.pathname.replace(basePath+"/browse/","")+"/"+b);var c={filename:b},d=new XMLHttpRequest;return d.open("PUT",h),d.setRequestHeader("Content-Type","application/json;charset=UTF-8"),d.send(JSON.stringify(c)),d.onreadystatechange=function(){if(4==d.readyState){var a=JSON.parse(d.responseText),b="success",c=5e3;200!=d.status&&(b="error",c=!1),$.pjax({url:window.location.pathname,container:"#content"}),notification({text:a.message,type:b,timeout:c}),h=null}},!1});var i="button.git",j="form#git",k=j+' input[type="text"]';$("#content").on("click",i,function(b){return b.preventDefault(),$(a).fadeIn(200),$(j).fadeIn(200),!1}),$("#content").on("keypress",k,function(a){return 13==a.keyCode?(a.preventDefault(),$(j).submit(),!1):void 0}),$("#content").on("submit",j,function(b){b.preventDefault();var c=$(this).find('input[type="text"]').val();if(""==c)return notification({text:"You have to write something. If you want to close the box, click outside of it.",type:"warning",timeout:5e3}),!1;var d=new XMLHttpRequest;return d.open("POST",basePath+"/git"),d.setRequestHeader("Content-Type","application/json;charset=UTF-8"),d.send(JSON.stringify({command:c})),d.onreadystatechange=function(){if(4==d.readyState){var b=JSON.parse(d.responseText);200==d.status?(notification({text:b.message,type:"success",timeout:5e3}),$(j).fadeOut(200),$(a).fadeOut(200),$.pjax({url:window.location.pathname,container:"#content"})):notification({text:b.message,type:"error"})}},!1}),$("#content").on("click",".close",function(b){return b.preventDefault(),$(this).parent().parent().fadeOut(200),$(a).click(),!1}),$("#content").on("click",a,function(c){return c.preventDefault(),$(a).fadeOut(200),$(d).fadeOut(200),$(f).fadeOut(200),$(b).fadeOut(200),$(j).fadeOut(200),!1})}),$(document).on("page:editor",function(){var a=$(".editor"),b=$("#editor-preview"),c=$("#editor-source");if(a.hasClass("complete")&&$("#content").on("keyup","#site-title",function(){$(".frontmatter #title").val($(this).val())}),!a.hasClass("frontmatter-only")){var d=$("#editor-source").data("mode"),e=$('textarea[name="content"]').hide(),f=ace.edit("editor-source");f.getSession().setMode("ace/mode/"+d),f.getSession().setValue(e.val()),f.getSession().on("change",function(){e.val(f.getSession().getValue())}),f.setOptions({wrap:!0,maxLines:1/0,theme:"ace/theme/github",showPrintMargin:!1,fontSize:"1em",minLines:20}),$("#content").on("click","#see-source",function(a){a.preventDefault(),b.hide(),c.fadeIn(),$(this).addClass("active"),$("#see-preview").removeClass("active"),$("#see-preview").data("previewing","false")}),$("#content").on("click","#see-preview",function(a){if(a.preventDefault(),"true"==$(this).data("previewing"))b.hide(),c.fadeIn(),$(this).removeClass("active"),$("#see-source").addClass("active"),$(this).data("previewing","false");else{var d=new showdown.Converter,e=f.getValue(),g=d.makeHtml(e);c.hide(),b.html(g).fadeIn(),$(this).addClass("active"),$("#see-source").removeClass("active"),$(this).data("previewing","true")}return!1})}$("#content").on("keypress","input",function(a){return 13==a.keyCode?(a.preventDefault(),$('input[value="Save"]').focus().click(),!1):void 0});var g=null;$("#content").on("click","form input[type=submit]",function(a){g=this}),$("#content").on("submit","form",function(d){d.preventDefault(),a.hasClass("frontmatter-only")||(b.html("").fadeOut(),$("#see-preview").data("previewing","false"),c.fadeIn());var e=$(g),f={content:$(this).serializeJSON(),contentType:e.data("type"),schedule:e.data("schedule"),regenerate:e.data("regenerate")};console.log(JSON.stringify(f));var h=new XMLHttpRequest;return h.open("POST",window.location),h.setRequestHeader("Content-Type","application/json;charset=UTF-8"),h.send(JSON.stringify(f)),h.onreadystatechange=function(){if(4==h.readyState){var a=JSON.parse(h.responseText),b="success",c=5e3;200==h.status&&(a.message=e.data("message")),200!=h.status&&(b="error",c=!1),notification({text:a.message,type:b,timeout:c})}},!1}),$("#content").on("click",".add",function(a){if(a.preventDefault(),defaultID="lorem-ipsum-sin-dolor-amet",newItem=$("#"+defaultID),newItem.length&&newItem.remove(),block=$(this).parent().parent(),blockType=block.data("type"),blockID=block.attr("id"),"array"==blockType&&(newID=blockID+"[]",input=blockID,input=input.replace(/\[/,"\\["),input=input.replace(/\]/,"\\]"),block.append('