super-pro-rb 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/gollum-6.1.0/CONTRIBUTING.md +221 -0
- data/gollum-6.1.0/Dockerfile +57 -0
- data/gollum-6.1.0/Gemfile +30 -0
- data/gollum-6.1.0/HISTORY.md +229 -0
- data/gollum-6.1.0/LATEST_CHANGES.md +6 -0
- data/gollum-6.1.0/LICENSE +21 -0
- data/gollum-6.1.0/README.md +177 -0
- data/gollum-6.1.0/Rakefile +297 -0
- data/gollum-6.1.0/bin/gollum +301 -0
- data/gollum-6.1.0/bin/gollum-migrate-tags +283 -0
- data/gollum-6.1.0/config.rb +12 -0
- data/gollum-6.1.0/config.ru +12 -0
- data/gollum-6.1.0/contrib/automation/gollum-post +66 -0
- data/gollum-6.1.0/contrib/openrc/conf.d/gollum +3 -0
- data/gollum-6.1.0/contrib/openrc/init.d/gollum +36 -0
- data/gollum-6.1.0/contrib/systemd/gollum@.service +12 -0
- data/gollum-6.1.0/contrib/sysv-debian/init.d/gollum +79 -0
- data/gollum-6.1.0/docker-run.sh +24 -0
- data/gollum-6.1.0/gollum.gemspec +305 -0
- data/gollum-6.1.0/lib/gollum/app.rb +747 -0
- data/gollum-6.1.0/lib/gollum/assets.rb +33 -0
- data/gollum-6.1.0/lib/gollum/helpers.rb +74 -0
- data/gollum-6.1.0/lib/gollum/locales/cn.yml +103 -0
- data/gollum-6.1.0/lib/gollum/locales/en.yml +103 -0
- data/gollum-6.1.0/lib/gollum/public/assets/app-05adca32f8f4f3effe10f8f4cf26dfd6a419ba986bce60d3f51a97e4055d4113.js +30 -0
- data/gollum-6.1.0/lib/gollum/public/assets/app-05adca32f8f4f3effe10f8f4cf26dfd6a419ba986bce60d3f51a97e4055d4113.js.gz +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/app-e224b375d824f0171fc926d624dc0887bf453db83f485b1992bc0859c4110e3e.css +11 -0
- data/gollum-6.1.0/lib/gollum/public/assets/app-e224b375d824f0171fc926d624dc0887bf453db83f485b1992bc0859c4110e3e.css.gz +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/criticmarkup-7b66f7a53b854bc9e4168be5b4725ca38e2bc6e9c41d5c050a9f60d9a94cb405.css +1 -0
- data/gollum-6.1.0/lib/gollum/public/assets/criticmarkup-7b66f7a53b854bc9e4168be5b4725ca38e2bc6e9c41d5c050a9f60d9a94cb405.css.gz +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/editor-9bef5462bb5dae2db84d6d8d534b55c5bb5a430e11344b3c23f9ea4410312f52.js +165 -0
- data/gollum-6.1.0/lib/gollum/public/assets/editor-9bef5462bb5dae2db84d6d8d534b55c5bb5a430e11344b3c23f9ea4410312f52.js.gz +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/gollum.katex-e70c1d51a08ebfe759eecbb33fbed54f300ccd7fb8d0e86e251caaf4e50f6b68.js +9 -0
- data/gollum-6.1.0/lib/gollum/public/assets/gollum.katex-e70c1d51a08ebfe759eecbb33fbed54f300ccd7fb8d0e86e251caaf4e50f6b68.js.gz +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/gollum.mermaid-06fd2f5494199db250618043312c27770720504b50c3f6ca99d2d2df529c7da3.js +118 -0
- data/gollum-6.1.0/lib/gollum/public/assets/gollum.mermaid-06fd2f5494199db250618043312c27770720504b50c3f6ca99d2d2df529c7da3.js.gz +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/katex-709d4191c4f005516a709377f79e468d343f4e6c91a29a6ff188d13d124ba55f.css +1 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/katex-709d4191c4f005516a709377f79e468d343f4e6c91a29a6ff188d13d124ba55f.css.gz +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css +1 -0
- data/gollum-6.1.0/lib/gollum/public/assets/print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css.gz +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/HOWTO_UPDATE_MATHJAX.md +21 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/a11y/assistive-mml.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/a11y/complexity.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/a11y/explorer.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/a11y/semantic-enrich.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/a11y/sre.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/adaptors/liteDOM.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/core.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/asciimath.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/mml/entities.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/mml/extensions/mml3.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/mml/extensions/mml3.sef.json +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/mml.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/action.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/all-packages.js +34 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/ams.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/amscd.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/autoload.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/bbox.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/boldsymbol.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/braket.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/bussproofs.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/cancel.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/cases.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/centernot.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/color.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/colortbl.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/colorv2.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/configmacros.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/empheq.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/enclose.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/extpfeil.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/gensymb.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/html.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/mathtools.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/mhchem.js +34 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/newcommand.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/noerrors.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/noundefined.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/physics.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/require.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/setoptions.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/tagformat.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/textcomp.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/textmacros.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/unicode.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/upgreek.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/verb.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex-base.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex-full.js +34 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/latest.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/loader.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/node-main.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/tex.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Zero.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/svg/fonts/tex.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/svg.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/base.json +29 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/ca.json +140 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/da.json +140 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/de.json +146 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/en.json +158 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/es.json +140 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/fr.json +146 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/hi.json +146 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/it.json +146 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/nb.json +146 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/nemeth.json +125 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/nn.json +146 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/sv.json +146 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/startup.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/tex-chtml-full-speech.js +34 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/tex-mml-chtml.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/ui/lazy.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/ui/menu.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/ui/safe.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/app.js +15 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/clipboard.min.js +7 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/date.min.js +123 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/gollum.editor.js +1277 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/asciidoc.js +117 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/bib.js +8 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/creole.js +70 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/default.js +201 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/markdown.js +119 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/mediawiki.js +122 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/org.js +128 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/plaintext.js +8 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/pod.js +93 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/rdoc.js +23 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/rest.js +187 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/textile.js +133 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/modes.js.erb +252 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/sections.js +87 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor.js +30 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/gollum.behaviors.js +40 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/gollum.dialog.js +263 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/gollum.js.erb +814 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/gollum.katex.js +3 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/gollum.mermaid.js +2 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/gollum.placeholder.js +54 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/identicon.js +205 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/jquery-1.9.1.min.js +5 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/jquery.resize.js +164 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/polyfills.js +6 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/_base.scss +13 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/_breakpoint.scss +22 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/_features.scss +84 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/_spinners.scss +245 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/app.scss +16 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/criticmarkup.scss +42 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/dialog.scss +140 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/editor.scss +217 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/emoji.scss +5 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/highlights.scss +196 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/print.scss +16 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/spinner.scss +9 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/tables.scss +47 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/template.scss.erb +204 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/wiki_content.scss +144 -0
- data/gollum-6.1.0/lib/gollum/templates/commit.mustache +29 -0
- data/gollum-6.1.0/lib/gollum/templates/compare.mustache +84 -0
- data/gollum-6.1.0/lib/gollum/templates/create.mustache +26 -0
- data/gollum-6.1.0/lib/gollum/templates/edit.mustache +24 -0
- data/gollum-6.1.0/lib/gollum/templates/editor.mustache +215 -0
- data/gollum-6.1.0/lib/gollum/templates/error.mustache +8 -0
- data/gollum-6.1.0/lib/gollum/templates/history.mustache +51 -0
- data/gollum-6.1.0/lib/gollum/templates/history_authors/gravatar.mustache +2 -0
- data/gollum-6.1.0/lib/gollum/templates/history_authors/identicon.mustache +2 -0
- data/gollum-6.1.0/lib/gollum/templates/history_authors/none.mustache +2 -0
- data/gollum-6.1.0/lib/gollum/templates/latest_changes.mustache +36 -0
- data/gollum-6.1.0/lib/gollum/templates/layout.mustache +140 -0
- data/gollum-6.1.0/lib/gollum/templates/mobilenav.mustache +72 -0
- data/gollum-6.1.0/lib/gollum/templates/navbar.mustache +110 -0
- data/gollum-6.1.0/lib/gollum/templates/overview.mustache +55 -0
- data/gollum-6.1.0/lib/gollum/templates/page.mustache +13 -0
- data/gollum-6.1.0/lib/gollum/templates/pagination.mustache +23 -0
- data/gollum-6.1.0/lib/gollum/templates/search.mustache +51 -0
- data/gollum-6.1.0/lib/gollum/templates/searchbar.mustache +3 -0
- data/gollum-6.1.0/lib/gollum/templates/wiki_content.mustache +64 -0
- data/gollum-6.1.0/lib/gollum/uri_encode_component.rb +212 -0
- data/gollum-6.1.0/lib/gollum/views/commit.rb +49 -0
- data/gollum-6.1.0/lib/gollum/views/compare.rb +109 -0
- data/gollum-6.1.0/lib/gollum/views/create.rb +53 -0
- data/gollum-6.1.0/lib/gollum/views/edit.rb +78 -0
- data/gollum-6.1.0/lib/gollum/views/editable.rb +31 -0
- data/gollum-6.1.0/lib/gollum/views/error.rb +7 -0
- data/gollum-6.1.0/lib/gollum/views/has_math.rb +15 -0
- data/gollum-6.1.0/lib/gollum/views/has_page.rb +19 -0
- data/gollum-6.1.0/lib/gollum/views/has_user_icons.rb +15 -0
- data/gollum-6.1.0/lib/gollum/views/helpers/locale_helpers.rb +89 -0
- data/gollum-6.1.0/lib/gollum/views/helpers.rb +132 -0
- data/gollum-6.1.0/lib/gollum/views/history.rb +56 -0
- data/gollum-6.1.0/lib/gollum/views/latest_changes.rb +44 -0
- data/gollum-6.1.0/lib/gollum/views/layout.rb +103 -0
- data/gollum-6.1.0/lib/gollum/views/overview.rb +81 -0
- data/gollum-6.1.0/lib/gollum/views/page.rb +277 -0
- data/gollum-6.1.0/lib/gollum/views/pagination.rb +13 -0
- data/gollum-6.1.0/lib/gollum/views/rss.rb +84 -0
- data/gollum-6.1.0/lib/gollum/views/search.rb +47 -0
- data/gollum-6.1.0/lib/gollum/views/template_cascade.rb +29 -0
- data/gollum-6.1.0/lib/gollum.rb +42 -0
- data/gollum-6.1.0/licenses/licenses.txt +31 -0
- data/gollum-6.1.0/package.json +12 -0
- data/gollum-6.1.0/yarn.lock +1025 -0
- data/super-pro-rb.gemspec +11 -0
- metadata +290 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/* modes.js
|
|
2
|
+
|
|
3
|
+
Add highlighting rules for gollum-specific syntax to ACE.
|
|
4
|
+
We first have to extends the Highlighters for each supported syntax,
|
|
5
|
+
so that later, we can extend the relevant ACE Mode to use the custom Highlighter.
|
|
6
|
+
At the moment there are two gollum-wide block level syntaxes which need to be added:
|
|
7
|
+
|
|
8
|
+
* GitHub style code blocks: ``` ... ```
|
|
9
|
+
* UML blocks: @startuml ... @enduml
|
|
10
|
+
|
|
11
|
+
In addition, there are universal gollum tags:
|
|
12
|
+
|
|
13
|
+
[[link]]]
|
|
14
|
+
|
|
15
|
+
The regexes defined for these below should be equivalent to the regexes used by
|
|
16
|
+
gollum-lib to extract these blocks.
|
|
17
|
+
|
|
18
|
+
ACE Docs:
|
|
19
|
+
* Highlight Rules: https://cloud9-sdk.readme.io/docs/highlighting-rules
|
|
20
|
+
* Dynamically generating modes: https://stackoverflow.com/questions/22166784/dynamically-update-syntax-highlighting-mode-rules-for-the-ace-editor
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
// For Gollum link tags
|
|
24
|
+
var GollumTagStart = {
|
|
25
|
+
token: "support.function",
|
|
26
|
+
regex: "\\[\\[[^\\]]*\\]\\]",
|
|
27
|
+
next: 'start'
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
<%
|
|
31
|
+
uml_rule_name = 'UMLBlock'
|
|
32
|
+
uml_rule_id = 'umlblock'
|
|
33
|
+
%>
|
|
34
|
+
|
|
35
|
+
// The rule defining the UML state for the ACE Tokenizer
|
|
36
|
+
var <%= uml_rule_name %> = [{
|
|
37
|
+
token: "support.function",
|
|
38
|
+
regex: "^\\@enduml$",
|
|
39
|
+
next: "start"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
defaultToken: "support.function"
|
|
43
|
+
}];
|
|
44
|
+
|
|
45
|
+
// The rule defining how the ACE Tokenizer gets into the UML state
|
|
46
|
+
var UMLStart = {
|
|
47
|
+
token: "support.function",
|
|
48
|
+
regex: "^(?:[ \\t]*)\\@startuml$",
|
|
49
|
+
next: "<%= uml_rule_id %>"
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
<%
|
|
53
|
+
codeblock_rule_name = 'GithubCodeBlock'
|
|
54
|
+
codeblock_rule_id = 'githubblock';
|
|
55
|
+
%>
|
|
56
|
+
|
|
57
|
+
// Generic rule for github style fenced code blocks (both for three backticks, or tildes).
|
|
58
|
+
// The generic approach was lifted from ACE's markdown_highlight_rules.js
|
|
59
|
+
// Relies on startCodeBlockMatch to be called in the 'start' state to log the length and kind of the opening tag.
|
|
60
|
+
var <%= codeblock_rule_name %> = [{
|
|
61
|
+
token: "support.function",
|
|
62
|
+
regex: ".*",
|
|
63
|
+
onMatch: function(value, state, stack, line) {
|
|
64
|
+
var length = stack[2][0];
|
|
65
|
+
var symbol = stack[2][1];
|
|
66
|
+
// length and symbol are logged by startCodeBlockMatch
|
|
67
|
+
var match = /^( {0,3})(~~[~]+|```)\s*$/.exec(value);
|
|
68
|
+
// if there's a matching close tag, it's at least as long as the logged open tag, and it's the same character (backtick or tilde) as the opening tag.
|
|
69
|
+
if (match && match[2].length >= length && match[2].charAt(0) == symbol) {
|
|
70
|
+
stack.splice(0, 3);
|
|
71
|
+
this.next = stack.shift();
|
|
72
|
+
return this.token;
|
|
73
|
+
}
|
|
74
|
+
this.next = "";
|
|
75
|
+
return this.token;
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
defaultToken: "support.function"
|
|
80
|
+
}];
|
|
81
|
+
|
|
82
|
+
// When we have a match for the start of a code block, log the information how long the opening tag was, and which character (backtick or tilde) it used.
|
|
83
|
+
var startCodeBlockMatch = function(value, state, stack, line) {
|
|
84
|
+
var match = new RegExp(this.regex).exec(value);
|
|
85
|
+
stack.unshift("<%= codeblock_rule_id %>", [], [match[2].length, match[2].charAt(0)], state);
|
|
86
|
+
return this.token;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Three backticks should work on all pages
|
|
90
|
+
var GollumCodeStart = {
|
|
91
|
+
token: "support.function",
|
|
92
|
+
regex: "^( {0,3})(```)[^`]*$",
|
|
93
|
+
onMatch: startCodeBlockMatch,
|
|
94
|
+
next: "<%= codeblock_rule_id %>"
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// Markdown pages should also support fenced code blocks
|
|
98
|
+
var MarkdownCodeStart = {
|
|
99
|
+
token: "support.function",
|
|
100
|
+
regex: "^( {0,3})(~~[~]+)[^`~]*$",
|
|
101
|
+
onMatch: startCodeBlockMatch,
|
|
102
|
+
next: "<%= codeblock_rule_id %>"
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
<%
|
|
106
|
+
default_rules = {
|
|
107
|
+
:path => '',
|
|
108
|
+
:rule_name => '',
|
|
109
|
+
:start_rules => ['GollumTagStart', 'UMLStart', 'GollumCodeStart'],
|
|
110
|
+
:block_rules => { codeblock_rule_id => codeblock_rule_name,
|
|
111
|
+
uml_rule_id => uml_rule_name,
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
rst_rules = default_rules.dup
|
|
116
|
+
rst_rules[:path] = 'ace/mode/rst_highlight_rules'
|
|
117
|
+
rst_rules[:rule_name] = 'RSTHighlightRules'
|
|
118
|
+
|
|
119
|
+
asciidoc_rules = default_rules.dup
|
|
120
|
+
asciidoc_rules[:start_rules] = ['UMLStart', 'GollumCodeStart'] # Gollum tags are disabled for asciidoc
|
|
121
|
+
asciidoc_rules[:path] = 'ace/mode/asciidoc_highlight_rules'
|
|
122
|
+
asciidoc_rules[:rule_name] = 'AsciidocHighlightRules'
|
|
123
|
+
|
|
124
|
+
textile_rules = default_rules.dup
|
|
125
|
+
textile_rules[:path] = 'ace/mode/textile_highlight_rules'
|
|
126
|
+
textile_rules[:rule_name] = 'TextileHighlightRules'
|
|
127
|
+
|
|
128
|
+
rdoc_rules = default_rules.dup
|
|
129
|
+
rdoc_rules[:path] = 'ace/mode/rdoc_highlight_rules'
|
|
130
|
+
rdoc_rules[:rule_name] = 'RDocHighlightRules'
|
|
131
|
+
|
|
132
|
+
# Create set of extended rules for markups that don't have their own Ace mode, based on the default 'text' highlighter.
|
|
133
|
+
text_rules = default_rules.dup
|
|
134
|
+
text_rules[:path] = 'ace/mode/text_highlight_rules'
|
|
135
|
+
text_rules[:rule_name] = 'TextHighlightRules'
|
|
136
|
+
|
|
137
|
+
markdown_rules = default_rules.dup
|
|
138
|
+
markdown_rules[:path] = 'ace/mode/markdown_highlight_rules'
|
|
139
|
+
markdown_rules[:rule_name] = 'MarkdownHighlightRules'
|
|
140
|
+
markdown_rules[:start_rules] = ['GollumTagStart', 'UMLStart', 'GollumCodeStart', 'MarkdownCodeStart'] # Markdown pages should also support fenced code blocks
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
{
|
|
144
|
+
'GollumRstHighlightRules' => rst_rules,
|
|
145
|
+
'GollumAsciidocHighlightRules' => asciidoc_rules,
|
|
146
|
+
'GollumTextileHighlightRules' => textile_rules,
|
|
147
|
+
'GollumTextHighlightRules' => text_rules,
|
|
148
|
+
'GollumRdocHighlightRules' => rdoc_rules,
|
|
149
|
+
'GollumMarkdownHighlightRules' => markdown_rules
|
|
150
|
+
}.each do |name, highlighter|
|
|
151
|
+
%>
|
|
152
|
+
// Register gollum-specific HighlightRules with ACE
|
|
153
|
+
ace.define("<%= name %>", [], function(require, exports, module) {
|
|
154
|
+
"use strict";
|
|
155
|
+
|
|
156
|
+
var oop = require("ace/lib/oop");
|
|
157
|
+
var BaseHighlightRules = require('<%= highlighter[:path] %>').<%= highlighter[:rule_name] %>;
|
|
158
|
+
|
|
159
|
+
var GollumHighlightRules = function() {
|
|
160
|
+
var mergeRules = new BaseHighlightRules();
|
|
161
|
+
this.$rules = mergeRules.getRules();
|
|
162
|
+
this.$rules.start = this.$rules.start.filter(function (item) {
|
|
163
|
+
return !(item.next == 'githubblock');
|
|
164
|
+
});
|
|
165
|
+
<% highlighter[:start_rules].each do |rule| %>
|
|
166
|
+
this.$rules.start.unshift(<%= rule %>);
|
|
167
|
+
<% end %>
|
|
168
|
+
<% highlighter[:block_rules].each do |id, rule| %>
|
|
169
|
+
this.addRules({
|
|
170
|
+
<%= id %> : <%= rule %>
|
|
171
|
+
});
|
|
172
|
+
if (this.$rules.listblock != null){
|
|
173
|
+
// Some markup languages, like markdown, have a separate starting block for list contents, which also need to parse Gollum Tags.
|
|
174
|
+
this.$rules.listblock.unshift(GollumTagStart);
|
|
175
|
+
}
|
|
176
|
+
<% end %>
|
|
177
|
+
|
|
178
|
+
this.normalizeRules();
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
oop.inherits(GollumHighlightRules, BaseHighlightRules);
|
|
182
|
+
|
|
183
|
+
exports.GollumHighlightRules = GollumHighlightRules;
|
|
184
|
+
});
|
|
185
|
+
<% end %>
|
|
186
|
+
// Done defining the extended HighlightRule definitions
|
|
187
|
+
|
|
188
|
+
(function($) {
|
|
189
|
+
var AceMode = {
|
|
190
|
+
asciidoc: {
|
|
191
|
+
mode: 'asciidoc',
|
|
192
|
+
highlighter: 'GollumAsciidocHighlightRules'
|
|
193
|
+
},
|
|
194
|
+
creole: {
|
|
195
|
+
mode: 'text',
|
|
196
|
+
highlighter: 'GollumTextHighlightRules'
|
|
197
|
+
},
|
|
198
|
+
markdown: {
|
|
199
|
+
mode: 'markdown',
|
|
200
|
+
highlighter: 'GollumMarkdownHighlightRules'
|
|
201
|
+
},
|
|
202
|
+
mediawiki: {
|
|
203
|
+
mode: 'text',
|
|
204
|
+
highlighter: 'GollumTextHighlightRules'
|
|
205
|
+
},
|
|
206
|
+
bib: {
|
|
207
|
+
mode: 'latex'
|
|
208
|
+
},
|
|
209
|
+
org: {
|
|
210
|
+
mode: 'text',
|
|
211
|
+
highlighter: 'GollumTextHighlightRules'
|
|
212
|
+
},
|
|
213
|
+
rst: {
|
|
214
|
+
mode: 'rst',
|
|
215
|
+
highlighter: 'GollumRstHighlightRules'
|
|
216
|
+
},
|
|
217
|
+
txt: {
|
|
218
|
+
mode: 'text'
|
|
219
|
+
},
|
|
220
|
+
pod: {
|
|
221
|
+
mode: 'text',
|
|
222
|
+
highlighter: 'GollumTextHighlightRules'
|
|
223
|
+
},
|
|
224
|
+
rdoc: {
|
|
225
|
+
mode: 'rdoc',
|
|
226
|
+
highlighter: 'GollumRdocHighlightRules'
|
|
227
|
+
},
|
|
228
|
+
textile: {
|
|
229
|
+
mode: 'textile',
|
|
230
|
+
highlighter: 'GollumTextileHighlightRules'
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
$.getEditorMode = function ( mode ) {
|
|
235
|
+
var lang = null;
|
|
236
|
+
if (lang = AceMode[mode]) {
|
|
237
|
+
var ace_mode = lang['mode'];
|
|
238
|
+
var gollum_rules = lang['highlighter'];
|
|
239
|
+
if (gollum_rules){ // We have extended highlighters
|
|
240
|
+
var baseMode = ace.require("ace/mode/" + ace_mode).Mode;
|
|
241
|
+
var dynamicMode = new baseMode();
|
|
242
|
+
dynamicMode.HighlightRules = ace.require(gollum_rules).GollumHighlightRules;
|
|
243
|
+
return dynamicMode;
|
|
244
|
+
} else {
|
|
245
|
+
return "ace/mode/" + ace_mode;
|
|
246
|
+
}
|
|
247
|
+
} else {
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
})(jQuery);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
(function($) {
|
|
2
|
+
|
|
3
|
+
$.markupSupportsEditableSections = function ( markup ) {
|
|
4
|
+
var supportedFormats = ['markdown', 'textile', 'asciidoc', 'rst'];
|
|
5
|
+
return supportedFormats.includes(markup);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
$.findSection = function ( anchor, languageHelpers ) {
|
|
9
|
+
var titles = {};
|
|
10
|
+
|
|
11
|
+
for (i = 0; i < window.ace_editor.getSession().getLength(); i++) {
|
|
12
|
+
var foundLine = null;
|
|
13
|
+
|
|
14
|
+
var results = getSectionTokens(i);
|
|
15
|
+
var section = results[0];
|
|
16
|
+
var header = results[1];
|
|
17
|
+
|
|
18
|
+
if (!section) {
|
|
19
|
+
continue; // No section on this line, go to the next
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (header) {
|
|
23
|
+
header = header['value'];
|
|
24
|
+
foundLine = i; // Header text was found on this line
|
|
25
|
+
} else
|
|
26
|
+
{
|
|
27
|
+
// No header text found on this line. Perhaps the markup language puts section-defining syntax and the title of the section on different lines?
|
|
28
|
+
var header_and_line = getHeader(i, section['value'], languageHelpers);
|
|
29
|
+
if ( header_and_line.length ) {
|
|
30
|
+
header = header_and_line[0];
|
|
31
|
+
foundLine = header_and_line[1];
|
|
32
|
+
} else {
|
|
33
|
+
continue; // No header text was found again. Skip this line.
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Now that we have the header text, compare it to the anchor we're looking for.
|
|
38
|
+
header = generateAnchor(header);
|
|
39
|
+
|
|
40
|
+
// If we've encountered this header before, add an index to it (e.g. 'bilbo-baggins-1'.
|
|
41
|
+
if (index = titles[header]) {
|
|
42
|
+
header = header + '-' + index.toString();
|
|
43
|
+
titles[header] = index+1;
|
|
44
|
+
} else {
|
|
45
|
+
titles[header] = 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Compare the final header to the anchor we're looking for
|
|
49
|
+
if (header == anchor) {
|
|
50
|
+
return foundLine;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function getSectionTokens ( line ) {
|
|
57
|
+
var session = window.ace_editor.getSession();
|
|
58
|
+
tokens = session.getTokens(line);
|
|
59
|
+
|
|
60
|
+
// Assume we can't have more than one section heading per line, so take the first section and the first header text
|
|
61
|
+
section = tokens.filter(function (token) {
|
|
62
|
+
return token.type.startsWith('markup.heading');
|
|
63
|
+
})[0];
|
|
64
|
+
|
|
65
|
+
header = tokens.filter(function (token) {
|
|
66
|
+
return /^(heading)|(text)$/.test(token.type);
|
|
67
|
+
})[0];
|
|
68
|
+
|
|
69
|
+
return [section, header];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function getHeader ( section_line, section_token, languageHelpers ) {
|
|
73
|
+
if (!languageHelpers || !languageHelpers['find-header-line']) {
|
|
74
|
+
return [];
|
|
75
|
+
}
|
|
76
|
+
var results = languageHelpers['find-header-line'](section_line, section_token);
|
|
77
|
+
if ( results == null ) {
|
|
78
|
+
return [];
|
|
79
|
+
} else {
|
|
80
|
+
return [results[0], results[1]];
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function generateAnchor ( header ) {
|
|
85
|
+
return header.trim().replace(/[^a-z0-9_\s]/gi, ' ').replace(/\s\s+/g, ' ').split(/\s/).join('-').replace(/^-/,'').toLowerCase();
|
|
86
|
+
}
|
|
87
|
+
})(jQuery);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//= require ace-builds/src-noconflict/ace
|
|
2
|
+
//= require ace-builds/src-noconflict/mode-markdown
|
|
3
|
+
//= require ace-builds/src-noconflict/mode-asciidoc
|
|
4
|
+
//= require ace-builds/src-noconflict/mode-text
|
|
5
|
+
//= require ace-builds/src-noconflict/mode-rdoc
|
|
6
|
+
//= require ace-builds/src-noconflict/mode-textile
|
|
7
|
+
//= require ace-builds/src-noconflict/mode-rst
|
|
8
|
+
//= require ace-builds/src-noconflict/mode-latex
|
|
9
|
+
//= require ace-builds/src-noconflict/theme-tomorrow
|
|
10
|
+
//= require ace-builds/src-noconflict/keybinding-vim
|
|
11
|
+
//= require ace-builds/src-noconflict/keybinding-emacs
|
|
12
|
+
//= require ace-builds/src-noconflict/ext-elastic_tabstops_lite
|
|
13
|
+
//= require ace-builds/src-noconflict/ext-error_marker
|
|
14
|
+
//= require ace-builds/src-noconflict/ext-keybinding_menu
|
|
15
|
+
//= require ace-builds/src-noconflict/ext-language_tools
|
|
16
|
+
//= require ace-builds/src-noconflict/ext-linking
|
|
17
|
+
//= require ace-builds/src-noconflict/ext-rtl.js
|
|
18
|
+
//= require ace-builds/src-noconflict/ext-searchbox
|
|
19
|
+
//= require ace-builds/src-noconflict/ext-settings_menu
|
|
20
|
+
//= require ace-builds/src-noconflict/ext-spellcheck
|
|
21
|
+
//= require ace-builds/src-noconflict/ext-split
|
|
22
|
+
//= require ace-builds/src-noconflict/ext-static_highlight
|
|
23
|
+
//= require ace-builds/src-noconflict/ext-statusbar
|
|
24
|
+
//= require ace-builds/src-noconflict/ext-textarea
|
|
25
|
+
//= require ace-builds/src-noconflict/ext-themelist
|
|
26
|
+
//= require ace-builds/src-noconflict/ext-whitespace
|
|
27
|
+
//= require editor/modes
|
|
28
|
+
//= require editor/gollum.editor
|
|
29
|
+
//= require editor/langs/default
|
|
30
|
+
//= require_tree ./editor/langs
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
function basicSelectSetSelection(select, value) {
|
|
2
|
+
select.find('.SelectMenu-item').each(function () {
|
|
3
|
+
$(this).attr('aria-checked', false);
|
|
4
|
+
if($(this).attr('value') === value ) {
|
|
5
|
+
$(this).attr('aria-checked', true);
|
|
6
|
+
$(this).closest('details').find('summary span').text($(this).attr('value'));
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function basicSelectGetSelection(select) {
|
|
12
|
+
return select.find('.SelectMenu-item[aria-checked="true"]');
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
$(document).ready(function() {
|
|
16
|
+
|
|
17
|
+
// Implement basic select behavior
|
|
18
|
+
// Only one item can be selected at the same time
|
|
19
|
+
// Close the select modal after selection
|
|
20
|
+
$('.BasicSelect .SelectMenu-item').on('click', function(e) {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
selected = $(this);
|
|
23
|
+
// find select menu context and uncheck all items for that context
|
|
24
|
+
selected.parent('.SelectMenu-list').children('.SelectMenu-item').each(function () {
|
|
25
|
+
$(this).attr('aria-checked', false);
|
|
26
|
+
});
|
|
27
|
+
// select clicked item
|
|
28
|
+
selected.attr('aria-checked', true);
|
|
29
|
+
// Change button text
|
|
30
|
+
details = selected.closest('details');
|
|
31
|
+
details.find('summary span').text(selected.text());
|
|
32
|
+
// Close menu
|
|
33
|
+
details.removeAttr('open');
|
|
34
|
+
// Trigger change callback with selected value
|
|
35
|
+
selected.trigger('change', selected.attr('value'));
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
});
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gollum.dialog.js
|
|
3
|
+
*
|
|
4
|
+
* Used for dialogs. Duh.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
(function($) {
|
|
9
|
+
|
|
10
|
+
var Dialog = {
|
|
11
|
+
|
|
12
|
+
debugOn: false,
|
|
13
|
+
markupCreated: false,
|
|
14
|
+
markup: '',
|
|
15
|
+
|
|
16
|
+
currentAspect: function(){
|
|
17
|
+
if (window.innerWidth < 480) return "small-mobile";
|
|
18
|
+
if ($('#gollum-dialog-dialog').css('position') == 'fixed') return "large-mobile";
|
|
19
|
+
return "desktop";
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
attachEvents: function( evtOK ) {
|
|
23
|
+
$('#gollum-dialog-action-ok').click(function( e ) {
|
|
24
|
+
Dialog.eventOK( e, evtOK );
|
|
25
|
+
});
|
|
26
|
+
$('#gollum-dialog-action-cancel').click( Dialog.eventCancel );
|
|
27
|
+
$('#gollum-dialog-dialog input[type="text"]').keydown(function( e ) {
|
|
28
|
+
if ( e.keyCode == 13 ) {
|
|
29
|
+
Dialog.eventOK( e, evtOK );
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
detachEvents: function() {
|
|
35
|
+
$('#gollum-dialog-action-ok').unbind('click');
|
|
36
|
+
$('#gollum-dialog-action-cancel').unbind('click');
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
createFieldMarkup: function( fieldArray ) {
|
|
40
|
+
var fieldMarkup = '<fieldset>';
|
|
41
|
+
for ( var i=0; i < fieldArray.length; i++ ) {
|
|
42
|
+
if ( typeof fieldArray[i] == 'object' ) {
|
|
43
|
+
fieldMarkup += '<div class="field">';
|
|
44
|
+
switch ( fieldArray[i].type ) {
|
|
45
|
+
|
|
46
|
+
case 'text':
|
|
47
|
+
fieldMarkup += Dialog.createFieldText( fieldArray[i] );
|
|
48
|
+
break;
|
|
49
|
+
|
|
50
|
+
case 'file':
|
|
51
|
+
fieldMarkup += Dialog.createFieldFile( fieldArray[i] );
|
|
52
|
+
break;
|
|
53
|
+
|
|
54
|
+
default:
|
|
55
|
+
break;
|
|
56
|
+
|
|
57
|
+
}
|
|
58
|
+
fieldMarkup += '</div>';
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
fieldMarkup += '</fieldset>';
|
|
63
|
+
return fieldMarkup;
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
createFieldText: function( fieldAttributes ) {
|
|
67
|
+
var html = '';
|
|
68
|
+
|
|
69
|
+
if ( fieldAttributes.name ) {
|
|
70
|
+
html += '<label';
|
|
71
|
+
if ( fieldAttributes.id ) {
|
|
72
|
+
html += ' for="gollum-dialog-dialog-generated-field-' + fieldAttributes.id + '"';
|
|
73
|
+
}
|
|
74
|
+
html += '>' + fieldAttributes.name + '</label>';
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
html += '<input type="text" class="form-control input-sm width-full"';
|
|
78
|
+
|
|
79
|
+
if ( fieldAttributes.id ) {
|
|
80
|
+
html += ' name="' + fieldAttributes.id + '"'
|
|
81
|
+
if ( fieldAttributes.type == 'code' ) {
|
|
82
|
+
html+= ' class="code"';
|
|
83
|
+
}
|
|
84
|
+
if ( fieldAttributes.defaultValue ) {
|
|
85
|
+
html+= ' value="' + fieldAttributes.defaultValue.split('"').join('"') + '"';
|
|
86
|
+
}
|
|
87
|
+
html += ' id="gollum-dialog-dialog-generated-field-' +
|
|
88
|
+
fieldAttributes.id + '">';
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if( fieldAttributes.context ){
|
|
92
|
+
html += '<span class="context">' + fieldAttributes.context + '</span>';
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return html;
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
createFieldFile: function( fieldAttributes ) {
|
|
99
|
+
// Not actually a field, but an embedded form.
|
|
100
|
+
var html = '';
|
|
101
|
+
|
|
102
|
+
var id = fieldAttributes.id || 'upload';
|
|
103
|
+
var name = fieldAttributes.name || 'file';
|
|
104
|
+
var action = fieldAttributes.action || routePath('upload_file');
|
|
105
|
+
|
|
106
|
+
html += '<form method=post enctype="multipart/form-data" ' +
|
|
107
|
+
'action="' + action + '" ' + 'id="' + id + '">';
|
|
108
|
+
html += '<input type=file name="' + name + '" class="form-control width-full">';
|
|
109
|
+
html += '</form>';
|
|
110
|
+
|
|
111
|
+
if( fieldAttributes.context ){
|
|
112
|
+
html += '<span class="context">' + fieldAttributes.context + '</span>';
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return html;
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
createMarkup: function( title, body ) {
|
|
119
|
+
Dialog.markupCreated = true;
|
|
120
|
+
return '<div id="gollum-dialog-dialog">' +
|
|
121
|
+
'<div id="gollum-dialog-dialog-inner" class="border rounded-1">' +
|
|
122
|
+
'<div id="gollum-dialog-dialog-title"><h4 class="f2 border-bottom mb-3">' +
|
|
123
|
+
title +'</h4></div>' +
|
|
124
|
+
'<div id="gollum-dialog-dialog-body">' + body + '</div>' +
|
|
125
|
+
'<div id="gollum-dialog-dialog-buttons" class="pt-2 float-right">' +
|
|
126
|
+
'<button name="Cancel" id="gollum-dialog-action-cancel" ' +
|
|
127
|
+
'class="btn">Cancel</button>' +
|
|
128
|
+
'<span class="px-1"></span>' +
|
|
129
|
+
'<button name="OK" id="gollum-dialog-action-ok" '+
|
|
130
|
+
'class="btn btn-primary">OK</button>' +
|
|
131
|
+
'</div>' +
|
|
132
|
+
'</div>' +
|
|
133
|
+
'</div>';
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
eventCancel: function( e ) {
|
|
137
|
+
e.preventDefault();
|
|
138
|
+
debug('Cancelled dialog.');
|
|
139
|
+
Dialog.hide();
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
eventOK: function( e, evtOK ) {
|
|
143
|
+
e.preventDefault();
|
|
144
|
+
|
|
145
|
+
var results = [];
|
|
146
|
+
// get the results from each field and build them into the object
|
|
147
|
+
$('#gollum-dialog-dialog-body input').each(function() {
|
|
148
|
+
results[$(this).attr('name')] = $(this).val();
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
// pass them to evtOK if it exists (which it should)
|
|
152
|
+
if ( evtOK &&
|
|
153
|
+
typeof evtOK == 'function' ) {
|
|
154
|
+
evtOK( results );
|
|
155
|
+
}
|
|
156
|
+
Dialog.hide();
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
hide: function() {
|
|
160
|
+
$('#gollum-dialog-dialog').animate({ opacity: 0 }, {
|
|
161
|
+
duration: 200,
|
|
162
|
+
complete: function() {
|
|
163
|
+
$('#gollum-dialog-dialog').removeClass('active');
|
|
164
|
+
$('#gollum-dialog-dialog').css('display', 'none');
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
$(window).unbind('resize', Dialog.resize);
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
init: function( argObject ) {
|
|
172
|
+
var title = '';
|
|
173
|
+
var body = '';
|
|
174
|
+
|
|
175
|
+
// bail out if necessary
|
|
176
|
+
if ( !argObject ||
|
|
177
|
+
typeof argObject != 'object' ) {
|
|
178
|
+
debug('Editor Dialog: Cannot init; invalid init object');
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if ( argObject.body && typeof argObject.body == 'string' ) {
|
|
183
|
+
body = '<p>' + argObject.body + '</p>';
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// alright, build out fields
|
|
187
|
+
if ( argObject.fields && typeof argObject.fields == 'object' ) {
|
|
188
|
+
body += Dialog.createFieldMarkup( argObject.fields );
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
if ( argObject.title && typeof argObject.title == 'string' ) {
|
|
192
|
+
title = argObject.title;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
if ( Dialog.markupCreated ) {
|
|
196
|
+
$('#gollum-dialog-dialog').remove();
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
Dialog.markup = Dialog.createMarkup( title, body );
|
|
200
|
+
|
|
201
|
+
$('body').append( Dialog.markup );
|
|
202
|
+
if ( argObject.OK &&
|
|
203
|
+
typeof argObject.OK == 'function' ) {
|
|
204
|
+
Dialog.attachEvents( argObject.OK );
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
Dialog.show();
|
|
208
|
+
},
|
|
209
|
+
|
|
210
|
+
show: function() {
|
|
211
|
+
if ( !Dialog.markupCreated ) {
|
|
212
|
+
debug('Dialog: No markup to show. Please use init first.');
|
|
213
|
+
} else {
|
|
214
|
+
debug('Showing dialog');
|
|
215
|
+
|
|
216
|
+
$('#gollum-dialog.dialog').css('display', 'none');
|
|
217
|
+
$('#gollum-dialog-dialog').animate({ opacity: 0 }, {
|
|
218
|
+
duration: 0,
|
|
219
|
+
complete: function() {
|
|
220
|
+
$('#gollum-dialog-dialog').css('display', 'block');
|
|
221
|
+
Dialog.position(); // position this thing
|
|
222
|
+
$('#gollum-dialog-dialog').animate({ opacity: 1 }, {
|
|
223
|
+
duration: 500
|
|
224
|
+
});
|
|
225
|
+
$($('#gollum-dialog-dialog input[type="text"]').get(0)).focus();
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
$(window).bind('resize', Dialog.resize);
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
|
|
233
|
+
resize: function(){
|
|
234
|
+
Dialog.position();
|
|
235
|
+
},
|
|
236
|
+
|
|
237
|
+
position: function() {
|
|
238
|
+
if (Dialog.currentAspect() == "small-mobile") {
|
|
239
|
+
$('#gollum-dialog-dialog-inner').css('height', '100%').css('margin-top', 'auto');
|
|
240
|
+
}
|
|
241
|
+
else if (Dialog.currentAspect() == "large-mobile") {
|
|
242
|
+
$('#gollum-dialog-dialog-inner').css('height', 'auto').css('margin-top', 'auto');
|
|
243
|
+
}
|
|
244
|
+
else if (Dialog.currentAspect() == "desktop") {
|
|
245
|
+
var dialogHeight = $('#gollum-dialog-dialog-inner').height();
|
|
246
|
+
$('#gollum-dialog-dialog-inner')
|
|
247
|
+
.css('height', dialogHeight + 'px')
|
|
248
|
+
.css('margin-top', -1 * parseInt( dialogHeight / 2 ));
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
var debug = function(m) {
|
|
255
|
+
if ( Dialog.debugOn
|
|
256
|
+
&& typeof console != 'undefined' ) {
|
|
257
|
+
console.log( m );
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
$.GollumDialog = Dialog;
|
|
262
|
+
|
|
263
|
+
})(jQuery);
|