Compare commits
352 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c7729f81ad | |||
| 7e12de0087 | |||
| c9c7db5a53 | |||
| aadbdd8b76 | |||
| b2d372ab3c | |||
| c47a47bc30 | |||
| ad5ec77f41 | |||
| c0bf387cb4 | |||
| 267323c7c3 | |||
| d9b1ea3d51 | |||
| 70bf86f561 | |||
| e1eebb2f75 | |||
| aa258dbe6b | |||
| 5a7659e1c3 | |||
| d51a829038 | |||
| b7ffc4051c | |||
| bb06b566cd | |||
| fc6149a171 | |||
| 4abc32f1ec | |||
| efd734d962 | |||
| 8158610587 | |||
| 2bb62309be | |||
| 401e41b699 | |||
| 3015831d66 | |||
| c2919897e2 | |||
| 83d6cae53f | |||
| 7ad54e3c94 | |||
| c1fc3a92c0 | |||
| 23508d3867 | |||
| b5cb2e6dd6 | |||
| 1ff486e16c | |||
| c22050fca8 | |||
| e910dd0ccf | |||
| 748d76dff1 | |||
| 2ebed41225 | |||
| 86d14fa7ab | |||
| 82e31e971a | |||
| 3d591b49cb | |||
| df505a7289 | |||
| 17dcde1f61 | |||
| 2a052cae8d | |||
| d3594f6652 | |||
| ad561226b9 | |||
| 2523b4e849 | |||
| 9a96d76099 | |||
| e0494a6321 | |||
| 45a300c6bc | |||
| 32a33e0c15 | |||
| ecb44b50e1 | |||
| 83c0dbaaf2 | |||
| f8b25f44f7 | |||
| aabed7a6cc | |||
| 2468aa9350 | |||
| 234f248b17 | |||
| d87750c39d | |||
| 175408e6bd | |||
| 56408bdaa4 | |||
| 118e0df2c3 | |||
| 59eaae8e73 | |||
| d0900520a3 | |||
| 385b56bf77 | |||
| 3bc1e8513e | |||
| 5c95264192 | |||
| c73a6b0045 | |||
| 8403868ac3 | |||
| a1d760df1e | |||
| e4d63ec8a2 | |||
| a0ba81c763 | |||
| d76a40b1a8 | |||
| db3d534ee5 | |||
| fb240fa79e | |||
| c088cc0617 | |||
| 2648e75328 | |||
| 46d70e0492 | |||
| 732e8a9361 | |||
| e3950d52c1 | |||
| 7427ddd900 | |||
| 364b2b85ae | |||
| a71ab7c418 | |||
| 2bb1937fa9 | |||
| 3c44205be7 | |||
| f708dc7002 | |||
| feef486f63 | |||
| a78964ae30 | |||
| 8ddb781588 | |||
| 2b1510af11 | |||
| aae9eb1883 | |||
| 05b53462df | |||
| 56bd0b9757 | |||
| 049d9d6d1f | |||
| e1f92e3ca2 | |||
| 1150303f77 | |||
| d0a8b66607 | |||
| a9d4e117aa | |||
| feff07ae9c | |||
| e77cba96fd | |||
| f6f8428daf | |||
| 11fcf0c784 | |||
| ca2aaa543a | |||
| a1876ccd7a | |||
| dda8a7374f | |||
| e2a4514be5 | |||
| 002fe8d409 | |||
| 710741813b | |||
| daa07326df | |||
| 9a4e2e39a8 | |||
| 0a1ecde7b6 | |||
| 2dbb4e9fa7 | |||
| e4103e6181 | |||
| c5e4935e85 | |||
| 45765eb161 | |||
| 992ec36295 | |||
| 41a21efe9f | |||
| 0fd639a149 | |||
| 32d1f9eb2f | |||
| cc85879810 | |||
| 74a58ce8b5 | |||
| a93a2fb53d | |||
| ea49ef806b | |||
| 21332010ab | |||
| f7b7d0d965 | |||
| 87da1eaa6d | |||
| 4fa3951718 | |||
| 6ffff4e586 | |||
| e641f69589 | |||
| 096edd20da | |||
| 491eee7ebd | |||
| 58a680ab6d | |||
| d0a4fcb7cd | |||
| ed38357ac8 | |||
| 3a6d98aa37 | |||
| 9004e21d93 | |||
| 8b032f03f2 | |||
| 87be3ff414 | |||
| 55aaa5ee08 | |||
| d934ed9d80 | |||
| 6a60bd9544 | |||
| 32b938905e | |||
| 0f15a05ee6 | |||
| 17a57b8071 | |||
| d0475a45ed | |||
| 19ef3710c3 | |||
| 8769e3475b | |||
| 979d89a23f | |||
| 1875eef8f6 | |||
| 79a1fb860d | |||
| 6edd327ff0 | |||
| 511b62c5ab | |||
| 0b37597834 | |||
| ff1c8868dc | |||
| f5480c21d2 | |||
| 2c8be3d95b | |||
| aeb90c6293 | |||
| 8946d098f9 | |||
| f222bbcbac | |||
| 319fb4dc3f | |||
| 8022208c47 | |||
| d7daa331bd | |||
| 88a41a3870 | |||
| 4bc9f70eba | |||
| e2fbac96cb | |||
| db8717d1a3 | |||
| 86b09307c4 | |||
| 875e57b366 | |||
| d436f5f112 | |||
| 079917449a | |||
| a8f74a7e7c | |||
| 9843f4c739 | |||
| 53c2fee24f | |||
| c42091870b | |||
| d8fed1ee84 | |||
| 074b2119fa | |||
| 057baac3ce | |||
| 25a56725f9 | |||
| 54eca090ee | |||
| d4da0f8670 | |||
| e7d37eaf38 | |||
| 5bb7417495 | |||
| a657b12a88 | |||
| 2c932cee5d | |||
| 5e0919efe1 | |||
| 5cb54e0a36 | |||
| 2de9f5f396 | |||
| 0472a95ac0 | |||
| 6bada4cef5 | |||
| 641605b9fa | |||
| 05f259cee8 | |||
| add9402b7e | |||
| c5631ae376 | |||
| 8e432f1abd | |||
| 9e00acc60e | |||
| 389b7cbbe1 | |||
| 57d40c48e3 | |||
| 6cc398ae26 | |||
| 8879f95f39 | |||
| 4d9e48b9a5 | |||
| 8a954f4435 | |||
| f952c5feef | |||
| 0d6c4e2f89 | |||
| a42a30e232 | |||
| 9feb553196 | |||
| d4a78db017 | |||
| d32ab724d3 | |||
| 7a0f6333d6 | |||
| 948cfa0f01 | |||
| 2cbe3957cf | |||
| 2f648d05b4 | |||
| 280afb42ea | |||
| 09d62fa327 | |||
| 2fe6b7b7f1 | |||
| bffa4be78f | |||
| 76064da131 | |||
| 7976a6fc44 | |||
| 4fb36dc263 | |||
| 4222289236 | |||
| c11c61c286 | |||
| 1fa490abc0 | |||
| 449515792a | |||
| d4cba8aeb2 | |||
| 4e9fa6d03a | |||
| d1d7405190 | |||
| b399538f80 | |||
| d78f56db86 | |||
| b6da078ca3 | |||
| 61b1c7f8d1 | |||
| e8f0f01a1d | |||
| 4b6eb34504 | |||
| 1351f3743c | |||
| e49309d3f7 | |||
| db2a6deca9 | |||
| 4dda9fb2ae | |||
| 790ee5d636 | |||
| 652f68bb54 | |||
| 9fc3e8a2ff | |||
| aff6d09cfc | |||
| cd73378748 | |||
| 3f36921186 | |||
| 4a990330dc | |||
| c993099c9c | |||
| 456fc4de57 | |||
| 2658364ca7 | |||
| ac68dd0f73 | |||
| b838d678a1 | |||
| 6ed5899601 | |||
| 4ff4358729 | |||
| 5d6c9c5943 | |||
| ce27400125 | |||
| f6bb61f999 | |||
| 6aace6f21f | |||
| 03569e3134 | |||
| aa0d9c3652 | |||
| 01e3f7b4f7 | |||
| ee8d72a137 | |||
| ae89b245ea | |||
| 36f890d28d | |||
| 18b648a7b0 | |||
| 6a9c9ac0fe | |||
| 1aeabc79b8 | |||
| f8edc0d33a | |||
| 46ab67b211 | |||
| 42c7058ecc | |||
| c8f6059abf | |||
| 3d30cffee6 | |||
| 5ff5212148 | |||
| 62c5de1414 | |||
| 00a934b85d | |||
| 1a2ba11abe | |||
| ba35b2249c | |||
| 530700932f | |||
| 4afc7dce64 | |||
| 8b0590ff8e | |||
| a9ea80f430 | |||
| 24e1305fe4 | |||
| 6d11f1bc85 | |||
| 91313962ed | |||
| c04d22675b | |||
| a37272d4e5 | |||
| e019a38621 | |||
| d6d4e8b26a | |||
| 6a3522c0be | |||
| dff6121a5b | |||
| fcbb54772b | |||
| 404ec5935e | |||
| ec4b93be95 | |||
| b9aad7e2c9 | |||
| 0b8bc597a7 | |||
| 39d16b8c43 | |||
| f276dd0fb6 | |||
| 38a5c296d7 | |||
| d41cff3ef8 | |||
| 648aade4d6 | |||
| 3b94a6723c | |||
| 34b75c2a60 | |||
| 46104dcb83 | |||
| 92aa7f2cd7 | |||
| 83e5c7fe5d | |||
| bc00c0f2ae | |||
| 740ed4362b | |||
| 055e80bbee | |||
| a24d1ca78e | |||
| a1c6829cfc | |||
| ca5bf8b31e | |||
| c9870fb6cb | |||
| b03d361f0e | |||
| ff4fc6f708 | |||
| 4f166dc144 | |||
| bc0c611ea4 | |||
| 338c51e019 | |||
| 8645927cbc | |||
| 649393eb6e | |||
| 742ca5e6dc | |||
| 9ffa79e44e | |||
| 6c76ba20a2 | |||
| ca92b0a8c6 | |||
| 402eb2edaa | |||
| b4006ec007 | |||
| 74b7248334 | |||
| 135156cea5 | |||
| c9cc0d3d37 | |||
| 0b1f1a5338 | |||
| ac1d1c47e2 | |||
| 3e8d2773be | |||
| 26df05374c | |||
| 927b012d6c | |||
| e0c1ea0ec1 | |||
| 67651afb48 | |||
| d0b793366f | |||
| 1227dd6841 | |||
| b9d44662fa | |||
| 21ff30af4d | |||
| 3b6b06a599 | |||
| 60901ddd75 | |||
| 3260c120c1 | |||
| 23ec55cd52 | |||
| 738d171f6b | |||
| 1a19278fc7 | |||
| 54917bbdb9 | |||
| 497b36ad2b | |||
| e7f2da2d4a | |||
| 94c3ac767e | |||
| f2ed24ef8c | |||
| c6dc4acc02 | |||
| b7474b7e41 | |||
| b8a50c0ccc | |||
| 300d8eacc5 | |||
| 6552323797 | |||
| a92a882021 | |||
| ebf7855c09 | |||
| 62c4b795be | |||
| dc7693dbd0 | |||
| f8e7fcf2d2 | |||
| fcdffc39ff |
@@ -1,3 +1,5 @@
|
||||
coverage
|
||||
pkg
|
||||
.DS_Store
|
||||
.bundle
|
||||
Gemfile.lock
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
rvm:
|
||||
- 1.8.7
|
||||
- 1.9.2
|
||||
- rbx-2.0
|
||||
notifications:
|
||||
disabled: true
|
||||
@@ -1,3 +1,50 @@
|
||||
# 1.3.1 / 2011-07-21
|
||||
|
||||
* Major Enhancements
|
||||
* Allow prefixed ID attributes in headers to support internal linking
|
||||
(#146).
|
||||
* Markdown pages are rendered through Redcarpet by default (#176).
|
||||
* Minor Enhancements
|
||||
* Remove Edit button on Preview pages (#164).
|
||||
* Simplify Wiki#inspect and Page#inspect.
|
||||
* Bug Fixes
|
||||
* Fixed broken preview functionality (#157).
|
||||
* Fixed sidebar/footer rendering problems related to whitespace (#145).
|
||||
|
||||
# 1.3.0 / 2011-04-25
|
||||
|
||||
* Major Enhancements
|
||||
* Listing of all Pages
|
||||
* Support for running Gollum under a separate branch.
|
||||
* Minor Enhancements
|
||||
* Fix a security issue with rendering Mathjax.
|
||||
|
||||
# 1.2.0 / 2011-03-11
|
||||
|
||||
* Major Enhancements
|
||||
* Major HTML/CSS/JS overhaul.
|
||||
* Add Sidebars (similar to Footers).
|
||||
* Add commit reverts.
|
||||
* Minor Enhancements
|
||||
* Optimization in source code highlighting, resulting in a huge
|
||||
decrease in rendering time.
|
||||
* Security fixes related to source code highlighting.
|
||||
|
||||
* Major Enhancements
|
||||
* Add Page sidebars, similar to Page footers.
|
||||
* Add the ability to revert commits to the wiki.
|
||||
* Add MediaWiki support.
|
||||
* Minor Enhancements
|
||||
* Add `:sanitization` and `:history_sanitization` options for customizing
|
||||
how `Sanitize.clean` modifies formatted wiki content.
|
||||
* Add `--config` option for the command line, to specify a ruby file that is
|
||||
run during startup.
|
||||
* Provide access to a parsed Nokogiri::DocumentFragment during markup
|
||||
rendering for added customization.
|
||||
* Bug Fixes
|
||||
* Use `@wiki.page_class` in Gollum::Markup where appropriate (#63).
|
||||
* Fix parsing of Org mode file links (#87).
|
||||
|
||||
# 1.1.0 / 2010-10-28
|
||||
|
||||
* Major Enhancements
|
||||
@@ -34,4 +81,4 @@
|
||||
|
||||
# 1.0.0 / 2010-08-12
|
||||
|
||||
* Open Source Birthday!
|
||||
* Open Source Birthday!
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vulputate tincidunt sollicitudin. Quisque sit amet leo sed nunc eleifend rhoncus in consectetur leo. Vivamus posuere semper convallis. Duis malesuada lacus sed erat lobortis tincidunt mattis ligula consectetur. Sed aliquam vulputate eros at euismod. Aenean egestas lorem ligula, quis faucibus turpis. Curabitur a eros in ipsum gravida ornare. Sed elementum enim vel mi scelerisque dapibus. Nulla id libero ligula, quis tempus sem. Morbi nec felis tortor, ac cursus risus. Mauris elementum tortor id lacus eleifend non lobortis tellus pharetra. Etiam posuere cursus vestibulum. $x \lt y$
|
||||
|
||||
Morbi tincidunt dolor vel massa dictum volutpat. Vestibulum quis nibh metus, id tincidunt nisl. Vivamus eget sem ac risus eleifend rhoncus at eu nisl. Nunc elit massa, vulputate ac gravida eget, condimentum quis justo. Integer scelerisque, libero vel consequat ultricies, eros libero sagittis libero, pellentesque bibendum quam massa ut orci. Maecenas sit amet urna eget quam aliquam posuere. Nulla facilisi. Duis imperdiet augue sit amet metus ornare et hendrerit dui feugiat. Aenean a lacus neque. Sed eu enim tincidunt dolor pharetra porttitor. Vestibulum ut felis dui, rutrum iaculis orci. Duis eu bibendum tortor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse mollis sagittis purus sit amet sollicitudin. Phasellus vel interdum erat.
|
||||
@@ -9,7 +9,7 @@ Gollum wikis are simply Git repositories that adhere to a specific format.
|
||||
Gollum pages may be written in a variety of formats and can be edited in a
|
||||
number of ways depending on your needs. You can edit your wiki locally:
|
||||
|
||||
* With your favorite text editor or IDE.
|
||||
* With your favorite text editor or IDE (changes will be visible after committing).
|
||||
* With the built-in web interface.
|
||||
* With the Gollum Ruby API.
|
||||
|
||||
@@ -23,6 +23,11 @@ The best way to install Gollum is with RubyGems:
|
||||
|
||||
$ [sudo] gem install gollum
|
||||
|
||||
If you're installing from source, you can use [Bundler][bundler] to pick up all the
|
||||
gems:
|
||||
|
||||
$ bundle install # ([more info](http://gembundler.com/bundle_install.html))
|
||||
|
||||
In order to use the various formats that Gollum supports, you will need to
|
||||
separately install the necessary dependencies for each format. You only need
|
||||
to install the dependencies for the formats that you plan to use.
|
||||
@@ -35,7 +40,9 @@ to install the dependencies for the formats that you plan to use.
|
||||
* [RDoc](http://rdoc.sourceforge.net/)
|
||||
* [ReStructuredText](http://docutils.sourceforge.net/rst.html) -- `easy_install docutils`
|
||||
* [Textile](http://www.textism.com/tools/textile/) -- `gem install RedCloth`
|
||||
* [MediaWiki](http://www.mediawiki.org/wiki/Help:Formatting) -- `gem install wikicloth`
|
||||
|
||||
[bundler]: http://gembundler.com/
|
||||
|
||||
## RUNNING
|
||||
|
||||
@@ -74,6 +81,7 @@ current list of formats and allowed extensions is:
|
||||
* RDoc: .rdoc
|
||||
* ReStructuredText: .rest.txt, .rst.txt, .rest, .rst
|
||||
* Textile: .textile
|
||||
* MediaWiki: .mediawiki, .wiki
|
||||
|
||||
Gollum detects the page file format via the extension, so files must have one
|
||||
of the supported extensions in order to be converted.
|
||||
@@ -90,13 +98,19 @@ The special page file `Home.ext` (where the extension is one of the supported
|
||||
formats) will be used as the entrance page to your wiki. If it is missing, an
|
||||
automatically generated table of contents will be shown instead.
|
||||
|
||||
## SIDEBAR FILES
|
||||
|
||||
Sidebar files allow you to add a simple sidebar to your wiki. Sidebar files
|
||||
are named `_Sidebar.ext` where the extension is one of the supported formats.
|
||||
Sidebars affect all pages in their directory and any subdirectories that do not
|
||||
have a sidebar file of their own.
|
||||
|
||||
## FOOTER FILES
|
||||
|
||||
Footer files allow you to add a simple footer to your wiki. Footer files must
|
||||
be named `_Footer.ext` where the extension is one of the supported formats.
|
||||
Footers affect all pages in their directory and any subdirectories that do not
|
||||
have a footer file of their own.
|
||||
Like sidebars, footers affect all pages in their directory and any
|
||||
subdirectories that do not have a footer file of their own.
|
||||
|
||||
|
||||
## HTML SANITIZATION
|
||||
@@ -124,6 +138,9 @@ the link text displayed on the page. If the tag is an embedded image, the
|
||||
first thing in the tag will be a path to an image file. Use this trick to
|
||||
easily remember which order things should appear in tags.
|
||||
|
||||
Some formats, such as MediaWiki, support the opposite syntax:
|
||||
|
||||
[[Page Title|Link]]
|
||||
|
||||
## PAGE LINKS
|
||||
|
||||
@@ -210,7 +227,7 @@ the pipe.
|
||||
## IMAGES
|
||||
|
||||
To display images that are contained in the Gollum repository you should use
|
||||
the Gollum Image Tag. This will display the actual image on the page.
|
||||
the Gollum Image Tag. This will display the actual image on the page.
|
||||
|
||||
[[gollum.png]]
|
||||
|
||||
@@ -268,8 +285,8 @@ This is useful for writing about the link syntax in your wiki pages.
|
||||
## SYNTAX HIGHLIGHTING
|
||||
|
||||
In page files you can get automatic syntax highlighting for a wide range of
|
||||
languages (courtesy of [Pygments](http://pygments.org/)) by using the
|
||||
following syntax:
|
||||
languages (courtesy of [Pygments](http://pygments.org/) - must install
|
||||
separately) by using the following syntax:
|
||||
|
||||
```ruby
|
||||
def foo
|
||||
@@ -301,7 +318,7 @@ and `\]`. For example:
|
||||
Inline equations are delimited by `\(` and `\)`. These equations will appear
|
||||
inline with regular text. For example:
|
||||
|
||||
The Pythagorean theorum is \( a^2 + b^2 = c^2 \).
|
||||
The Pythagorean theorem is \( a^2 + b^2 = c^2 \).
|
||||
|
||||
Gollum uses [MathJax](http://www.mathjax.org/) to convert the TeX syntax into
|
||||
output suitable for display in web browsers.
|
||||
@@ -432,4 +449,4 @@ your changes merged back into core is as follows:
|
||||
1. Do not change the version number, I will do that on my end
|
||||
1. If necessary, rebase your commits into logical chunks, without errors
|
||||
1. Push the branch up to GitHub
|
||||
1. Send me (mojombo) a pull request for your branch
|
||||
1. Send a pull request to the github/gollum project.
|
||||
|
||||
@@ -18,7 +18,9 @@ require 'rubygems'
|
||||
require 'gollum'
|
||||
|
||||
exec = {}
|
||||
options = { 'port' => 4567, 'bind' => '127.0.0.1' }
|
||||
options = { 'port' => 4567, 'bind' => '0.0.0.0' }
|
||||
wiki_options = {}
|
||||
|
||||
opts = OptionParser.new do |opts|
|
||||
opts.banner = help
|
||||
|
||||
@@ -35,9 +37,21 @@ opts = OptionParser.new do |opts|
|
||||
exit 0
|
||||
end
|
||||
|
||||
opts.on("--config [CONFIG]", "Path to additional configuration file") do |config|
|
||||
options['config'] = config
|
||||
end
|
||||
|
||||
opts.on("--irb", "Start an irb process with gollum loaded for the current wiki.") do
|
||||
options['irb'] = true
|
||||
end
|
||||
|
||||
opts.on("--page-file-dir [PATH]", "Specify the sub directory for all page files (default: repository root).") do |path|
|
||||
wiki_options[:page_file_dir] = path
|
||||
end
|
||||
|
||||
opts.on("--ref [REF]", "Specify the repository ref to use (default: master).") do |ref|
|
||||
wiki_options[:ref] = ref
|
||||
end
|
||||
end
|
||||
|
||||
# Read command line options into `options` hash
|
||||
@@ -63,13 +77,13 @@ if options['irb']
|
||||
ARGV.replace(args)
|
||||
@__initialized = true
|
||||
end
|
||||
|
||||
|
||||
ws = WorkSpace.new(binding)
|
||||
irb = Irb.new(ws)
|
||||
|
||||
|
||||
@CONF[:IRB_RC].call(irb.context) if @CONF[:IRB_RC]
|
||||
@CONF[:MAIN_CONTEXT] = irb.context
|
||||
|
||||
|
||||
catch(:IRB_EXIT) do
|
||||
irb.eval_input
|
||||
end
|
||||
@@ -77,10 +91,10 @@ if options['irb']
|
||||
end
|
||||
|
||||
begin
|
||||
wiki = Gollum::Wiki.new(gollum_path)
|
||||
wiki = Gollum::Wiki.new(gollum_path, wiki_options)
|
||||
if !wiki.exist? then raise Grit::InvalidGitRepositoryError end
|
||||
puts "Loaded Gollum wiki at #{File.expand_path(gollum_path).inspect}."
|
||||
puts
|
||||
puts
|
||||
puts %( page = wiki.page('page-name'))
|
||||
puts %( # => <Gollum::Page>)
|
||||
puts
|
||||
@@ -99,5 +113,14 @@ if options['irb']
|
||||
else
|
||||
require 'gollum/frontend/app'
|
||||
Precious::App.set(:gollum_path, gollum_path)
|
||||
Precious::App.set(:wiki_options, wiki_options)
|
||||
|
||||
if cfg = options['config']
|
||||
# If the path begins with a '/' it will be considered an absolute path,
|
||||
# otherwise it will be relative to the CWD
|
||||
cfg = File.join(Dir.getwd, cfg) unless cfg.slice(0) == File::SEPARATOR
|
||||
require cfg
|
||||
end
|
||||
|
||||
Precious::App.run!(options)
|
||||
end
|
||||
|
||||
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
|
||||
s.rubygems_version = '1.3.5'
|
||||
|
||||
s.name = 'gollum'
|
||||
s.version = '1.1.0'
|
||||
s.date = '2010-10-28'
|
||||
s.version = '1.3.1'
|
||||
s.date = '2011-07-21'
|
||||
s.rubyforge_project = 'gollum'
|
||||
|
||||
s.summary = "A simple, Git-powered wiki."
|
||||
@@ -18,28 +18,33 @@ Gem::Specification.new do |s|
|
||||
s.require_paths = %w[lib]
|
||||
|
||||
s.executables = ["gollum"]
|
||||
s.default_executable = 'gollum'
|
||||
|
||||
s.rdoc_options = ["--charset=UTF-8"]
|
||||
s.extra_rdoc_files = %w[README.md LICENSE]
|
||||
|
||||
s.add_dependency('grit', "~> 2.3")
|
||||
s.add_dependency('grit', "~> 2.4.1")
|
||||
s.add_dependency('github-markup', [">= 0.4.0", "< 1.0.0"])
|
||||
s.add_dependency('albino', "~> 1.0")
|
||||
s.add_dependency('albino', "~> 1.3.2")
|
||||
s.add_dependency('sinatra', "~> 1.0")
|
||||
s.add_dependency('mustache', [">= 0.11.2", "< 1.0.0"])
|
||||
s.add_dependency('sanitize', "~> 1.1")
|
||||
s.add_dependency('sanitize', "~> 2.0.0")
|
||||
s.add_dependency('nokogiri', "~> 1.4")
|
||||
s.add_dependency('redcarpet')
|
||||
|
||||
s.add_development_dependency('RedCloth')
|
||||
s.add_development_dependency('mocha')
|
||||
s.add_development_dependency('org-ruby')
|
||||
s.add_development_dependency('rdiscount')
|
||||
s.add_development_dependency('shoulda')
|
||||
s.add_development_dependency('rack-test')
|
||||
s.add_development_dependency('wikicloth')
|
||||
s.add_development_dependency('rake', '~> 0.9.2')
|
||||
|
||||
# = MANIFEST =
|
||||
s.files = %w[
|
||||
Gemfile
|
||||
HISTORY.md
|
||||
Home.md
|
||||
LICENSE
|
||||
README.md
|
||||
Rakefile
|
||||
@@ -49,24 +54,256 @@ Gem::Specification.new do |s|
|
||||
lib/gollum.rb
|
||||
lib/gollum/albino.rb
|
||||
lib/gollum/blob_entry.rb
|
||||
lib/gollum/committer.rb
|
||||
lib/gollum/file.rb
|
||||
lib/gollum/frontend/app.rb
|
||||
lib/gollum/frontend/public/css/editbar.css
|
||||
lib/gollum/frontend/public/css/dialog.css
|
||||
lib/gollum/frontend/public/css/editor.css
|
||||
lib/gollum/frontend/public/css/gollum.css
|
||||
lib/gollum/frontend/public/css/screen.css
|
||||
lib/gollum/frontend/public/css/syntax.css
|
||||
lib/gollum/frontend/public/images/buttons.png
|
||||
lib/gollum/frontend/public/images/editbar-buttons.png
|
||||
lib/gollum/frontend/public/images/example.png
|
||||
lib/gollum/frontend/public/images/twiddle-down.png
|
||||
lib/gollum/frontend/public/images/twiddle-right.png
|
||||
lib/gollum/frontend/public/images/txt.png
|
||||
lib/gollum/frontend/public/javascript/MathJax/COPYING.txt
|
||||
lib/gollum/frontend/public/css/ie7.css
|
||||
lib/gollum/frontend/public/css/template.css
|
||||
lib/gollum/frontend/public/images/icon-sprite.png
|
||||
lib/gollum/frontend/public/javascript/MathJax/MathJax.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/README.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/config/MMLorHTML.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/config/MathJax.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/config/local/local.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.buildinfo
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/CSS-styles.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/HTML-snippets.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/api/ajax.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/api/callback.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/api/elementjax.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/api/html.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/api/hub.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/api/index.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/api/inputjax.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/api/jax.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/api/message.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/api/object.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/api/outputjax.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/api/queue.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/api/signal.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/api/variable.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/callbacks.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/community.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/configuration.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/dynamic.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/environment.pickle
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/glossary.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/index.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/installation.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/jsMath.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/mathjax.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/mathml.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/model.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/options/FontWarnings.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/options/HTML-CSS.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/options/MMLorHTML.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/options/MathML.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/options/MathMenu.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/options/MathZoom.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/options/NativeMML.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/options/TeX.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/options/hub.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/options/jsMath2jax.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/options/mml2jax.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/options/tex2jax.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/output.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/platforms/index.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/platforms/movable-type.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/platforms/wordpress.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/queues.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/signals.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/start.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/startup.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/synchronize.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/tex.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/.doctrees/typeset.doctree
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/CSS-styles.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/HTML-snippets.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_images/badge.gif
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_images/mt_head.png
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_images/mt_menu.png
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_images/mt_templates.png
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_images/wp_menu.png
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_images/wp_templates.png
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/CSS-styles.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/HTML-snippets.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/api/ajax.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/api/callback.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/api/elementjax.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/api/html.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/api/hub.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/api/index.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/api/inputjax.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/api/jax.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/api/message.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/api/object.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/api/outputjax.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/api/queue.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/api/signal.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/api/variable.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/callbacks.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/community.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/configuration.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/dynamic.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/glossary.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/index.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/installation.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/jsMath.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/mathjax.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/mathml.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/model.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/options/FontWarnings.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/options/HTML-CSS.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/options/MMLorHTML.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/options/MathML.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/options/MathMenu.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/options/MathZoom.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/options/NativeMML.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/options/TeX.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/options/hub.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/options/jsMath2jax.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/options/mml2jax.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/options/tex2jax.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/output.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/platforms/index.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/platforms/movable-type.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/platforms/wordpress.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/queues.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/signals.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/start.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/startup.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/synchronize.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/tex.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_sources/typeset.txt
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/basic.css
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/doctools.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/file.png
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/jquery.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/mathjax_mathml.user.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/mathjax_wikipedia.user.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/minus.png
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/mj.css
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/plus.png
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/pygments.css
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/searchtools.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/underscore.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/api/ajax.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/api/callback.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/api/elementjax.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/api/html.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/api/hub.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/api/index.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/api/inputjax.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/api/jax.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/api/message.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/api/object.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/api/outputjax.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/api/queue.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/api/signal.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/api/variable.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/callbacks.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/community.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/configuration.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/dynamic.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/genindex.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/glossary.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/index.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/installation.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/jsMath.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/mathjax.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/mathml.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/model.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/objects.inv
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/options/FontWarnings.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/options/HTML-CSS.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/options/MMLorHTML.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/options/MathML.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/options/MathMenu.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/options/MathZoom.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/options/NativeMML.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/options/TeX.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/options/hub.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/options/jsMath2jax.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/options/mml2jax.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/options/tex2jax.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/output.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/platforms/index.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/platforms/movable-type.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/platforms/wordpress.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/queues.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/search.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/searchindex.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/signals.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/start.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/startup.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/synchronize.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/tex.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/html/typeset.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/CSS-styles.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/HTML-snippets.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/_static/mathjax_mathml.user.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/_static/mathjax_wikipedia.user.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/api/ajax.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/api/callback.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/api/elementjax.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/api/html.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/api/hub.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/api/index.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/api/inputjax.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/api/jax.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/api/message.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/api/object.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/api/outputjax.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/api/queue.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/api/signal.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/api/variable.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/callbacks.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/community.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/conf.py
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/configuration.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/dynamic.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/glossary.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/images/mt_head.png
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/images/mt_menu.png
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/images/mt_templates.png
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/images/wp_menu.png
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/images/wp_templates.png
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/index.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/installation.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/jsMath.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/mathjax.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/mathml.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/mjtheme/static/mj.css_t
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/mjtheme/theme.conf
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/model.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/options/FontWarnings.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/options/HTML-CSS.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/options/MMLorHTML.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/options/MathML.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/options/MathMenu.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/options/MathZoom.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/options/NativeMML.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/options/TeX.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/options/hub.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/options/jsMath2jax.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/options/mml2jax.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/options/tex2jax.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/output.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/platforms/index.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/platforms/movable-type.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/platforms/wordpress.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/queues.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/signals.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/start.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/startup.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/synchronize.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/tex.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/docs/rst/typeset.rst
|
||||
lib/gollum/frontend/public/javascript/MathJax/extensions/FontWarnings.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/extensions/MathMenu.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/extensions/MathZoom.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/AMSmath.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/AMSsymbols.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/autobold.js
|
||||
@@ -74,6 +311,7 @@ Gem::Specification.new do |s|
|
||||
lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/mathchoice.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/newcommand.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/noErrors.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/noUndefined.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/unicode.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/verb.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/extensions/jsMath2jax.js
|
||||
@@ -131,10 +369,13 @@ Gem::Specification.new do |s|
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/jax.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/input/TeX/config.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/input/TeX/jax.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/autoload/maction.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/autoload/menclose.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/autoload/mglyph.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/autoload/mmultiscripts.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/autoload/ms.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/blank.gif
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/autoload/mtable.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/autoload/multiline.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/config.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/AlphaPresentForms.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/Arrows.js
|
||||
@@ -240,7 +481,6 @@ Gem::Specification.new do |s|
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GreekItalic.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GreekSSBold.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GreekSSBoldItalic.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Hiragana.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/IPAExtensions.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Latin1Supplement.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/LatinExtendedA.js
|
||||
@@ -268,7 +508,6 @@ Gem::Specification.new do |s|
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/NumberForms.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/PhoneticExtensions.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/SpacingModLetters.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Specials.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/SuperAndSubscripts.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/SuppMathOperators.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/SupplementalArrowsA.js
|
||||
@@ -336,8 +575,6 @@ Gem::Specification.new do |s|
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LetterlikeSymbols.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Main.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MathOperators.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscMathSymbolsB.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscSymbols.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscTechnical.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/PUA.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SpacingModLetters.js
|
||||
@@ -397,7 +634,6 @@ Gem::Specification.new do |s|
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/MiscMathSymbolsA.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/MiscSymbols.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/MiscTechnical.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/SpacingModLetters.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/SuppMathOperators.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/SupplementalArrowsA.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Math/BoldItalic/Main.js
|
||||
@@ -416,7 +652,6 @@ Gem::Specification.new do |s|
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/Other.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/BasicLatin.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/Main.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/Other.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Size1/Regular/Main.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Size2/Regular/Main.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Size3/Regular/Main.js
|
||||
@@ -436,21 +671,36 @@ Gem::Specification.new do |s|
|
||||
lib/gollum/frontend/public/javascript/MathJax/jax/output/NativeMML/jax.js
|
||||
lib/gollum/frontend/public/javascript/MathJax/test/index-images.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/test/index.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/test/sample-dynamic.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/test/sample-mml.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/test/sample-signals.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/test/sample-tex.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/test/sample-tex2mml.html
|
||||
lib/gollum/frontend/public/javascript/MathJax/test/sample.html
|
||||
lib/gollum/frontend/public/javascript/editor/gollum.editor.js
|
||||
lib/gollum/frontend/public/javascript/editor/langs/asciidoc.js
|
||||
lib/gollum/frontend/public/javascript/editor/langs/creole.js
|
||||
lib/gollum/frontend/public/javascript/editor/langs/markdown.js
|
||||
lib/gollum/frontend/public/javascript/editor/langs/org.js
|
||||
lib/gollum/frontend/public/javascript/editor/langs/pod.js
|
||||
lib/gollum/frontend/public/javascript/editor/langs/rdoc.js
|
||||
lib/gollum/frontend/public/javascript/editor/langs/textile.js
|
||||
lib/gollum/frontend/public/javascript/gollum.dialog.js
|
||||
lib/gollum/frontend/public/javascript/gollum.js
|
||||
lib/gollum/frontend/public/javascript/jquery-1.4.2.min.js
|
||||
lib/gollum/frontend/public/javascript/jquery.previewable_comment_form.js
|
||||
lib/gollum/frontend/public/javascript/jquery.tabs.js
|
||||
lib/gollum/frontend/public/javascript/jquery.text_selection-1.0.0.min.js
|
||||
lib/gollum/frontend/public/javascript/gollum.placeholder.js
|
||||
lib/gollum/frontend/public/javascript/jquery.color.js
|
||||
lib/gollum/frontend/public/javascript/jquery.js
|
||||
lib/gollum/frontend/templates/compare.mustache
|
||||
lib/gollum/frontend/templates/create.mustache
|
||||
lib/gollum/frontend/templates/edit.mustache
|
||||
lib/gollum/frontend/templates/editbar.mustache
|
||||
lib/gollum/frontend/templates/editor.mustache
|
||||
lib/gollum/frontend/templates/error.mustache
|
||||
lib/gollum/frontend/templates/history.mustache
|
||||
lib/gollum/frontend/templates/layout.mustache
|
||||
lib/gollum/frontend/templates/page.mustache
|
||||
lib/gollum/frontend/templates/pages.mustache
|
||||
lib/gollum/frontend/templates/search.mustache
|
||||
lib/gollum/frontend/templates/searchbar.mustache
|
||||
lib/gollum/frontend/views/compare.rb
|
||||
lib/gollum/frontend/views/create.rb
|
||||
lib/gollum/frontend/views/edit.rb
|
||||
@@ -459,28 +709,23 @@ Gem::Specification.new do |s|
|
||||
lib/gollum/frontend/views/history.rb
|
||||
lib/gollum/frontend/views/layout.rb
|
||||
lib/gollum/frontend/views/page.rb
|
||||
lib/gollum/frontend/views/pages.rb
|
||||
lib/gollum/frontend/views/search.rb
|
||||
lib/gollum/git_access.rb
|
||||
lib/gollum/markup.rb
|
||||
lib/gollum/page.rb
|
||||
lib/gollum/pagination.rb
|
||||
lib/gollum/ruby1.8.rb
|
||||
lib/gollum/sanitization.rb
|
||||
lib/gollum/wiki.rb
|
||||
templates/formatting.html
|
||||
test/examples/lotr.git/COMMIT_EDITMSG
|
||||
test/examples/lotr.git/HEAD
|
||||
test/examples/lotr.git/config
|
||||
test/examples/lotr.git/description
|
||||
test/examples/lotr.git/hooks/applypatch-msg.sample
|
||||
test/examples/lotr.git/hooks/commit-msg.sample
|
||||
test/examples/lotr.git/hooks/post-commit.sample
|
||||
test/examples/lotr.git/hooks/post-receive.sample
|
||||
test/examples/lotr.git/hooks/post-update.sample
|
||||
test/examples/lotr.git/hooks/pre-applypatch.sample
|
||||
test/examples/lotr.git/hooks/pre-commit.sample
|
||||
test/examples/lotr.git/hooks/pre-rebase.sample
|
||||
test/examples/lotr.git/hooks/prepare-commit-msg.sample
|
||||
test/examples/lotr.git/hooks/update.sample
|
||||
test/examples/lotr.git/index
|
||||
test/examples/lotr.git/info/exclude
|
||||
test/examples/lotr.git/info/refs
|
||||
test/examples/lotr.git/logs/HEAD
|
||||
test/examples/lotr.git/logs/refs/heads/master
|
||||
test/examples/lotr.git/objects/06/131480411710c92a82fe2d1e76932c70feb2e5
|
||||
test/examples/lotr.git/objects/0a/de1e2916346d4c1f2fb63b863fd3c16808fe44
|
||||
test/examples/lotr.git/objects/0e/d8cbe0a25235bd867e65193c7d837c66b328ef
|
||||
@@ -489,9 +734,12 @@ Gem::Specification.new do |s|
|
||||
test/examples/lotr.git/objects/5d/cac289a8603188d2c5caf481dcba2985126aaa
|
||||
test/examples/lotr.git/objects/60/f12f4254f58801b9ee7db7bca5fa8aeefaa56b
|
||||
test/examples/lotr.git/objects/71/4323c104239440a5c66ab12a67ed07a83c404f
|
||||
test/examples/lotr.git/objects/84/0ec5b1ba1320e8ec443f28f99566f615d5af10
|
||||
test/examples/lotr.git/objects/93/6b83ee0dd8837adb82511e40d5e4ebe59bb675
|
||||
test/examples/lotr.git/objects/94/523d7ae48aeba575099dd12926420d8fd0425d
|
||||
test/examples/lotr.git/objects/96/97dc65e095658bbd1b8e8678e08881e86d32f1
|
||||
test/examples/lotr.git/objects/a3/1ca2a7c352c92531a8b99815d15843b259e814
|
||||
test/examples/lotr.git/objects/a8/ad3c09dd842a3517085bfadd37718856dee813
|
||||
test/examples/lotr.git/objects/aa/b61fe89d56f8614c0a8151da34f939dcedfa68
|
||||
test/examples/lotr.git/objects/c3/b43e9f08966b088e7a0192e436b7a884542e05
|
||||
test/examples/lotr.git/objects/dc/596d6b2dd89ab05c66f4abd7d5eb706bc17f19
|
||||
@@ -502,10 +750,61 @@ Gem::Specification.new do |s|
|
||||
test/examples/lotr.git/objects/pack/pack-dcbeaf3f6ff6c5eb08ea2b0a2d83626e8763546b.pack
|
||||
test/examples/lotr.git/packed-refs
|
||||
test/examples/lotr.git/refs/heads/master
|
||||
test/examples/lotr.git/refs/remotes/origin/HEAD
|
||||
test/examples/page_file_dir.git/COMMIT_EDITMSG
|
||||
test/examples/page_file_dir.git/HEAD
|
||||
test/examples/page_file_dir.git/config
|
||||
test/examples/page_file_dir.git/description
|
||||
test/examples/page_file_dir.git/index
|
||||
test/examples/page_file_dir.git/info/exclude
|
||||
test/examples/page_file_dir.git/logs/HEAD
|
||||
test/examples/page_file_dir.git/logs/refs/heads/master
|
||||
test/examples/page_file_dir.git/objects/0c/7d27db1f575263efdcab3dc650f4502a2dbcbf
|
||||
test/examples/page_file_dir.git/objects/22/b404803c966dd92865614d86ff22ca12e50c1e
|
||||
test/examples/page_file_dir.git/objects/25/7cc5642cb1a054f08cc83f2d943e56fd3ebe99
|
||||
test/examples/page_file_dir.git/objects/57/16ca5987cbf97d6bb54920bea6adde242d87e6
|
||||
test/examples/page_file_dir.git/objects/5b/43e14e0a15fb6f08feab1773d1c0991e9f71e2
|
||||
test/examples/page_file_dir.git/refs/heads/master
|
||||
test/examples/revert.git/COMMIT_EDITMSG
|
||||
test/examples/revert.git/HEAD
|
||||
test/examples/revert.git/config
|
||||
test/examples/revert.git/description
|
||||
test/examples/revert.git/index
|
||||
test/examples/revert.git/info/exclude
|
||||
test/examples/revert.git/logs/HEAD
|
||||
test/examples/revert.git/logs/refs/heads/master
|
||||
test/examples/revert.git/objects/20/2ced67cea93c7b6bd2928aa1daef8d1d55a20d
|
||||
test/examples/revert.git/objects/41/76394bfa11222363c66ce7e84b5f154095b6d9
|
||||
test/examples/revert.git/objects/6a/69f92020f5df77af6e8813ff1232493383b708
|
||||
test/examples/revert.git/objects/b4/785957bc986dc39c629de9fac9df46972c00fc
|
||||
test/examples/revert.git/objects/f4/03b791119f8232b7cb0ba455c624ac6435f433
|
||||
test/examples/revert.git/objects/info/packs
|
||||
test/examples/revert.git/objects/pack/pack-a561f8437234f74d0bacb9e0eebe52d207f5770d.idx
|
||||
test/examples/revert.git/objects/pack/pack-a561f8437234f74d0bacb9e0eebe52d207f5770d.pack
|
||||
test/examples/revert.git/packed-refs
|
||||
test/examples/revert.git/refs/heads/master
|
||||
test/examples/revert.git/refs/remotes/origin/HEAD
|
||||
test/examples/yubiwa.git/HEAD
|
||||
test/examples/yubiwa.git/config
|
||||
test/examples/yubiwa.git/description
|
||||
test/examples/yubiwa.git/info/exclude
|
||||
test/examples/yubiwa.git/objects/10/fa2ddc4e3b4009d8a453aace10bd6148c1ad00
|
||||
test/examples/yubiwa.git/objects/52/4b82874327ea7cbf730389964ba7cb3de966de
|
||||
test/examples/yubiwa.git/objects/58/3fc201cb457fb3f1480f3e1e5999b119633835
|
||||
test/examples/yubiwa.git/objects/87/bc1dd46ab3d3874d4e898d45dd512cc20a7cc8
|
||||
test/examples/yubiwa.git/objects/89/64ed1b4e21aa90e831763bbce9034bfda81b70
|
||||
test/examples/yubiwa.git/objects/9f/f6dd0660da5fba2d3374adb2b84fa653bb538b
|
||||
test/examples/yubiwa.git/objects/ac/e97abf2b177815a1972d7db22f229f58c83309
|
||||
test/examples/yubiwa.git/objects/b1/f443863a4816628807fbf86141ebef055dda34
|
||||
test/examples/yubiwa.git/refs/heads/master
|
||||
test/helper.rb
|
||||
test/test_app.rb
|
||||
test/test_committer.rb
|
||||
test/test_file.rb
|
||||
test/test_git_access.rb
|
||||
test/test_markup.rb
|
||||
test/test_page.rb
|
||||
test/test_page_revert.rb
|
||||
test/test_wiki.rb
|
||||
]
|
||||
# = MANIFEST =
|
||||
|
||||
@@ -7,65 +7,23 @@ require 'grit'
|
||||
require 'github/markup'
|
||||
require 'sanitize'
|
||||
|
||||
# ruby 1.8 compatibility
|
||||
require 'gollum/ruby1.8'
|
||||
|
||||
# internal
|
||||
require 'gollum/pagination'
|
||||
require 'gollum/blob_entry'
|
||||
require 'gollum/wiki'
|
||||
require 'gollum/page'
|
||||
require 'gollum/file'
|
||||
require 'gollum/markup'
|
||||
require 'gollum/albino'
|
||||
require File.expand_path('../gollum/git_access', __FILE__)
|
||||
require File.expand_path('../gollum/committer', __FILE__)
|
||||
require File.expand_path('../gollum/pagination', __FILE__)
|
||||
require File.expand_path('../gollum/blob_entry', __FILE__)
|
||||
require File.expand_path('../gollum/wiki', __FILE__)
|
||||
require File.expand_path('../gollum/page', __FILE__)
|
||||
require File.expand_path('../gollum/file', __FILE__)
|
||||
require File.expand_path('../gollum/markup', __FILE__)
|
||||
require File.expand_path('../gollum/albino', __FILE__)
|
||||
require File.expand_path('../gollum/sanitization', __FILE__)
|
||||
|
||||
module Gollum
|
||||
VERSION = '1.1.0'
|
||||
|
||||
SANITIZATION_OPTIONS = {
|
||||
:elements => [
|
||||
'a', 'abbr', 'acronym', 'address', 'area', 'b', 'big',
|
||||
'blockquote', 'br', 'button', 'caption', 'center', 'cite',
|
||||
'code', 'col', 'colgroup', 'dd', 'del', 'dfn', 'dir',
|
||||
'div', 'dl', 'dt', 'em', 'fieldset', 'font', 'form', 'h1',
|
||||
'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'input',
|
||||
'ins', 'kbd', 'label', 'legend', 'li', 'map', 'menu',
|
||||
'ol', 'optgroup', 'option', 'p', 'pre', 'q', 's', 'samp',
|
||||
'select', 'small', 'span', 'strike', 'strong', 'sub',
|
||||
'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th',
|
||||
'thead', 'tr', 'tt', 'u', 'ul', 'var'
|
||||
],
|
||||
:attributes => {
|
||||
:all => ['abbr', 'accept', 'accept-charset',
|
||||
'accesskey', 'action', 'align', 'alt', 'axis',
|
||||
'border', 'cellpadding', 'cellspacing', 'char',
|
||||
'charoff', 'charset', 'checked', 'cite',
|
||||
'class', 'clear', 'cols', 'colspan', 'color',
|
||||
'compact', 'coords', 'datetime', 'dir',
|
||||
'disabled', 'enctype', 'for', 'frame',
|
||||
'headers', 'height', 'href', 'hreflang',
|
||||
'hspace', 'id', 'ismap', 'label', 'lang',
|
||||
'longdesc', 'maxlength', 'media', 'method',
|
||||
'multiple', 'name', 'nohref', 'noshade',
|
||||
'nowrap', 'prompt', 'readonly', 'rel', 'rev',
|
||||
'rows', 'rowspan', 'rules', 'scope',
|
||||
'selected', 'shape', 'size', 'span', 'src',
|
||||
'start', 'summary', 'tabindex', 'target',
|
||||
'title', 'type', 'usemap', 'valign', 'value',
|
||||
'vspace', 'width']
|
||||
},
|
||||
:protocols => {
|
||||
'a' => {'href' => ['http', 'https', 'mailto', :relative]},
|
||||
'img' => {'href' => ['http', 'https', :relative]}
|
||||
}
|
||||
}
|
||||
HISTORY_SANITIZATION_OPTIONS = SANITIZATION_OPTIONS.merge(
|
||||
:add_attributes => {
|
||||
'a' => {'rel' => 'nofollow'}
|
||||
}
|
||||
)
|
||||
VERSION = '1.3.1'
|
||||
|
||||
class Error < StandardError; end
|
||||
|
||||
class DuplicatePageError < Error
|
||||
attr_accessor :dir
|
||||
attr_accessor :existing_path
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
require 'albino'
|
||||
require 'albino/multi'
|
||||
|
||||
class Gollum::Albino < Albino
|
||||
def self.bin
|
||||
Albino.bin
|
||||
end
|
||||
|
||||
def bin
|
||||
Albino.bin
|
||||
end
|
||||
|
||||
def colorize(options = {})
|
||||
html = super.to_s
|
||||
html.sub!(%r{</pre></div>\Z}, "</pre>\n</div>")
|
||||
html
|
||||
end
|
||||
end
|
||||
class Gollum::Albino < Albino::Multi
|
||||
self.bin = ::Albino::Multi.bin
|
||||
end
|
||||
|
||||
@@ -3,21 +3,25 @@ module Gollum
|
||||
# Gets the String SHA for this blob.
|
||||
attr_reader :sha
|
||||
|
||||
# Gets the String full path for this blob.
|
||||
# Gets the full path String for this blob.
|
||||
attr_reader :path
|
||||
|
||||
def initialize(sha, path)
|
||||
# Gets the Fixnum size of this blob.
|
||||
attr_reader :size
|
||||
|
||||
def initialize(sha, path, size = nil)
|
||||
@sha = sha
|
||||
@path = path
|
||||
@dir = @name = @blob = nil
|
||||
@size = size
|
||||
@dir = @name = @blob = nil
|
||||
end
|
||||
|
||||
# Gets the normalized directory path for this blob.
|
||||
# Gets the normalized directory path String for this blob.
|
||||
def dir
|
||||
@dir ||= self.class.normalize_dir(::File.dirname(@path))
|
||||
end
|
||||
|
||||
# Gets the String file base name for this blob.
|
||||
# Gets the file base name String for this blob.
|
||||
def name
|
||||
@name ||= ::File.basename(@path)
|
||||
end
|
||||
@@ -28,7 +32,8 @@ module Gollum
|
||||
#
|
||||
# Returns an unbaked Grit::Blob instance.
|
||||
def blob(repo)
|
||||
@blob ||= Grit::Blob.create(repo, :id => @sha, :name => @name)
|
||||
@blob ||= Grit::Blob.create(repo,
|
||||
:id => @sha, :name => name, :size => @size)
|
||||
end
|
||||
|
||||
# Gets a Page instance for this blob.
|
||||
@@ -48,19 +53,21 @@ module Gollum
|
||||
end
|
||||
|
||||
# Normalizes a given directory name for searching through tree paths.
|
||||
# Ensures that a directory begins with a slash, or
|
||||
# Ensures that a directory begins with a slash, or
|
||||
#
|
||||
# normalize_dir("") # => ""
|
||||
# normalize_dir(".") # => ""
|
||||
# normalize_dir("foo") # => "/foo"
|
||||
# normalize_dir("/foo/") # => "/foo"
|
||||
# normalize_dir("/") # => ""
|
||||
# normalize_dir("c:/") # => ""
|
||||
#
|
||||
# dir - String directory name.
|
||||
#
|
||||
# Returns a normalized String directory name, or nil if no directory
|
||||
# Returns a normalized String directory name, or nil if no directory
|
||||
# is given.
|
||||
def self.normalize_dir(dir)
|
||||
return '' if dir =~ /^.:\/$/
|
||||
if dir
|
||||
dir = ::File.expand_path(dir, '/')
|
||||
dir = '' if dir == '/'
|
||||
|
||||
@@ -0,0 +1,217 @@
|
||||
module Gollum
|
||||
# Responsible for handling the commit process for a Wiki. It sets up the
|
||||
# Git index, provides methods for modifying the tree, and stores callbacks
|
||||
# to be fired after the commit has been made. This is specifically
|
||||
# designed to handle multiple updated pages in a single commit.
|
||||
class Committer
|
||||
# Gets the instance of the Gollum::Wiki that is being updated.
|
||||
attr_reader :wiki
|
||||
|
||||
# Gets a Hash of commit options.
|
||||
attr_reader :options
|
||||
|
||||
# Initializes the Committer.
|
||||
#
|
||||
# wiki - The Gollum::Wiki instance that is being updated.
|
||||
# options - The commit Hash details:
|
||||
# :message - The String commit message.
|
||||
# :name - The String author full name.
|
||||
# :email - The String email address.
|
||||
# :parent - Optional Grit::Commit parent to this update.
|
||||
# :tree - Optional String SHA of the tree to create the
|
||||
# index from.
|
||||
# :committer - Optional Gollum::Committer instance. If provided,
|
||||
# assume that this operation is part of batch of
|
||||
# updates and the commit happens later.
|
||||
#
|
||||
# Returns the Committer instance.
|
||||
def initialize(wiki, options = {})
|
||||
@wiki = wiki
|
||||
@options = options
|
||||
@callbacks = []
|
||||
end
|
||||
|
||||
# Public: References the Git index for this commit.
|
||||
#
|
||||
# Returns a Grit::Index.
|
||||
def index
|
||||
@index ||= begin
|
||||
idx = @wiki.repo.index
|
||||
if tree = options[:tree]
|
||||
idx.read_tree(tree)
|
||||
elsif parent = parents.first
|
||||
idx.read_tree(parent.tree.id)
|
||||
end
|
||||
idx
|
||||
end
|
||||
end
|
||||
|
||||
# Public: The committer for this commit.
|
||||
#
|
||||
# Returns a Grit::Actor.
|
||||
def actor
|
||||
@actor ||= begin
|
||||
@options[:name] = @wiki.default_committer_name if @options[:name].to_s.empty?
|
||||
@options[:email] = @wiki.default_committer_email if @options[:email].to_s.empty?
|
||||
Grit::Actor.new(@options[:name], @options[:email])
|
||||
end
|
||||
end
|
||||
|
||||
# Public: The parent commits to this pending commit.
|
||||
#
|
||||
# Returns an array of Grit::Commit instances.
|
||||
def parents
|
||||
@parents ||= begin
|
||||
arr = [@options[:parent] || @wiki.repo.commit(@wiki.ref)]
|
||||
arr.flatten!
|
||||
arr.compact!
|
||||
arr
|
||||
end
|
||||
end
|
||||
|
||||
# Adds a page to the given Index.
|
||||
#
|
||||
# dir - The String subdirectory of the Gollum::Page without any
|
||||
# prefix or suffix slashes (e.g. "foo/bar").
|
||||
# name - The String Gollum::Page name.
|
||||
# format - The Symbol Gollum::Page format.
|
||||
# data - The String wiki data to store in the tree map.
|
||||
# allow_same_ext - A Boolean determining if the tree map allows the same
|
||||
# filename with the same extension.
|
||||
#
|
||||
# Raises Gollum::DuplicatePageError if a matching filename already exists.
|
||||
# This way, pages are not inadvertently overwritten.
|
||||
#
|
||||
# Returns nothing (modifies the Index in place).
|
||||
def add_to_index(dir, name, format, data, allow_same_ext = false)
|
||||
path = @wiki.page_file_name(name, format)
|
||||
|
||||
dir = '/' if dir.strip.empty?
|
||||
|
||||
fullpath = ::File.join(*[@wiki.page_file_dir, dir, path].compact)
|
||||
fullpath = fullpath[1..-1] if fullpath =~ /^\//
|
||||
|
||||
if index.current_tree && tree = index.current_tree / dir
|
||||
downpath = path.downcase.sub(/\.\w+$/, '')
|
||||
|
||||
tree.blobs.each do |blob|
|
||||
next if page_path_scheduled_for_deletion?(index.tree, fullpath)
|
||||
file = blob.name.downcase.sub(/\.\w+$/, '')
|
||||
file_ext = ::File.extname(blob.name).sub(/^\./, '')
|
||||
if downpath == file && !(allow_same_ext && file_ext == ext)
|
||||
raise DuplicatePageError.new(dir, blob.name, path)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
index.add(fullpath, @wiki.normalize(data))
|
||||
end
|
||||
|
||||
# Update the given file in the repository's working directory if there
|
||||
# is a working directory present.
|
||||
#
|
||||
# dir - The String directory in which the file lives.
|
||||
# name - The String name of the page (may be in human format).
|
||||
# format - The Symbol format of the page.
|
||||
#
|
||||
# Returns nothing.
|
||||
def update_working_dir(dir, name, format)
|
||||
unless @wiki.repo.bare
|
||||
if @wiki.page_file_dir
|
||||
dir = dir.size.zero? ? @wiki.page_file_dir : ::File.join(dir, @wiki.page_file_dir)
|
||||
end
|
||||
|
||||
path =
|
||||
if dir == ''
|
||||
@wiki.page_file_name(name, format)
|
||||
else
|
||||
::File.join(dir, @wiki.page_file_name(name, format))
|
||||
end
|
||||
|
||||
Dir.chdir(::File.join(@wiki.repo.path, '..')) do
|
||||
if file_path_scheduled_for_deletion?(index.tree, path)
|
||||
@wiki.repo.git.rm({'f' => true}, '--', path)
|
||||
else
|
||||
@wiki.repo.git.checkout({}, 'HEAD', '--', path)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Writes the commit to Git and runs the after_commit callbacks.
|
||||
#
|
||||
# Returns the String SHA1 of the new commit.
|
||||
def commit
|
||||
sha1 = index.commit(@options[:message], parents, actor, nil, @wiki.ref)
|
||||
@callbacks.each do |cb|
|
||||
cb.call(self, sha1)
|
||||
end
|
||||
sha1
|
||||
end
|
||||
|
||||
# Adds a callback to be fired after a commit.
|
||||
#
|
||||
# block - A block that expects this Committer instance and the created
|
||||
# commit's SHA1 as the arguments.
|
||||
#
|
||||
# Returns nothing.
|
||||
def after_commit(&block)
|
||||
@callbacks << block
|
||||
end
|
||||
|
||||
# Determine if a given page (regardless of format) is scheduled to be
|
||||
# deleted in the next commit for the given Index.
|
||||
#
|
||||
# map - The Hash map:
|
||||
# key - The String directory or filename.
|
||||
# val - The Hash submap or the String contents of the file.
|
||||
# path - The String path of the page file. This may include the format
|
||||
# extension in which case it will be ignored.
|
||||
#
|
||||
# Returns the Boolean response.
|
||||
def page_path_scheduled_for_deletion?(map, path)
|
||||
parts = path.split('/')
|
||||
if parts.size == 1
|
||||
deletions = map.keys.select { |k| !map[k] }
|
||||
downfile = parts.first.downcase.sub(/\.\w+$/, '')
|
||||
deletions.any? { |d| d.downcase.sub(/\.\w+$/, '') == downfile }
|
||||
else
|
||||
part = parts.shift
|
||||
if rest = map[part]
|
||||
page_path_scheduled_for_deletion?(rest, parts.join('/'))
|
||||
else
|
||||
false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Determine if a given file is scheduled to be deleted in the next commit
|
||||
# for the given Index.
|
||||
#
|
||||
# map - The Hash map:
|
||||
# key - The String directory or filename.
|
||||
# val - The Hash submap or the String contents of the file.
|
||||
# path - The String path of the file including extension.
|
||||
#
|
||||
# Returns the Boolean response.
|
||||
def file_path_scheduled_for_deletion?(map, path)
|
||||
parts = path.split('/')
|
||||
if parts.size == 1
|
||||
deletions = map.keys.select { |k| !map[k] }
|
||||
deletions.any? { |d| d == parts.first }
|
||||
else
|
||||
part = parts.shift
|
||||
if rest = map[part]
|
||||
file_path_scheduled_for_deletion?(rest, parts.join('/'))
|
||||
else
|
||||
false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Proxies methods t
|
||||
def method_missing(name, *args)
|
||||
index.send(name, *args)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -53,11 +53,10 @@ module Gollum
|
||||
def find(name, version)
|
||||
checked = name.downcase
|
||||
map = @wiki.tree_map_for(version)
|
||||
sha = @wiki.ref_map[version] || version
|
||||
if entry = map.detect { |entry| entry.path.downcase == checked }
|
||||
@path = name
|
||||
@blob = Grit::Blob.create(@wiki.repo, :id => entry.sha, :name => entry.name)
|
||||
@version = Grit::Commit.create(@wiki.repo, :id => sha)
|
||||
@blob = entry.blob(@wiki.repo)
|
||||
@version = version.is_a?(Grit::Commit) ? version : @wiki.commit_for(version)
|
||||
self
|
||||
end
|
||||
end
|
||||
|
||||
@@ -30,10 +30,12 @@ module Precious
|
||||
|
||||
# Sinatra error handling
|
||||
configure :development, :staging do
|
||||
set :raise_errors, false
|
||||
set :show_exceptions, true
|
||||
set :dump_errors, true
|
||||
set :clean_trace, false
|
||||
enable :show_exceptions, :dump_errors
|
||||
disable :raise_errors, :clean_trace
|
||||
end
|
||||
|
||||
configure :test do
|
||||
enable :logging, :raise_errors, :dump_errors
|
||||
end
|
||||
|
||||
get '/' do
|
||||
@@ -42,7 +44,7 @@ module Precious
|
||||
|
||||
get '/edit/*' do
|
||||
@name = params[:splat].first
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path)
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
|
||||
if page = wiki.page(@name)
|
||||
@page = page
|
||||
@content = page.raw_data
|
||||
@@ -53,20 +55,24 @@ module Precious
|
||||
end
|
||||
|
||||
post '/edit/*' do
|
||||
name = params[:splat].first
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path)
|
||||
page = wiki.page(name)
|
||||
format = params[:format].intern
|
||||
name = params[:rename] if params[:rename]
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
|
||||
page = wiki.page(params[:splat].first)
|
||||
name = params[:rename] || page.name
|
||||
committer = Gollum::Committer.new(wiki, commit_message)
|
||||
commit = {:committer => committer}
|
||||
|
||||
wiki.update_page(page, name, format, params[:content], commit_message)
|
||||
update_wiki_page(wiki, page, params[:content], commit, name,
|
||||
params[:format])
|
||||
update_wiki_page(wiki, page.footer, params[:footer], commit) if params[:footer]
|
||||
update_wiki_page(wiki, page.sidebar, params[:sidebar], commit) if params[:sidebar]
|
||||
committer.commit
|
||||
|
||||
redirect "/#{CGI.escape(Gollum::Page.cname(name))}"
|
||||
end
|
||||
|
||||
post '/create/*' do
|
||||
post '/create' do
|
||||
name = params[:page]
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path)
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
|
||||
|
||||
format = params[:format].intern
|
||||
|
||||
@@ -79,16 +85,38 @@ module Precious
|
||||
end
|
||||
end
|
||||
|
||||
post '/revert/:page/*' do
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
|
||||
@name = params[:page]
|
||||
@page = wiki.page(@name)
|
||||
shas = params[:splat].first.split("/")
|
||||
sha1 = shas.shift
|
||||
sha2 = shas.shift
|
||||
|
||||
if wiki.revert_page(@page, sha1, sha2, commit_message)
|
||||
redirect "/#{CGI.escape(@name)}"
|
||||
else
|
||||
sha2, sha1 = sha1, "#{sha1}^" if !sha2
|
||||
@versions = [sha1, sha2]
|
||||
diffs = wiki.repo.diff(@versions.first, @versions.last, @page.path)
|
||||
@diff = diffs.first
|
||||
@message = "The patch does not apply."
|
||||
mustache :compare
|
||||
end
|
||||
end
|
||||
|
||||
post '/preview' do
|
||||
format = params['wiki_format']
|
||||
data = params['text']
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path)
|
||||
wiki.preview_page("Preview", data, format).formatted_data
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
|
||||
@name = "Preview"
|
||||
@page = wiki.preview_page(@name, params[:content], params[:format])
|
||||
@content = @page.formatted_data
|
||||
@editable = false
|
||||
mustache :page
|
||||
end
|
||||
|
||||
get '/history/:name' do
|
||||
@name = params[:name]
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path)
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
|
||||
@page = wiki.page(@name)
|
||||
@page_num = [params[:page].to_i, 1].max
|
||||
@versions = @page.versions :page => @page_num
|
||||
@@ -110,20 +138,25 @@ module Precious
|
||||
get '/compare/:name/:version_list' do
|
||||
@name = params[:name]
|
||||
@versions = params[:version_list].split(/\.{2,3}/)
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path)
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
|
||||
@page = wiki.page(@name)
|
||||
diffs = wiki.repo.diff(@versions.first, @versions.last, @page.path)
|
||||
@diff = diffs.first
|
||||
mustache :compare
|
||||
end
|
||||
|
||||
get %r{^/(javascript|css|images)} do
|
||||
halt 404
|
||||
end
|
||||
|
||||
get %r{/(.+?)/([0-9a-f]{40})} do
|
||||
name = params[:captures][0]
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path)
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
|
||||
if page = wiki.page(name, params[:captures][1])
|
||||
@page = page
|
||||
@name = name
|
||||
@content = page.formatted_data
|
||||
@editable = true
|
||||
mustache :page
|
||||
else
|
||||
halt 404
|
||||
@@ -132,21 +165,30 @@ module Precious
|
||||
|
||||
get '/search' do
|
||||
@query = params[:q]
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path)
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
|
||||
@results = wiki.search @query
|
||||
@name = @query
|
||||
mustache :search
|
||||
end
|
||||
|
||||
get '/pages' do
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
|
||||
@results = wiki.pages
|
||||
@ref = wiki.ref
|
||||
mustache :pages
|
||||
end
|
||||
|
||||
get '/*' do
|
||||
show_page_or_file(params[:splat].first)
|
||||
end
|
||||
|
||||
def show_page_or_file(name)
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path)
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
|
||||
if page = wiki.page(name)
|
||||
@page = page
|
||||
@name = name
|
||||
@content = page.formatted_data
|
||||
@editable = true
|
||||
mustache :page
|
||||
elsif file = wiki.file(name)
|
||||
content_type file.mime_type
|
||||
@@ -157,6 +199,15 @@ module Precious
|
||||
end
|
||||
end
|
||||
|
||||
def update_wiki_page(wiki, page, content, commit_message, name = nil, format = nil)
|
||||
return if !page ||
|
||||
((!content || page.raw_data == content) && page.format == format)
|
||||
name ||= page.name
|
||||
format = (format || page.format).to_sym
|
||||
content ||= page.raw_data
|
||||
wiki.update_page(page, name, format, content.to_s, commit_message)
|
||||
end
|
||||
|
||||
def commit_message
|
||||
{ :message => params[:message] }
|
||||
end
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
/* @control dialog */
|
||||
|
||||
#gollum-dialog-dialog {
|
||||
display: block;
|
||||
overflow: visible;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
#gollum-dialog-dialog.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#gollum-dialog-dialog-inner {
|
||||
margin: 0 0 0 -225px;
|
||||
position: relative;
|
||||
width: 450px;
|
||||
|
||||
border: 7px solid #999;
|
||||
border: 7px solid rgba(0, 0, 0, 0.3);
|
||||
border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
}
|
||||
|
||||
#gollum-dialog-dialog-bg {
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
padding: 1em;
|
||||
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#f7f7f7), to(#ffffff));
|
||||
background: -moz-linear-gradient(top, #f7f7f7, #ffffff);
|
||||
}
|
||||
|
||||
#gollum-dialog-dialog-inner h4 {
|
||||
border-bottom: 1px solid #ddd;
|
||||
color: #000;
|
||||
font-size: 1.8em;
|
||||
line-height: normal;
|
||||
font-weight: bold;
|
||||
margin: 0 0 0.75em 0;
|
||||
padding: 0 0 0.3em 0;
|
||||
}
|
||||
|
||||
#gollum-dialog-dialog-body {
|
||||
font-size: 1.2em;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
#gollum-dialog-dialog-body fieldset {
|
||||
display: block;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#gollum-dialog-dialog-body fieldset .field {
|
||||
margin: 0 0 1.5em 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#gollum-dialog-dialog-body fieldset .field label {
|
||||
color: #000;
|
||||
display: block;
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
line-height: 1.6em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
#gollum-dialog-dialog-body fieldset .field input[type="text"] {
|
||||
border: 1px solid #ddd;
|
||||
display: block;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-size: 1.2em;
|
||||
line-height: 1.6em;
|
||||
margin: 0.3em 0 0 0;
|
||||
padding: 0.3em 0.5em;
|
||||
width: 96.5%;
|
||||
}
|
||||
|
||||
#gollum-dialog-dialog-body fieldset .field input.code {
|
||||
font-family: 'Monaco', 'Courier New', Courier, monospace;
|
||||
}
|
||||
|
||||
#gollum-dialog-dialog-body fieldset .field:last-child {
|
||||
margin: 0 0 1em 0;
|
||||
}
|
||||
|
||||
#gollum-dialog-dialog-buttons {
|
||||
border-top: 1px solid #ddd;
|
||||
overflow: hidden;
|
||||
margin: 1.5em 0 0 0;
|
||||
padding: 1em 0 0 0;
|
||||
}
|
||||
|
||||
#gollum-dialog-dialog a.minibutton {
|
||||
float: right;
|
||||
margin-right: 0.5em;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#gollum-dialog-dialog a.minibutton,
|
||||
#gollum-dialog-dialog a.minibutton:visited {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #d4d4d4;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
font-size: 1.2em;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-weight: bold;
|
||||
margin: 0 0 0 0.8em;
|
||||
padding: 0.4em 1em;
|
||||
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f4f4f4', endColorstr='#ececec');
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec));
|
||||
background: -moz-linear-gradient(top, #f4f4f4, #ececec);
|
||||
|
||||
border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
}
|
||||
|
||||
#gollum-dialog-dialog a.minibutton:hover {
|
||||
background: #3072b3;
|
||||
border-color: #518cc6 #518cc6 #2a65a0;
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
|
||||
text-decoration: none;
|
||||
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#599bdc', endColorstr='#3072b3');
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3));
|
||||
background: -moz-linear-gradient(top, #599bdc, #3072b3);
|
||||
}
|
||||
@@ -1,194 +0,0 @@
|
||||
#editbar {
|
||||
border-left: 1px solid #888;
|
||||
border-top: 1px solid #888;
|
||||
border-right: 1px solid #888;
|
||||
overflow: hidden;
|
||||
font-family: sans-serif;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
#editbar .inner {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#editbar .current {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
#editbar .menu {
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#EBF1FF));
|
||||
background: -moz-linear-gradient(top, #fff, #EBF1FF);
|
||||
}
|
||||
|
||||
#editbar .group {
|
||||
float: left;
|
||||
height: 26px;
|
||||
margin: 3px;
|
||||
padding-right: 6px;
|
||||
}
|
||||
|
||||
#editbar .group-right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#editbar .group-right .tab.format {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
#editbar .group-separator {
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#editbar .button {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background: #e7ecfb url(/images/editbar-buttons.png);
|
||||
border: 1px solid #ddd;
|
||||
text-indent: -100px;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
padding: 1px;
|
||||
display: block;
|
||||
float: left;
|
||||
margin: 0 2px;
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
-khtml-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
#editbar .button:hover {
|
||||
background-color: #d9dde7;
|
||||
border-color: #aaa;
|
||||
}
|
||||
|
||||
#editbar .bold {
|
||||
background-position: -97px 4px;
|
||||
}
|
||||
|
||||
#editbar .italic {
|
||||
background-position: -147px 4px;
|
||||
}
|
||||
|
||||
#editbar .link {
|
||||
background-position: -197px 4px;
|
||||
}
|
||||
|
||||
#editbar .image {
|
||||
background-position: -247px 4px;
|
||||
}
|
||||
|
||||
#editbar .ul {
|
||||
background-position: 3px 4px;
|
||||
}
|
||||
|
||||
#editbar .ol {
|
||||
background-position: -47px 4px;
|
||||
}
|
||||
|
||||
#editbar .tab {
|
||||
float: left;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#editbar .tab a {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
height: 26px;
|
||||
padding-left: 18px;
|
||||
padding-right: 12px;
|
||||
line-height: 26px;
|
||||
text-decoration: none;
|
||||
background-image: url(/images/twiddle-right.png);
|
||||
background-position: 0 50%;
|
||||
background-repeat: no-repeat;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
#editbar .tab a.open {
|
||||
background-image: url(/images/twiddle-down.png);
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#editbar .tab a.open:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#editbar .tab a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#editbar .sections {
|
||||
clear: both;
|
||||
float: left;
|
||||
width: 100%;
|
||||
overflow: visible;
|
||||
border-top: 1px solid #888;
|
||||
height: 185px;
|
||||
background-color: #E0EEF7;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#editbar .sections .toc {
|
||||
float: left;
|
||||
width: 20%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#editbar .sections .toc div {
|
||||
cursor: pointer;
|
||||
padding: 4px 4px 4px 6px;
|
||||
background-color: #E0EEF7;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
#editbar .sections .toc div.current {
|
||||
cursor: default;
|
||||
background-color: white;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#editbar .sections .pages {
|
||||
overflow: auto;
|
||||
background-color: white;
|
||||
float: right;
|
||||
width: 80%;
|
||||
height: 185px;
|
||||
}
|
||||
|
||||
#editbar .sections .page {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#editbar .sections .pages th {
|
||||
color: #999;
|
||||
font-weight: bold;
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#editbar .sections .pages td {
|
||||
color: black;
|
||||
padding: 5px;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
#editbar .sections .pages span.invisible {
|
||||
color: #bbb;
|
||||
padding-left: 1px;
|
||||
}
|
||||
|
||||
#editbar .sections .pages .shortcodes th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#editbar .sections .pages .shortcodes ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
@@ -0,0 +1,537 @@
|
||||
/*
|
||||
editor.css
|
||||
Wiki editor formatting
|
||||
*/
|
||||
|
||||
a {
|
||||
-moz-outline: none !important;
|
||||
}
|
||||
|
||||
.jaws {
|
||||
/* JAWS should see it, but you can't */
|
||||
display: block;
|
||||
height: 1px;
|
||||
left: -5000px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: -5000px;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
#gollum-editor {
|
||||
border: 1px solid #e4e4e4;
|
||||
background: #f9f9f9;
|
||||
margin: 1em 0 5em;
|
||||
overflow: hidden;
|
||||
padding: 1em 1em 0.4em;
|
||||
|
||||
border-radius: 1em;
|
||||
-moz-border-radius: 1em;
|
||||
-webkit-border-radius: 1em;
|
||||
}
|
||||
|
||||
.ie #gollum-editor {
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
||||
#gollum-editor form fieldset {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#gollum-editor .singleline {
|
||||
display: block;
|
||||
margin: 0 0 0.7em 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#gollum-editor .singleline input {
|
||||
background: #fff;
|
||||
border: 1px solid #ddd;
|
||||
color: #000;
|
||||
font-size: 1.3em;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
line-height: 1.8em;
|
||||
margin: 1em 0 0.4em;
|
||||
padding: 0.5em;
|
||||
width: 98%;
|
||||
}
|
||||
|
||||
#gollum-editor .singleline input.ph {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
#gollum-editor-title-field input#gollum-editor-page-title {
|
||||
font-weight: bold;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#gollum-editor-title-field.active {
|
||||
border-bottom: 1px solid #ddd;
|
||||
display: block;
|
||||
margin: 0 0 0.3em 0;
|
||||
padding: 0 0 0.5em 0;
|
||||
}
|
||||
|
||||
#gollum-editor-title-field input#gollum-editor-page-title.ph {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/* @control editor-view-tab */
|
||||
#gollum-editor #gollum-editor-type-switcher {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* @control function-bar */
|
||||
#gollum-editor #gollum-editor-function-bar {
|
||||
border-bottom: 1px solid #ddd;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
#gollum-editor-title-field + #gollum-editor-function-bar {
|
||||
margin-top: 0.6em;
|
||||
}
|
||||
|
||||
#gollum-editor #gollum-editor-function-bar #gollum-editor-function-buttons {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#gollum-editor #gollum-editor-function-bar.active #gollum-editor-function-buttons {
|
||||
display: block;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
padding: 0 0 1.1em 0;
|
||||
}
|
||||
|
||||
#gollum-editor #gollum-editor-function-bar a.function-button {
|
||||
background: #f7f7f7;
|
||||
border: 1px solid #ddd;
|
||||
color: #333;
|
||||
display: block;
|
||||
float: left;
|
||||
height: 25px;
|
||||
overflow: hidden;
|
||||
margin: 0.2em 0.5em 0 0;
|
||||
/* text-indent: -5000px; */
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
width: 25px;
|
||||
|
||||
border-radius: 0.3em;
|
||||
-moz-border-radius: 0.3em;
|
||||
-webkit-border-radius: 0.3em;
|
||||
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f4f4f4', endColorstr='#ececec');
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec));
|
||||
background: -moz-linear-gradient(top, #f4f4f4, #ececec);
|
||||
}
|
||||
|
||||
#gollum-editor #gollum-editor-function-bar a.function-button:hover {
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
|
||||
text-decoration: none;
|
||||
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#599bdc', endColorstr='#3072b3');
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3));
|
||||
background: -moz-linear-gradient(top, #599bdc, #3072b3);
|
||||
}
|
||||
|
||||
#gollum-editor #gollum-editor-function-bar a span {
|
||||
background-image: url(../images/icon-sprite.png);
|
||||
background-repeat: no-repeat;
|
||||
display: block;
|
||||
height: 25px;
|
||||
overflow: hidden;
|
||||
text-indent: -5000px;
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
a#function-bold span { background-position: 0 0; }
|
||||
a#function-italic span { background-position: -27px 0; }
|
||||
a#function-underline span { background-position: -54px 0; }
|
||||
a#function-code span { background-position: -82px 0; }
|
||||
a#function-ul span { background-position: -109px 0; }
|
||||
a#function-ol span { background-position: -136px 0; }
|
||||
a#function-blockquote span { background-position: -163px 0; }
|
||||
a#function-hr span { background-position: -190px 0; }
|
||||
a#function-h1 span { background-position: -217px 0; }
|
||||
a#function-h2 span { background-position: -244px 0; }
|
||||
a#function-h3 span { background-position: -271px 0; }
|
||||
a#function-link span { background-position: -298px 0; }
|
||||
a#function-image span { background-position: -324px 0; }
|
||||
a#function-help span { background-position: -405px 0; }
|
||||
|
||||
a#function-bold:hover span { background-position: 0 -28px; }
|
||||
a#function-italic:hover span { background-position: -27px -28px; }
|
||||
a#function-underline:hover span { background-position: -54px -28px; }
|
||||
a#function-code:hover span { background-position: -82px -28px; }
|
||||
a#function-ul:hover span { background-position: -109px -28px; }
|
||||
a#function-ol:hover span { background-position: -136px -28px; }
|
||||
a#function-blockquote:hover span { background-position: -163px -28px; }
|
||||
a#function-hr:hover span { background-position: -190px -28px; }
|
||||
a#function-h1:hover span { background-position: -217px -28px; }
|
||||
a#function-h2:hover span { background-position: -244px -28px; }
|
||||
a#function-h3:hover span { background-position: -271px -28px; }
|
||||
a#function-link:hover span { background-position: -298px -28px; }
|
||||
a#function-image:hover span { background-position: -324px -28px; }
|
||||
a#function-help:hover span { background-position: -405px -28px; }
|
||||
|
||||
|
||||
#gollum-editor #gollum-editor-function-bar a.disabled {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#gollum-editor #gollum-editor-function-bar span.function-divider {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 0.5em;
|
||||
}
|
||||
|
||||
#gollum-editor #gollum-editor-function-bar #gollum-editor-format-selector {
|
||||
overflow: hidden;
|
||||
padding: 0 0 1.1em 0;
|
||||
}
|
||||
|
||||
#gollum-editor #gollum-editor-function-bar
|
||||
#gollum-editor-format-selector select {
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid transparent;
|
||||
|
||||
float: right;
|
||||
font-size: 1.1em;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-weight: bold;
|
||||
line-height: 1.6em;
|
||||
padding: 0.5em 0.7em;
|
||||
margin-bottom: 0;
|
||||
|
||||
|
||||
border-radius: 0.5em;
|
||||
-moz-border-radius: 0.5em;
|
||||
-webkit-border-radius: 0.5em;
|
||||
-moz-outline: none;
|
||||
}
|
||||
|
||||
#gollum-editor #gollum-editor-function-bar
|
||||
#gollum-editor-format-selector select:hover {
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
-moz-outline: none;
|
||||
}
|
||||
|
||||
#gollum-editor #gollum-editor-function-bar
|
||||
#gollum-editor-format-selector label {
|
||||
color: #999;
|
||||
float: right;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
line-height: 1.6em;
|
||||
padding: 0.6em 0.5em 0 0;
|
||||
}
|
||||
|
||||
#gollum-editor #gollum-editor-function-bar
|
||||
#gollum-editor-format-selector label:after {
|
||||
content: ':';
|
||||
}
|
||||
|
||||
|
||||
/* @section form-fields */
|
||||
|
||||
#gollum-editor textarea#gollum-editor-body {
|
||||
background: #fff;
|
||||
border: 1px solid #ddd;
|
||||
font-size: 1.3em;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
line-height: 1.8em;
|
||||
margin: 1em 0 0.4em;
|
||||
padding: 0.5em; /* I don't really like mixing pct & em here… */
|
||||
width: 98%;
|
||||
height: 20em;
|
||||
}
|
||||
|
||||
#gollum-editor input#gollum-editor-submit {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #d4d4d4;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
float: left;
|
||||
font-size: 1.2em;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
padding: 0.4em 1em;
|
||||
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f4f4f4', endColorstr='#ececec');
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec));
|
||||
background: -moz-linear-gradient(top, #f4f4f4, #ececec);
|
||||
|
||||
border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
}
|
||||
|
||||
.webkit #gollum-editor input#gollum-editor-submit {
|
||||
padding: 0.5em 1em 0.45em;
|
||||
}
|
||||
|
||||
.ie #gollum-editor input#gollum-editor-submit {
|
||||
padding: 0.4em 1em 0.5em;
|
||||
}
|
||||
|
||||
#gollum-editor input#gollum-editor-submit:hover {
|
||||
background: #3072b3;
|
||||
border-color: #518cc6 #518cc6 #2a65a0;
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
|
||||
text-decoration: none;
|
||||
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#599bdc', endColorstr='#3072b3');
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3));
|
||||
background: -moz-linear-gradient(top, #599bdc, #3072b3);
|
||||
}
|
||||
|
||||
#gollum-editor .collapsed,
|
||||
#gollum-editor .expanded {
|
||||
border-bottom: 1px solid #ddd;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
padding: 1em 0 0.5em;
|
||||
}
|
||||
|
||||
#gollum-editor #gollum-editor-body + .collapsed,
|
||||
#gollum-editor #gollum-editor-body + .expanded {
|
||||
border-top: 1px solid #ddd;
|
||||
margin-top: 0.7em;
|
||||
}
|
||||
|
||||
#gollum-editor .collapsed a.button,
|
||||
#gollum-editor .expanded a.button {
|
||||
background: #f7f7f7;
|
||||
border: 1px solid #ddd;
|
||||
color: #333;
|
||||
display: block;
|
||||
float: left;
|
||||
height: 25px;
|
||||
overflow: hidden;
|
||||
margin: 0.2em 0.5em 0.75em 0;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
width: 25px;
|
||||
|
||||
border-radius: 0.3em;
|
||||
-moz-border-radius: 0.3em;
|
||||
-webkit-border-radius: 0.3em;
|
||||
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f4f4f4', endColorstr='#ececec');
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec));
|
||||
background: -moz-linear-gradient(top, #f4f4f4, #ececec);
|
||||
}
|
||||
|
||||
#gollum-editor .collapsed h4,
|
||||
#gollum-editor .expanded h4 {
|
||||
font-size: 1.6em;
|
||||
float: left;
|
||||
margin: 0;
|
||||
padding: 0.4em 0 0 0.3em;
|
||||
text-shadow: 0 -1px 0 #fff;
|
||||
}
|
||||
|
||||
#gollum-editor .collapsed a.button:hover,
|
||||
#gollum-editor .expanded h4 a.button:hover {
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
|
||||
text-decoration: none;
|
||||
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#599bdc', endColorstr='#3072b3');
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3));
|
||||
background: -moz-linear-gradient(top, #599bdc, #3072b3);
|
||||
}
|
||||
|
||||
#gollum-editor .collapsed a span,
|
||||
#gollum-editor .expanded a span {
|
||||
background-image: url(../images/icon-sprite.png);
|
||||
background-position: -351px -1px;
|
||||
background-repeat: no-repeat;
|
||||
display: block;
|
||||
height: 25px;
|
||||
overflow: hidden;
|
||||
text-indent: -5000px;
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
#gollum-editor .collapsed a:hover span {
|
||||
background-position: -351px -28px;
|
||||
}
|
||||
|
||||
#gollum-editor .expanded a span {
|
||||
background-position: -378px 0;
|
||||
}
|
||||
|
||||
#gollum-editor .expanded a:hover span {
|
||||
background-position: -378px -28px;
|
||||
}
|
||||
|
||||
#gollum-editor .collapsed textarea {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#gollum-editor .expanded textarea {
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
clear: both;
|
||||
display: block;
|
||||
font-size: 1.3em;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
height: 7em;
|
||||
line-height: 1.8em;
|
||||
margin: 0.7em 0;
|
||||
padding: 0.5em;
|
||||
width: 98%;
|
||||
}
|
||||
|
||||
/* @control minibutton */
|
||||
|
||||
#gollum-editor a.minibutton,
|
||||
#gollum-editor a.minibutton:visited {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #d4d4d4;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
font-size: 1.2em;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-weight: bold;
|
||||
line-height: 1.2em;
|
||||
margin: 0 0 0 0.8em;
|
||||
padding: 0.5em 1em;
|
||||
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f4f4f4', endColorstr='#ececec');
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec));
|
||||
background: -moz-linear-gradient(top, #f4f4f4, #ececec);
|
||||
|
||||
border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
}
|
||||
|
||||
#gollum-editor a.minibutton:hover {
|
||||
background: #3072b3;
|
||||
border-color: #518cc6 #518cc6 #2a65a0;
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
|
||||
text-decoration: none;
|
||||
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#599bdc', endColorstr='#3072b3');
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3));
|
||||
background: -moz-linear-gradient(top, #599bdc, #3072b3);
|
||||
}
|
||||
|
||||
|
||||
#gollum-editor #gollum-editor-preview {
|
||||
float: left;
|
||||
font-weight: normal;
|
||||
padding: left;
|
||||
}
|
||||
|
||||
|
||||
/* @section help */
|
||||
#gollum-editor-help {
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
border: 1px solid #ddd;
|
||||
border-width: 0 1px 1px 1px;
|
||||
}
|
||||
|
||||
#gollum-editor-help-parent,
|
||||
#gollum-editor-help-list {
|
||||
display: block;
|
||||
float: left;
|
||||
height: 17em;
|
||||
list-style-type: none;
|
||||
overflow: auto;
|
||||
margin: 0;
|
||||
padding: 1em 0;
|
||||
width: 18%;
|
||||
}
|
||||
|
||||
#gollum-editor-help-parent {
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
|
||||
#gollum-editor-help-list {
|
||||
background: #fafafa;
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
|
||||
#gollum-editor-help-parent li,
|
||||
#gollum-editor-help-list li {
|
||||
font-size: 1.2em;
|
||||
line-height: 1.6em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#gollum-editor-help-parent li a,
|
||||
#gollum-editor-help-list li a {
|
||||
border: 1px solid transparent;
|
||||
border-width: 1px 0;
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
height: 100%;
|
||||
width: auto;
|
||||
padding: 0.2em 1em;
|
||||
text-shadow: 0 -1px 0 #fff;
|
||||
}
|
||||
|
||||
#gollum-editor-help-parent li a:hover,
|
||||
#gollum-editor-help-list li a:hover {
|
||||
background: #fff;
|
||||
border-color: #f0f0f0;
|
||||
text-decoration: none;
|
||||
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#gollum-editor-help-parent li a.selected,
|
||||
#gollum-editor-help-list li a.selected {
|
||||
border: 1px solid #eee;
|
||||
border-bottom-color: #e7e7e7;
|
||||
border-width: 1px 0;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
|
||||
box-shadow: 0 1px 2px #f0f0f0;
|
||||
}
|
||||
|
||||
#gollum-editor-help-wrapper {
|
||||
background: #fff;
|
||||
overflow: auto;
|
||||
height: 17em;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
#gollum-editor-help-content {
|
||||
font-size: 1.2em;
|
||||
margin: 0 1em 0 0.5em;
|
||||
padding: 0;
|
||||
line-height: 1.8em;
|
||||
}
|
||||
|
||||
#gollum-editor-help-content p {
|
||||
margin: 0 0 1em 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* IE */
|
||||
.ie #gollum-editor .singleline input {
|
||||
padding-top: 0.25em;
|
||||
padding-bottom: 0.75em;
|
||||
}
|
||||
@@ -1,55 +1,664 @@
|
||||
a.absent {
|
||||
color: #a00;
|
||||
}
|
||||
/*
|
||||
gollum.css
|
||||
A basic stylesheet for Gollum
|
||||
*/
|
||||
|
||||
/* Images */
|
||||
|
||||
.frame {
|
||||
/* @section core */
|
||||
body, html {
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 10px; /* -> 1em */
|
||||
margin: 0;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.frame img {
|
||||
display: block;
|
||||
#wiki-wrapper {
|
||||
margin: 0 auto;
|
||||
overflow: visible;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.frame > span {
|
||||
display: block;
|
||||
border: 1px solid #aaa;
|
||||
padding: 4px;
|
||||
a:link {
|
||||
color: #4183c4;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.frame span span {
|
||||
a:hover, a:visited {
|
||||
color: #4183c4;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
|
||||
/* @section head */
|
||||
#head {
|
||||
border-bottom: 1px solid #ccc;
|
||||
margin: 4.5em 0 0.5em;
|
||||
padding: 0.5em 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#head h1 {
|
||||
font-size: 3.3em;
|
||||
float: left;
|
||||
line-height: normal;
|
||||
margin: 0;
|
||||
padding: 0.08em 0 0 0;
|
||||
}
|
||||
|
||||
#head ul.actions {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* @section content */
|
||||
#wiki-content {
|
||||
height: 1%;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
#wiki-content .wrap {
|
||||
height: 1%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* @section comments */
|
||||
#wiki-body #inline-comment {
|
||||
display: none; /* todo */
|
||||
}
|
||||
|
||||
/* @section body */
|
||||
#wiki-body {
|
||||
display: block;
|
||||
float: left;
|
||||
margin-right: 3%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.has-rightbar #wiki-body {
|
||||
width: 68%;
|
||||
}
|
||||
|
||||
/* @section rightbar */
|
||||
#wiki-rightbar {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #ddd;
|
||||
font-size: 13px;
|
||||
float: right;
|
||||
padding: 7px;
|
||||
width: 25%;
|
||||
|
||||
border-radius: 0.5em;
|
||||
-moz-border-radius: 0.5em;
|
||||
-webkit-border-radius: 0.5em;
|
||||
}
|
||||
|
||||
#wiki-rightbar p {
|
||||
margin: 13px 0 0;
|
||||
}
|
||||
|
||||
#wiki-rightbar > p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#wiki-rightbar p.parent {
|
||||
border-bottom: 1px solid #bbb;
|
||||
font-weight: bold;
|
||||
margin: 0 0 0.5em 0;
|
||||
padding: 0 0 0.5em 0;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
/* Back arrow */
|
||||
#wiki-rightbar p.parent:before {
|
||||
color: #666;
|
||||
content: "← ";
|
||||
}
|
||||
|
||||
#wiki-rightbar h3 {
|
||||
font-size: 1.2em;
|
||||
color: #333;
|
||||
margin: 1.2em 0 0;
|
||||
padding: 0;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
#wiki-rightbar ul {
|
||||
margin: 0.5em 0 1em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#wiki-rightbar ul li {
|
||||
color: #bbb;
|
||||
margin: 0 0 0 1em;
|
||||
padding: 0;
|
||||
line-height: 1.75em;
|
||||
list-style-position: inside;
|
||||
list-style-type: round;
|
||||
}
|
||||
|
||||
#wiki-rightbar #nav ul li a {
|
||||
font-weight: bold;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
/* @section footer */
|
||||
#wiki-footer {
|
||||
clear: both;
|
||||
margin: 2em 0 5em;
|
||||
}
|
||||
|
||||
.has-rightbar #wiki-footer {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
#wiki-footer #footer-content {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #ddd;
|
||||
font-size: 1.2em;
|
||||
line-height: 1.5em;
|
||||
margin-top: 1.5em;
|
||||
padding: 1em;
|
||||
|
||||
border-radius: 0.5em;
|
||||
-moz-border-radius: 0.5em;
|
||||
-webkit-border-radius: 0.5em;
|
||||
}
|
||||
|
||||
#wiki-footer #footer-content h3 {
|
||||
font-size: 1.2em;
|
||||
color: #333;
|
||||
margin: 0;
|
||||
padding: 0 0 0.2em;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
#wiki-footer #footer-content p {
|
||||
margin: 0.5em 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#wiki-footer #footer-content ul.links {
|
||||
margin: 0.5em 0 0;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#wiki-footer #footer-content ul.links li {
|
||||
color: #999;
|
||||
float: left;
|
||||
list-style-position: inside;
|
||||
list-style-type: square;
|
||||
padding: 0;
|
||||
margin-left: 0.75em;
|
||||
}
|
||||
|
||||
#wiki-footer #footer-content ul.links li a {
|
||||
font-weight: bold;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
#wiki-footer #footer-content ul.links li:first-child {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.ff #wiki-footer #footer-content ul.links li:first-child {
|
||||
margin: 0 -0.75em 0 0;
|
||||
}
|
||||
|
||||
/* @section page-footer */
|
||||
.page #footer {
|
||||
border-top: 1px solid #ccc;
|
||||
margin: 1em 0 7em;
|
||||
}
|
||||
|
||||
#footer p#last-edit {
|
||||
font-size: 1.2em;
|
||||
line-height: 1.6em;
|
||||
color: #999;
|
||||
margin: 0.9em 0;
|
||||
}
|
||||
|
||||
#footer p#last-edit span.username {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/* @section history */
|
||||
.history h1 {
|
||||
color: #999;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.history h1 strong {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#wiki-history {
|
||||
margin-top: 3em;
|
||||
}
|
||||
|
||||
#wiki-history fieldset {
|
||||
border: 0;
|
||||
margin: 2em 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#wiki-history table, #wiki-history tbody {
|
||||
border-collapse: collapse;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#wiki-history table tr {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#wiki-history table tr {
|
||||
background-color: #ebf2f6;
|
||||
}
|
||||
|
||||
#wiki-history table tr td {
|
||||
border: 1px solid #c0dce9;
|
||||
font-size: 1.2em;
|
||||
line-height: 1.6em;
|
||||
margin: 0;
|
||||
padding: 0.3em 0.7em;
|
||||
}
|
||||
|
||||
#wiki-history table tr td.checkbox {
|
||||
min-width: 2em;
|
||||
padding: 0.3em;
|
||||
}
|
||||
|
||||
#wiki-history table tr td.checkbox input {
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
padding-right: 0;
|
||||
padding-top: 0.4em;
|
||||
margin-right: -0.2em;
|
||||
}
|
||||
|
||||
#wiki-history table tr:nth-child(2n),
|
||||
#wiki-history table tr.alt-row {
|
||||
background-color: #f3f7fa;
|
||||
}
|
||||
|
||||
#wiki-history table tr.selected {
|
||||
background-color: #ffffea !important;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
#wiki-history table tr td.commit-name {
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
#wiki-history table tr td.commit-name span.time-elapsed {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
#wiki-history table tr td.author {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
#wiki-history table tr td.author a {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#wiki-history table tr td.author a span.username {
|
||||
display: block;
|
||||
padding-top: 3px;
|
||||
}
|
||||
|
||||
#wiki-history table tr td img {
|
||||
background-color: #fff;
|
||||
border: 1px solid #999;
|
||||
display: block;
|
||||
float: left;
|
||||
height: 18px;
|
||||
overflow: hidden;
|
||||
margin: 0 0.5em 0 0;
|
||||
width: 18px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#wiki-history table tr td.commit-name a {
|
||||
font-size: 0.9em;
|
||||
font-family: 'Monaco', 'Andale Mono', Consolas, 'Courier New', monospace;
|
||||
padding: 0 0.2em;
|
||||
}
|
||||
|
||||
.history #wiki-history ul.actions li,
|
||||
.history #footer ul.actions li {
|
||||
margin: 0 0.6em 0 0;
|
||||
}
|
||||
|
||||
|
||||
/* @section edit */
|
||||
.edit h1 {
|
||||
color: #999;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.edit h1 strong {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/* @section search */
|
||||
.results h1 {
|
||||
color: #999;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.results h1 strong {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.results #results {
|
||||
border-bottom: 1px solid #ccc;
|
||||
margin-bottom: 2em;
|
||||
padding-bottom: 2em;
|
||||
}
|
||||
|
||||
.results #results ul {
|
||||
margin: 2em 0 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.results #results ul li {
|
||||
font-size: 1.2em;
|
||||
line-height: 1.6em;
|
||||
list-style-position: outside;
|
||||
padding: 0.2em 0;
|
||||
}
|
||||
|
||||
.results #results ul li span.count {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.results p#no-results {
|
||||
font-size: 1.2em;
|
||||
line-height: 1.6em;
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
.results #footer ul.actions li {
|
||||
margin: 0 1em 0 0;
|
||||
}
|
||||
|
||||
|
||||
/* @section compare */
|
||||
.compare h1 {
|
||||
color: #999;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.compare h1 strong {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.compare #compare-content {
|
||||
margin-top: 3em;
|
||||
}
|
||||
|
||||
.compare .data {
|
||||
border: 1px solid #ddd;
|
||||
margin-top: 1em;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.compare .data pre {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.compare .data pre div {
|
||||
padding: 0 0 0 1em;
|
||||
}
|
||||
|
||||
.compare .data tr td {
|
||||
font-family: "Consolas", "Monaco", "Andale Mono", "Courier New", monospace;
|
||||
font-size: 1.2em;
|
||||
line-height: 1.8em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.compare .data td.line_numbers {
|
||||
background: #f7f7f7;
|
||||
border-right: 1px solid #999;
|
||||
color: #999;
|
||||
padding: 0 0 0 0.5em;
|
||||
}
|
||||
|
||||
.compare #compare-content ul.actions li,
|
||||
.compare #footer ul.actions li {
|
||||
margin-left: 0;
|
||||
margin-right: 0.6em;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* @control syntax */
|
||||
.highlight { background: #ffffff; }
|
||||
.highlight .c { color: #999988; font-style: italic }
|
||||
.highlight .err { color: #a61717; background-color: #e3d2d2 }
|
||||
.highlight .k { font-weight: bold }
|
||||
.highlight .o { font-weight: bold }
|
||||
.highlight .cm { color: #999988; font-style: italic }
|
||||
.highlight .cp { color: #999999; font-weight: bold }
|
||||
.highlight .c1 { color: #999988; font-style: italic }
|
||||
.highlight .cs { color: #999999; font-weight: bold; font-style: italic }
|
||||
.highlight .gd { color: #000000; background-color: #ffdddd }
|
||||
.highlight .gd .x { color: #000000; background-color: #ffaaaa }
|
||||
.highlight .ge { font-style: italic }
|
||||
.highlight .gr { color: #aa0000 }
|
||||
.highlight .gh { color: #999999 }
|
||||
.highlight .gi { color: #000000; background-color: #ddffdd }
|
||||
.highlight .gi .x { color: #000000; background-color: #aaffaa }
|
||||
.highlight .gc { color: #999; background-color: #EAF2F5 }
|
||||
.highlight .go { color: #888888 }
|
||||
.highlight .gp { color: #555555 }
|
||||
.highlight .gs { font-weight: bold }
|
||||
.highlight .gu { color: #aaaaaa }
|
||||
.highlight .gt { color: #aa0000 }
|
||||
|
||||
|
||||
/* @control minibutton */
|
||||
ul.actions {
|
||||
display: block;
|
||||
list-style-type: none;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul.actions li {
|
||||
float: left;
|
||||
font-size: 1.2em;
|
||||
margin-left: 0.6em;
|
||||
}
|
||||
|
||||
.minibutton a {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #d4d4d4;
|
||||
color: #333;
|
||||
display: block;
|
||||
font-size: 10pt;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
padding: 4px 0 2px 0;
|
||||
text-align: center;
|
||||
line-height: 10pt;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
padding: 0.4em 1em;
|
||||
height: 1.4em;
|
||||
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f4f4f4', endColorstr='#ececec');
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec));
|
||||
background: -moz-linear-gradient(top, #f4f4f4, #ececec);
|
||||
|
||||
border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
}
|
||||
|
||||
.float-left {
|
||||
float: left;
|
||||
padding: .5em 1em .25em 0;
|
||||
#search-submit {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #d4d4d4;
|
||||
color: #333;
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
padding: 0.4em 1em;
|
||||
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f4f4f4', endColorstr='#ececec');
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec));
|
||||
background: -moz-linear-gradient(top, #f4f4f4, #ececec);
|
||||
|
||||
border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
}
|
||||
|
||||
.float-right {
|
||||
.minibutton a:hover,
|
||||
#search-submit:hover {
|
||||
background: #3072b3;
|
||||
border-color: #518cc6 #518cc6 #2a65a0;
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
|
||||
text-decoration: none;
|
||||
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#599bdc', endColorstr='#3072b3');
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3));
|
||||
background: -moz-linear-gradient(top, #599bdc, #3072b3);
|
||||
}
|
||||
|
||||
.minibutton a:visited {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
/* @special error */
|
||||
#wiki-wrapper.error {
|
||||
height: 1px;
|
||||
position: absolute;
|
||||
overflow: visible;
|
||||
top: 50%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#error {
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #e4e4e4;
|
||||
left: 50%;
|
||||
overflow: hidden;
|
||||
padding: 2%;
|
||||
margin: -10% 0 0 -35%;
|
||||
position: absolute;
|
||||
width: 70%;
|
||||
|
||||
border-radius: 0.5em;
|
||||
-moz-border-radius: 0.5em;
|
||||
-webkit-border-radius: 0.5em;
|
||||
}
|
||||
|
||||
#error h1 {
|
||||
font-size: 3em;
|
||||
line-height: normal;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#error p {
|
||||
font-size: 1.2em;
|
||||
line-height: 1.6em;
|
||||
margin: 1em 0 0.5em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
/* @control searchbar */
|
||||
#head #searchbar {
|
||||
float: right;
|
||||
padding: .5em 0 .25em 1em;
|
||||
margin: 1em 0 0 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
display: block;
|
||||
text-align: left;
|
||||
}
|
||||
#head #searchbar #searchbar-fauxtext {
|
||||
background: #fff;
|
||||
border: 1px solid #d4d4d4;
|
||||
overflow: hidden;
|
||||
|
||||
border-radius: 0.3em;
|
||||
-moz-border-radius: 0.3em;
|
||||
-webkit-border-radius: 0.3em;
|
||||
}
|
||||
|
||||
.align-center {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
#head #searchbar #searchbar-fauxtext input#search-query {
|
||||
border: none;
|
||||
color: #000;
|
||||
float: left;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-size: 1.2em;
|
||||
height: 1.8em;
|
||||
|
||||
-webkit-focus-ring: none;
|
||||
}
|
||||
|
||||
.align-right {
|
||||
display: block;
|
||||
text-align: right;
|
||||
}
|
||||
.ff #head #searchbar #searchbar-fauxtext input#search-query {
|
||||
padding: 0.2em 0 0.2em 0.5em;
|
||||
}
|
||||
|
||||
.ie #head #searchbar #searchbar-fauxtext input#search-query {
|
||||
padding: 0.4em 0 0 0.5em;
|
||||
}
|
||||
|
||||
#head #searchbar #searchbar-fauxtext input#search-query.ph {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
#head #searchbar #searchbar-fauxtext #search-submit {
|
||||
border: 0;
|
||||
border-left: 1px solid #d4d4d4;
|
||||
cursor: pointer;
|
||||
margin: 0 !important;
|
||||
padding: 0;
|
||||
float: right;
|
||||
font-size: 1.2em;
|
||||
|
||||
border-radius: 0 3px 3px 0;
|
||||
-moz-border-radius: 0 3px 3px 0;
|
||||
-webkit-border-radius: 0 3px 3px 0;
|
||||
}
|
||||
|
||||
#head #searchbar #searchbar-fauxtext #search-submit span {
|
||||
background-image: url(/images/icon-sprite.png);
|
||||
background-position: -431px -1px;
|
||||
background-repeat: no-repeat;
|
||||
display: block;
|
||||
height: 2em;
|
||||
overflow: hidden;
|
||||
text-indent: -5000px;
|
||||
width: 28px;
|
||||
}
|
||||
|
||||
.ff #head #searchbar #searchbar-fauxtext #search-submit span,
|
||||
.ie #head #searchbar #searchbar-fauxtext #search-submit span {
|
||||
height: 2.2em;
|
||||
}
|
||||
|
||||
#head #searchbar #searchbar-fauxtext #search-submit:hover span {
|
||||
background-position: -431px -28px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
#MathJax_Message {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/* IE7-specific styles */
|
||||
|
||||
.ie #head #searchbar #searchbar-fauxtext input#search-query {
|
||||
border: 0;
|
||||
float: left;
|
||||
padding: 0.4em 0 0 0.5em;
|
||||
}
|
||||
|
||||
.ie #head #searchbar #searchbar-fauxtext #search-submit span {
|
||||
height: 2.25em;
|
||||
}
|
||||
|
||||
#head #searchbar,
|
||||
#head ul.actions {
|
||||
margin: 1em 0 0 0;
|
||||
}
|
||||
|
||||
ul.actions {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.compare #footer ul.actions {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.compare div.data {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.history #version-form {
|
||||
margin: -0.5em 0 -0.5em !important;
|
||||
}
|
||||
|
||||
#gollum-editor {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
#gollum-editor-help-parent li a,
|
||||
#gollum-editor-help-list li a {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
#gollum-editor #gollum-editor-format-selector {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
#gollum-editor .singleline input {
|
||||
padding-top: 0.25em;
|
||||
}
|
||||
|
||||
#gollum-editor .collapsed {
|
||||
padding-bottom: 1.1em;
|
||||
}
|
||||
|
||||
#gollum-editor #gollum-editor-submit {
|
||||
padding: 0.5em 1em 0.3em !important;
|
||||
}
|
||||
|
||||
#gollum-editor #gollum-editor-preview {
|
||||
line-height: 1.3em;
|
||||
}
|
||||
|
||||
#gollum-editor form {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#gollum-editor #gollum-editor-format-selector label {
|
||||
padding-top: 0.1em !important;
|
||||
}
|
||||
@@ -1,726 +0,0 @@
|
||||
/****************************************************************************/
|
||||
/* Base
|
||||
/****************************************************************************/
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
color: black;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: white;
|
||||
font: 13.34px helvetica, arial, freesans, clean, sans-serif;
|
||||
*font-size: small;
|
||||
}
|
||||
|
||||
table {
|
||||
font-size: inherit;
|
||||
font: 100%;
|
||||
}
|
||||
|
||||
select, input[type=text], input[type=password], input[type=image], textarea {
|
||||
font: 99% helvetica, arial, freesans, sans-serif;
|
||||
}
|
||||
select, option {
|
||||
padding: 0 .25em;
|
||||
}
|
||||
optgroup {
|
||||
margin-top: .5em;
|
||||
}
|
||||
|
||||
input.text {
|
||||
padding: 1px 0;
|
||||
}
|
||||
pre, code {
|
||||
font: 12px Monaco, "Courier New", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace;
|
||||
}
|
||||
|
||||
body * {
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
p{ margin:1em 0; }
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
abbr {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
}
|
||||
* html .clearfix {height: 1%;}
|
||||
.clearfix {display:inline-block;}
|
||||
.clearfix {display: block;}
|
||||
|
||||
/* always show vertical scroll bar to prevent page jitter */
|
||||
html {overflow-y: scroll;}
|
||||
|
||||
.site {
|
||||
margin: 2em auto 0 auto;
|
||||
width: 920px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* Guides
|
||||
/****************************************************************************/
|
||||
|
||||
#guides {
|
||||
|
||||
}
|
||||
|
||||
/* index */
|
||||
|
||||
#guides .index {
|
||||
|
||||
}
|
||||
|
||||
#guides h1 {
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
|
||||
#guides .index ul {
|
||||
list-style-type: none;
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
#guides .index ul li {
|
||||
padding-left: 1.5em;
|
||||
background: white url(/images/modules/guides/book.png) no-repeat;
|
||||
}
|
||||
|
||||
#guides .index .new {
|
||||
margin-top: 1em;
|
||||
border-top: 1px solid #ccc;
|
||||
padding-top: .5em;
|
||||
}
|
||||
|
||||
#guides .index .new ul li {
|
||||
background: white url(/images/modules/guides/book_add.png) no-repeat;
|
||||
}
|
||||
|
||||
#guides .index .new ul li a {
|
||||
color: #c00;
|
||||
}
|
||||
|
||||
#guides .write .delete_page {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* guide */
|
||||
|
||||
#guides .guide {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* main */
|
||||
|
||||
#guides .guide .main {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* sidebar */
|
||||
|
||||
#guides .guide .sidebar {
|
||||
float: right;
|
||||
width: 15em;
|
||||
border-left: 4px solid #e6e6e6;
|
||||
margin: 2.1em 0 0 0;
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
#guides .guide .sidebar h3 {
|
||||
margin: 0 0 .5em 0;
|
||||
}
|
||||
|
||||
#guides .guide .sidebar ul {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
color: #888;
|
||||
|
||||
}
|
||||
|
||||
#guides .guide .sidebar ul li {
|
||||
padding-left: 12px;
|
||||
background: white url(/images/modules/guides/sidebar/bullet_blue.png) -4px 0 no-repeat;
|
||||
margin: .2em 0;
|
||||
}
|
||||
|
||||
/* admin */
|
||||
|
||||
#guides .admin {
|
||||
clear: both;
|
||||
margin-top: 3em;
|
||||
border-top: 4px solid #e6e6e6;
|
||||
padding-top: .3em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* write */
|
||||
|
||||
#guides .write {
|
||||
|
||||
}
|
||||
|
||||
#guides .write label {
|
||||
font-size: 110%;
|
||||
color: #666;
|
||||
display: block;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
#guides .write input.text {
|
||||
padding: 5px;
|
||||
border: 1px solid #888;
|
||||
width: 40em;
|
||||
}
|
||||
|
||||
#guides .write textarea {
|
||||
width: 100%;
|
||||
height: 25em;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#guides .write label span.title {
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#guides .write .actions input {
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
#guides .write #preview_bucket {
|
||||
border: 1px solid #888;
|
||||
background-color: white;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* Wiki
|
||||
/****************************************************************************/
|
||||
|
||||
.wikistyle h1, .wikistyle h2, .wikistyle h3, .wikistyle h4, .wikistyle h5, .wikistyle h6 {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
.wikistyle h1 {
|
||||
font-size: 170% !important;
|
||||
border-top: 4px solid #aaa !important;
|
||||
padding-top: .5em !important;
|
||||
margin-top: 1.5em !important;
|
||||
}
|
||||
|
||||
.wikistyle h2 {
|
||||
font-size: 150% !important;
|
||||
margin-top: 1.5em !important;
|
||||
border-top: 4px solid #e0e0e0 !important;
|
||||
padding-top: .5em !important;
|
||||
}
|
||||
|
||||
.wikistyle h3 {
|
||||
margin-top: 1em !important;
|
||||
}
|
||||
|
||||
.wikistyle p {
|
||||
margin: 1em 0 !important;
|
||||
line-height: 1.5em !important;
|
||||
}
|
||||
|
||||
.wikistyle ul {
|
||||
margin: 1em 0 1em 2em !important;
|
||||
}
|
||||
|
||||
.wikistyle ol {
|
||||
margin: 1em 0 1em 2em !important;
|
||||
}
|
||||
|
||||
.wikistyle ul ul,
|
||||
.wikistyle ul ol,
|
||||
.wikistyle ol ol,
|
||||
.wikistyle ol ul {
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.wikistyle blockquote {
|
||||
margin: 1em 0 !important;
|
||||
border-left: 5px solid #ddd !important;
|
||||
padding-left: .6em !important;
|
||||
color: #555 !important;
|
||||
}
|
||||
|
||||
.wikistyle dt {
|
||||
font-weight: bold !important;
|
||||
margin-left: 1em !important;
|
||||
}
|
||||
|
||||
.wikistyle dd {
|
||||
margin-left: 2em !important;
|
||||
margin-bottom: 1em !important;
|
||||
}
|
||||
|
||||
.wikistyle table {
|
||||
margin: 1em 0 !important;
|
||||
}
|
||||
|
||||
.wikistyle table th {
|
||||
border-bottom: 1px solid #bbb !important;
|
||||
padding: .2em 1em !important;
|
||||
}
|
||||
|
||||
.wikistyle table td {
|
||||
border-bottom: 1px solid #ddd !important;
|
||||
padding: .2em 1em !important;
|
||||
}
|
||||
|
||||
.wikistyle pre {
|
||||
margin: 1em 0 !important;
|
||||
font-size: 90% !important;
|
||||
background-color: #f8f8ff !important;
|
||||
border: 1px solid #dedede !important;
|
||||
padding: .5em !important;
|
||||
line-height: 1.5em !important;
|
||||
color: #444 !important;
|
||||
overflow: auto !important;
|
||||
}
|
||||
|
||||
.wikistyle pre code {
|
||||
padding: 0 !important;
|
||||
font-size: 100% !important;
|
||||
background-color: #f8f8ff !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.wikistyle code {
|
||||
font-size: 90% !important;
|
||||
background-color: #f8f8ff !important;
|
||||
color: #444 !important;
|
||||
padding: 0 .2em !important;
|
||||
border: 1px solid #dedede !important;
|
||||
}
|
||||
|
||||
/* console */
|
||||
|
||||
.wikistyle pre.console {
|
||||
margin: 1em 0 !important;
|
||||
font-size: 90% !important;
|
||||
background-color: black !important;
|
||||
padding: .5em !important;
|
||||
line-height: 1.5em !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.wikistyle pre.console code {
|
||||
padding: 0 !important;
|
||||
font-size: 100% !important;
|
||||
background-color: black !important;
|
||||
border: none !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.wikistyle pre.console span {
|
||||
color: #888 !important;
|
||||
}
|
||||
|
||||
.wikistyle pre.console span.command {
|
||||
color: yellow !important;
|
||||
}
|
||||
|
||||
/* Wiki form */
|
||||
|
||||
.wiki-form .inner {
|
||||
margin: 0;
|
||||
padding: 0 0 0 5px;
|
||||
background: #fff;
|
||||
border: solid 1px #888;
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
.wiki-form input[type=text] {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
label.wiki-label {
|
||||
padding: 1em 5px;
|
||||
}
|
||||
|
||||
/* Special markup considerations */
|
||||
|
||||
.wikistyle.gollum.footer {
|
||||
border-top: 4px solid #f0f0f0;
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
.wikistyle.gollum > h1:first-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* asciidoc */
|
||||
|
||||
.wikistyle.gollum.asciidoc > div#header > h1:first-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wikistyle.gollum.asciidoc .ulist p,
|
||||
.wikistyle.gollum.asciidoc .olist p {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.wikistyle.gollum.asciidoc .loweralpha {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
|
||||
.wikistyle.gollum.asciidoc .lowerroman {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
|
||||
.wikistyle.gollum.asciidoc .upperalpha {
|
||||
list-style-type: upper-alpha;
|
||||
}
|
||||
|
||||
.wikistyle.gollum.asciidoc .upperroman {
|
||||
list-style-type: upper-roman;
|
||||
}
|
||||
|
||||
/* org */
|
||||
|
||||
.wikistyle.gollum.org > p.title:first-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wikistyle.gollum.org p:first-child + h1 {
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
/* pod */
|
||||
|
||||
.wikistyle.gollum.pod > a.dummyTopAnchor:first-child + h1 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wikistyle.gollum.pod h1 a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* rest */
|
||||
|
||||
.wikistyle.gollum.rest > div.document > div.section > h1:first-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* Comment Form
|
||||
/****************************************************************************/
|
||||
|
||||
.comment-form-error{
|
||||
margin:-15px 0 15px 0;
|
||||
font-weight:bold;
|
||||
color:#aa0000;
|
||||
}
|
||||
|
||||
.comment-form{
|
||||
margin:-10px 0 10px 0;
|
||||
padding:5px;
|
||||
background:#eee;
|
||||
-webkit-border-radius:5px;
|
||||
-moz-border-radius:5px;
|
||||
}
|
||||
|
||||
.comment-form textarea{
|
||||
margin:0;
|
||||
padding: 5px 0;
|
||||
width:100%;
|
||||
height:100px;
|
||||
}
|
||||
|
||||
.comment-form p.help{
|
||||
margin:3px 0 0 0;
|
||||
float:right;
|
||||
font-size:11px;
|
||||
color:#666;
|
||||
}
|
||||
|
||||
.comment-form ul.tabs{
|
||||
margin:0 0 5px 0;
|
||||
}
|
||||
|
||||
.comment-form ul.tabs li{
|
||||
list-style-type:none;
|
||||
margin:0;
|
||||
display:inline-block;
|
||||
}
|
||||
|
||||
.comment-form ul.tabs a{
|
||||
display:inline-block;
|
||||
padding:2px 8px;
|
||||
font-size:11px;
|
||||
font-weight:bold;
|
||||
text-decoration:none;
|
||||
color:#666;
|
||||
border:1px solid transparent;
|
||||
-webkit-border-radius:10px;
|
||||
-moz-border-radius:10px;
|
||||
}
|
||||
|
||||
.comment-form ul.tabs a.selected{
|
||||
color:#333;
|
||||
background:#fff;
|
||||
border-color:#bbb;
|
||||
border-right-color: #ddd;
|
||||
border-bottom-color: #ddd;
|
||||
}
|
||||
|
||||
.comment-form .comment{
|
||||
margin:5px 0 0 0;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* History
|
||||
/****************************************************************************/
|
||||
|
||||
table.commits {
|
||||
width: 100%;
|
||||
border-left: 1px solid #ccc;
|
||||
border-right: 1px solid #ccc;
|
||||
border-top: 1px solid #ccc;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
table.commits tr td {
|
||||
background-color: #eaf2f5;
|
||||
}
|
||||
|
||||
table.commits tr.selected td {
|
||||
background-color: #FEFFE6;
|
||||
}
|
||||
|
||||
table.commits th {
|
||||
font-weight: normal;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: .3em .6em;
|
||||
background-color: #eee;
|
||||
font-size: 95%;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
table.commits td {
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: .3em .6em;
|
||||
}
|
||||
|
||||
table.commits td.sha,
|
||||
table.commits td.message {
|
||||
font-family: Monaco, "Courier New", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
table.commits td.checkbox {
|
||||
width: 3%;
|
||||
}
|
||||
|
||||
table.commits td.sha {
|
||||
width: 6%;
|
||||
}
|
||||
|
||||
table.commits td.human {
|
||||
font-family: Monaco, "Courier New", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace;
|
||||
font-size: 80%;
|
||||
width: 4%;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
table.commits td.author {
|
||||
width: 15%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table.commits td.author img {
|
||||
vertical-align: middle;
|
||||
border: 1px solid #ccc;
|
||||
padding: 1px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
table.commits td.message a {
|
||||
color: black;
|
||||
}
|
||||
|
||||
table.commits td.message a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
table.commits td.date {
|
||||
width: 12%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* Files
|
||||
/****************************************************************************/
|
||||
|
||||
#files {
|
||||
|
||||
}
|
||||
|
||||
#files .file {
|
||||
border: 1px solid #ccc;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
#files .file .syntax{
|
||||
border:none;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
#files .file .meta {
|
||||
padding:0 5px;
|
||||
height:33px;
|
||||
line-height:33px;
|
||||
font-size:12px;
|
||||
color:#333;
|
||||
background:url(/images/modules/commit/file_head.gif) 0 0 repeat-x #eee;
|
||||
text-shadow:1px 1px 0 rgba(255, 255, 255, 0.5);
|
||||
border-bottom: 1px solid #ccc;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#files .file .meta .info {
|
||||
float: left;
|
||||
height:33px;
|
||||
line-height:33px;
|
||||
font-family: Monaco, "Courier New", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace;
|
||||
}
|
||||
|
||||
#files .file .meta .info span{
|
||||
padding-left:9px;
|
||||
margin-left:5px;
|
||||
background:url(/images/modules/commit/action_separator.png) 0 50% no-repeat;
|
||||
}
|
||||
|
||||
#files .file .meta .info span:first-child, #files .file .meta .info .icon + span{
|
||||
background:transparent;
|
||||
margin-left:0;
|
||||
padding-left:0;
|
||||
}
|
||||
|
||||
#files .file .meta .info span.icon{
|
||||
float:left;
|
||||
margin:5px 5px 0 0;
|
||||
padding:3px;
|
||||
background:#f7f7f7;
|
||||
border:1px solid #ccc;
|
||||
border-right-color:#e5e5e5;
|
||||
border-bottom-color:#e5e5e5;
|
||||
-webkit-border-radius:3px;
|
||||
-moz-border-radius:3px;
|
||||
border-radius:3px;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
#files .file .meta .actions {
|
||||
float: right;
|
||||
height:33px;
|
||||
line-height:33px;
|
||||
}
|
||||
|
||||
#files .file .meta .actions li{
|
||||
list-style-type:none;
|
||||
float:left;
|
||||
margin:0 0 0 7px;
|
||||
height:33px;
|
||||
line-height:33px;
|
||||
padding-left:9px;
|
||||
font-size:11px;
|
||||
background:url(/images/modules/commit/action_separator.png) 0 50% no-repeat;
|
||||
}
|
||||
|
||||
#files .file .meta .actions li:first-child{
|
||||
background:transparent;
|
||||
margin-left:0;
|
||||
padding-left:0;
|
||||
}
|
||||
|
||||
#files .file .meta .actions li a{
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
#files .file .meta .actions li code{
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
#files .file .meta .actions li label input{
|
||||
position:relative;
|
||||
top:1px;
|
||||
}
|
||||
|
||||
#files .file .data {
|
||||
font-size: 80%;
|
||||
overflow: auto;
|
||||
background-color: #f8f8ff;
|
||||
}
|
||||
|
||||
#files .file .data.empty {
|
||||
font-size: 90%;
|
||||
padding:5px 10px;
|
||||
color:#777;
|
||||
}
|
||||
|
||||
#files .image {
|
||||
padding: 1.2em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#files .image img {
|
||||
max-width: 60em;
|
||||
}
|
||||
|
||||
#files .file .data pre, #files .file .line-data, #files .file .line-number {
|
||||
font-family: 'Bitstream Vera Sans Mono', 'Courier', monospace;
|
||||
font-size: 115%;
|
||||
}
|
||||
|
||||
#files .file .data .highlight {
|
||||
padding: 1em 0;
|
||||
}
|
||||
|
||||
#files .file .data .highlight div {
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
#files .file .data .line_numbers {
|
||||
background-color: #ececec;
|
||||
color: #aaa;
|
||||
padding: 1em .5em;
|
||||
border-right: 1px solid #ddd;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#files .file .data td.line_numbers{
|
||||
padding:0 0.5em;
|
||||
font-family: 'Bitstream Vera Sans Mono', 'Courier', monospace;
|
||||
font-size: 115%;
|
||||
-moz-user-select:none;
|
||||
-khtml-user-select:none;
|
||||
user-select:none;
|
||||
}
|
||||
|
||||
#files .file .data .line_numbers span,
|
||||
#files .file .data .line_numbers a {
|
||||
color: #aaa;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
.highlight { background: #ffffff; }
|
||||
.highlight .c { color: #999988; font-style: italic } /* Comment */
|
||||
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
||||
.highlight .k { font-weight: bold } /* Keyword */
|
||||
.highlight .o { font-weight: bold } /* Operator */
|
||||
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
|
||||
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
|
||||
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
|
||||
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
|
||||
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
|
||||
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
|
||||
.highlight .ge { font-style: italic } /* Generic.Emph */
|
||||
.highlight .gr { color: #aa0000 } /* Generic.Error */
|
||||
.highlight .gh { color: #999999 } /* Generic.Heading */
|
||||
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
|
||||
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
|
||||
.highlight .gc { color: #999; background-color: #EAF2F5 }
|
||||
.highlight .go { color: #888888 } /* Generic.Output */
|
||||
.highlight .gp { color: #555555 } /* Generic.Prompt */
|
||||
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
||||
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
|
||||
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
|
||||
.highlight .kc { font-weight: bold } /* Keyword.Constant */
|
||||
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
|
||||
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
|
||||
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
|
||||
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
|
||||
.highlight .m { color: #009999 } /* Literal.Number */
|
||||
.highlight .s { color: #d14 } /* Literal.String */
|
||||
.highlight .na { color: #008080 } /* Name.Attribute */
|
||||
.highlight .nb { color: #0086B3 } /* Name.Builtin */
|
||||
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
|
||||
.highlight .no { color: #008080 } /* Name.Constant */
|
||||
.highlight .ni { color: #800080 } /* Name.Entity */
|
||||
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
|
||||
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
|
||||
.highlight .nn { color: #555555 } /* Name.Namespace */
|
||||
.highlight .nt { color: #000080 } /* Name.Tag */
|
||||
.highlight .nv { color: #008080 } /* Name.Variable */
|
||||
.highlight .ow { font-weight: bold } /* Operator.Word */
|
||||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
||||
.highlight .mf { color: #009999 } /* Literal.Number.Float */
|
||||
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
|
||||
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
|
||||
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
|
||||
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
|
||||
.highlight .sc { color: #d14 } /* Literal.String.Char */
|
||||
.highlight .sd { color: #d14 } /* Literal.String.Doc */
|
||||
.highlight .s2 { color: #d14 } /* Literal.String.Double */
|
||||
.highlight .se { color: #d14 } /* Literal.String.Escape */
|
||||
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
|
||||
.highlight .si { color: #d14 } /* Literal.String.Interpol */
|
||||
.highlight .sx { color: #d14 } /* Literal.String.Other */
|
||||
.highlight .sr { color: #009926 } /* Literal.String.Regex */
|
||||
.highlight .s1 { color: #d14 } /* Literal.String.Single */
|
||||
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
|
||||
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
|
||||
.highlight .vc { color: #008080 } /* Name.Variable.Class */
|
||||
.highlight .vg { color: #008080 } /* Name.Variable.Global */
|
||||
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
|
||||
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
|
||||
@@ -0,0 +1,316 @@
|
||||
/*
|
||||
Gollum v3 Template
|
||||
*/
|
||||
|
||||
#template {
|
||||
font-size: 13px;
|
||||
line-height: 23px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
/* Link Colors */
|
||||
a.absent {
|
||||
color: #c00;
|
||||
}
|
||||
|
||||
/* Primary Body Copy */
|
||||
#template p {
|
||||
margin: 16px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* ReST first graf in nested list */
|
||||
#template * li p.first {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* Headings */
|
||||
#template h1, #template h2, #template h3,
|
||||
#template h4, #template h5, #template h6 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#template h1 {
|
||||
border-top: 4px solid #ccc;
|
||||
font-size: 32px;
|
||||
line-height: normal;
|
||||
padding: 10px 0 0;
|
||||
margin: 30px 0 0;
|
||||
}
|
||||
|
||||
#template h2 {
|
||||
border-top: 4px solid #ccc;
|
||||
font-size: 22px;
|
||||
line-height: normal;
|
||||
margin: 22px 0 0;
|
||||
padding: 7px 0 0;
|
||||
}
|
||||
|
||||
#template h3 {
|
||||
font-size: 16px;
|
||||
line-height: 26px;
|
||||
padding: 26px 0 0;
|
||||
}
|
||||
|
||||
#template h4 {
|
||||
font-size: 14px;
|
||||
line-height: 26px;
|
||||
padding: 18px 0 4px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
#template h5 {
|
||||
font-size: 13px;
|
||||
line-height: 26px;
|
||||
margin-bottom: -19px;
|
||||
padding: 14px 0 0;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
#template h6 {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
line-height: 26px;
|
||||
margin-bottom: -19px;
|
||||
padding: 18px 0 0;
|
||||
font-weight: normal;
|
||||
font-variant: italic;
|
||||
}
|
||||
|
||||
#template hr {
|
||||
background-color: #ccc;
|
||||
color: #ccc;
|
||||
border: 2px solid #ccc;
|
||||
margin: 20px 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Border Reset for headers with horizontal rules */
|
||||
#template > h2:first-child,
|
||||
#template > h1:first-child {
|
||||
border: 0;
|
||||
margin: 12px 0 0;
|
||||
padding: 10px 0 0;
|
||||
}
|
||||
|
||||
|
||||
/* Lists, Blockquotes & Such */
|
||||
#template ul,
|
||||
#template ol {
|
||||
margin: 0;
|
||||
padding: 20px 0 0;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
/* Nested Lists */
|
||||
#template ul li ul,
|
||||
#template ol li ol,
|
||||
#template ul li ol,
|
||||
#template ol li ul,
|
||||
#template ul ul,
|
||||
#template ol ol {
|
||||
padding: 0 0 0 14px;
|
||||
}
|
||||
|
||||
#template dl {
|
||||
margin: 0;
|
||||
padding: 20px 0 0;
|
||||
}
|
||||
|
||||
#template dl dt {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
line-height: normal;
|
||||
margin: 0;
|
||||
padding: 20px 0 0;
|
||||
}
|
||||
|
||||
#template dl dt:first-child {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#template dl dd {
|
||||
font-size: 13px;
|
||||
margin: 0;
|
||||
padding: 3px 0 0;
|
||||
}
|
||||
|
||||
/* Tables */
|
||||
#template table {
|
||||
border-collapse: collapse;
|
||||
margin: 20px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#template table * tr {
|
||||
border-top: 1px solid #ccc;
|
||||
background-color: #fff;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#template table * tr:nth-child(2n) {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
#template table * tr th,
|
||||
#template table * tr td {
|
||||
border: 1px solid #ccc;
|
||||
text-align: left;
|
||||
margin: 0;
|
||||
padding: 6px 13px;
|
||||
}
|
||||
|
||||
/* Images & Stuff */
|
||||
#template img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Gollum Image Tags */
|
||||
|
||||
/* Framed */
|
||||
#template span.frame {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#template span.frame > span {
|
||||
border: 1px solid #ddd;
|
||||
display: block;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
margin: 13px 0 0;
|
||||
padding: 7px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#template span.frame span img {
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#template span.frame span span {
|
||||
clear: both;
|
||||
color: #333;
|
||||
display: block;
|
||||
padding: 5px 0 0;
|
||||
}
|
||||
|
||||
#template span.align-center {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#template span.align-center > span {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
margin: 13px auto 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#template span.align-center span img {
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#template span.align-right {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#template span.align-right > span {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
margin: 13px 0 0;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#template span.align-right span img {
|
||||
margin: 0;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#template span.float-left {
|
||||
display: block;
|
||||
margin-right: 13px;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#template span.float-left span {
|
||||
margin: 13px 0 0;
|
||||
}
|
||||
|
||||
#template span.float-right {
|
||||
display: block;
|
||||
margin-left: 13px;
|
||||
overflow: hidden;
|
||||
float: right;
|
||||
}
|
||||
|
||||
#template span.float-right > span {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
margin: 13px auto 0;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
/* Code */
|
||||
#template code, #template tt {
|
||||
background-color: #f8f8f8;
|
||||
border: 1px solid #dedede;
|
||||
font-size: 13px;
|
||||
padding: 1px 5px;
|
||||
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
#template .highlight pre, #template pre {
|
||||
background-color: #f8f8f8;
|
||||
border: 1px solid #ccc;
|
||||
font-size: 13px;
|
||||
line-height: 19px;
|
||||
overflow: auto;
|
||||
padding: 6px;
|
||||
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
#template pre code, #template pre tt {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#template .highlight { background: #ffffff; }
|
||||
#template .highlight .c { color: #999988; font-style: italic }
|
||||
#template .highlight .err { color: #a61717; background-color: #e3d2d2 }
|
||||
#template .highlight .k { font-weight: bold }
|
||||
#template .highlight .o { font-weight: bold }
|
||||
#template .highlight .cm { color: #999988; font-style: italic }
|
||||
#template .highlight .cp { color: #999999; font-weight: bold }
|
||||
#template .highlight .c1 { color: #999988; font-style: italic }
|
||||
#template .highlight .cs { color: #999999; font-weight: bold; font-style: italic }
|
||||
#template .highlight .gd { color: #000000; background-color: #ffdddd }
|
||||
#template .highlight .gd .x { color: #000000; background-color: #ffaaaa }
|
||||
#template .highlight .ge { font-style: italic }
|
||||
#template .highlight .gr { color: #aa0000 }
|
||||
#template .highlight .gh { color: #999999 }
|
||||
#template .highlight .gi { color: #000000; background-color: #ddffdd }
|
||||
#template .highlight .gi .x { color: #000000; background-color: #aaffaa }
|
||||
#template .highlight .gc { color: #999; background-color: #EAF2F5 }
|
||||
#template .highlight .go { color: #888888 }
|
||||
#template .highlight .gp { color: #555555 }
|
||||
#template .highlight .gs { font-weight: bold }
|
||||
#template .highlight .gu { color: #aaaaaa }
|
||||
#template .highlight .gt { color: #aa0000 }
|
||||
|
||||
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 181 B |
|
Before Width: | Height: | Size: 184 B |
|
Before Width: | Height: | Size: 290 B |
@@ -1,202 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,480 +0,0 @@
|
||||
OVERVIEW:
|
||||
|
||||
MathJax (TM) is an open source, Ajax-based math display solution designed
|
||||
with a goal of consolidating advances in many web technologies in a
|
||||
single definitive math-on-the-web platform supporting all major
|
||||
browsers.
|
||||
|
||||
Some of the main features of MathJax include:
|
||||
|
||||
o High-quality display of LaTeX and MathML math notation in HTML pages
|
||||
|
||||
o Supported in most browsers with no plug-ins, extra fonts, or special
|
||||
setup for the reader
|
||||
|
||||
o Easy for authors, flexible for publishers, extensible for developers
|
||||
|
||||
o Supports math accessibility, cut and paste interoperability and other
|
||||
advanced functionality
|
||||
|
||||
o Powerful API for integration with other web applications
|
||||
|
||||
See http://www.mathjax.org/ for additional details.
|
||||
|
||||
|
||||
INSTALLATION:
|
||||
|
||||
MathJax can be used on a web server to support mathematics in your
|
||||
public web pages, or it can be used locally from your hard disk for
|
||||
your private pages. To use MathJax in either way, you will need to
|
||||
obtain a copy of MathJax (see below) and its font package. These two
|
||||
are separate pieces because the fonts are not likely to change often,
|
||||
while the main code will be updated fairly regularly.
|
||||
|
||||
Obtaining MathJax from SourceForge via SVN:
|
||||
|
||||
The easiest way to obtain MathJax and keep it up-to-date is to use the
|
||||
subversion program (svn) to check it out from the MathJax project at
|
||||
SourceForge.net. The page
|
||||
|
||||
http://sourceforge.net/projects/mathjax/develop
|
||||
|
||||
lists the command you need to use to obtain a copy of MathJax via svn.
|
||||
Once you have checked out a version of MathJax, you will find that it
|
||||
includes a file called "fonts.zip" in the top-level directory. You
|
||||
will need to unpack that file in order to complete the installation of
|
||||
MathJax. It will create a fonts directory that contains the web fonts
|
||||
and images fonts used by MathJax to support users who do not have math
|
||||
fonts installed on their computers. Once you have checked out
|
||||
MathJax, you will need to move the MathJax directory to your web
|
||||
server in a location that is convenient for your use.
|
||||
|
||||
Obtaining MathJax from SourceForge as an archive file:
|
||||
|
||||
You can obtain MathJax from the MathJax project at SourceForge via
|
||||
the link
|
||||
|
||||
http://sourceforge.net/projects/mathjax/files/
|
||||
|
||||
where you will need to download a copy of the MathJax ZIP file (for
|
||||
the current version) and the MathJax-webfonts ZIP file. Unpack the
|
||||
MathJax ZIP file first, and then unpack the MathJax-webfonts ZIP file
|
||||
into that. That should produce a fonts directory in the MathJax
|
||||
folder (and MathJax/fonts should contain an HTML-CSS directory). The
|
||||
fonts directory contains web fonts and image fonts used by MathJax to
|
||||
support users who do not have math fonts installed on their
|
||||
computers. Once you have unpacked both archives, you can move the
|
||||
MathJax directory to your web server in a location that is convenient
|
||||
for your use.
|
||||
|
||||
|
||||
TESTING MATHJAX:
|
||||
|
||||
Once you have MathJax installed, you can use the files in the
|
||||
MathJax/test directory to test that your installation is working
|
||||
properly. You can also use it to test if your version of MathJax
|
||||
needs updating. If you have checked out MathJax using subversion
|
||||
(svn), you can simply use "svn status" to see if your installation
|
||||
needs to be updated, and "svn update" to get any updates.
|
||||
|
||||
|
||||
USING MATHJAX IN A WEB PAGE:
|
||||
|
||||
To use MathJax in a web page, you need to load MathJax.js near the top of
|
||||
the document (preferably in the document HEAD). A SCRIPT tag like
|
||||
|
||||
<script type="text/javascript" src="/MathJax/MathJax.js"></script>
|
||||
|
||||
will do it if you have MathJax at the top level of your web server.
|
||||
When called in this form, MathJax can be configured through the file
|
||||
MathJax/config/MathJax.js, which contains the parameters that control
|
||||
MathJax. There are comments in this file that explain what each of
|
||||
the parameters does, so look there for details.
|
||||
|
||||
Alternatively, you can configure MathJax in-line within your web page
|
||||
(avoiding an extra file transfer). To do that, place the
|
||||
configuration information within the SCRIPT tag itself, as in the
|
||||
following example:
|
||||
|
||||
<script type="text/javascript" src="/MathJax/MathJax.js">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js","TeX/noErrors.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
tex2jax: {inlineMath: [['$','$'],["\\(","\\)"]]},
|
||||
"HTML-CSS": {availableFonts:["TeX"]}
|
||||
});
|
||||
</script>
|
||||
|
||||
which loads the tex2jax preprocessor and an extension that causes TeX
|
||||
errors to show the original TeX code rather than an error message,
|
||||
specifies the input and output jax (input format is TeX and output
|
||||
format is HTML/CSS), configures the tex2jax preprocessor to allow
|
||||
dollar signs to delimit inline-math as well as \(...\), and forces the
|
||||
HTML/CSS output to use the MathJax TeX fonts (in particular, the STIX
|
||||
fonts won't be used.)
|
||||
|
||||
If you configure MathJax in this fashion, the MathJax/config/MathJax.js
|
||||
file is not loaded, and your in-line configuration is used instead.
|
||||
Note that you can include any of the parameters from the
|
||||
config/MathJax.js file (and in fact any arbitrary JavaScript as well).
|
||||
|
||||
With the default configuration, MathJax runs the tex2jax preprocessor
|
||||
to look for TeX-style mathematics delimiters as a means of identifying
|
||||
the mathematics on the page. This uses \(...\) to mark in-line
|
||||
mathematics and \[...\] or $$...$$ for displayed mathematics. LaTeX
|
||||
environments can also mark mathematics, as in
|
||||
\begin{equation}...\end{equation}. Once the preprocessor runs,
|
||||
MathJax will typeset the mathematics on the page.
|
||||
|
||||
Note that there can not be HTML tags within the math delimiters (other
|
||||
than <BR>) as TeX-formatted math does not include HTML tags. Also,
|
||||
since the mathematics is initially given as text on the page, you need
|
||||
to be careful that your mathematics doesn't look like HTML tags to the
|
||||
browser (which parses the page before MathJax gets to see it). In
|
||||
particular, that means that you have to be careful about things like
|
||||
less-than and greater-than signs (<,>), and ampersands (&), which have
|
||||
special meaning to the browsers. For example,
|
||||
|
||||
... when $x<y$ we have ...
|
||||
|
||||
will cause a problem, because the brower will think "<y" is the
|
||||
beginning of a tag named "y" (even though there is no such tag in
|
||||
HTML). Usually, it is sufficient to simply put spaces around these
|
||||
symbols to cause the browser to avoid them, so
|
||||
|
||||
... when $x < y$ we have ...
|
||||
|
||||
should work. Alternatively, you can use the HTML entities <, >
|
||||
and & to encode these characters so that the browser will not
|
||||
interpret them, but MathJax will. E.g.,
|
||||
|
||||
... when $x < y$ we have ...
|
||||
|
||||
Finally, there are \lt and \gt macros defined to make it easier to
|
||||
enter < and > using TeX-like syntax:
|
||||
|
||||
... when $x \lt y$ we have ...
|
||||
|
||||
Keep in mind that the browser interprets your text before MathJax
|
||||
does.
|
||||
|
||||
|
||||
MATHJAX WITH NO PREPROCESSOR:
|
||||
|
||||
The usual way to use MathJax is with the tex2jax preprocessor, but if
|
||||
you are generating web pages via some other preprocessor of your own,
|
||||
you may wish to bypass the tex2math preprocessing and mark the
|
||||
mathematics in your page directly. This avoids an extra file
|
||||
transfer, the time involed in running the tex2jax preprocessor, and
|
||||
the issues involving less-than, greater-than, and ampersand discussed
|
||||
in the section above.
|
||||
|
||||
When MathJax processes a page, it looks for mathematics stored in
|
||||
special SCRIPT tags. These are
|
||||
|
||||
<script type="math/tex">...</script>
|
||||
|
||||
for in-line math, and
|
||||
|
||||
<script type="math/tex; mode=display">...</script>
|
||||
|
||||
for displayed math, where the contents of the SCRIPT tags are TeX or
|
||||
LaTeX mathematics. Since SCRIPT tags can include less-than,
|
||||
greater-than, and ampersand characters, this neatly avoids the problem
|
||||
that these cause when you use the tex2jax preprocessor.
|
||||
|
||||
Unfortunately, this method introduces a problem of its own, due to a
|
||||
bug in Internet Explorer. The problem is that IE incorrectly removes
|
||||
blank spaces from the page in order to avoid what it considers to be
|
||||
multiple spaces in a row. In particular, if there is a space both
|
||||
before and after a tag that IE thinks does not insert content into the
|
||||
page, it removes one of the two blanks. Because SCRIPT tags don't
|
||||
get displayed, IE will remove one of the spaces, so
|
||||
|
||||
... when <script type="math/tex">x < y</script> we have ...
|
||||
|
||||
will become "...whenx < y we have..." in the output, with no space
|
||||
between the "when" and the "x". Because the space is removed before
|
||||
MathJax runs, MathJax has no way to recover the missing space, as it
|
||||
simply is no longer part of the page as far as IE is concerned.
|
||||
|
||||
MathJax provides two different mechanisms to avoid this problem. One
|
||||
is to add a prefix or postfix for the mathematics tags, which is text
|
||||
that you insert before or after the tag that MathJax will remove when
|
||||
it processes the tag. Patterns for the prefix and postfix are given
|
||||
in the "preJax" and "postJax" parameters of the MathJax.Hub.Config()
|
||||
command (see the MathJax/config/MathJax.js file for more details).
|
||||
For example, setting
|
||||
|
||||
preJax: "@@"
|
||||
|
||||
would mean that
|
||||
|
||||
... when @@<script type="math/tex">x < y</script> we have ...
|
||||
|
||||
would produce ".. when x < y we have ..." properly typeset. (One need
|
||||
not use both a preJax and postJax, as one is enough, but both are
|
||||
provided so that you can use either or both in combination.) Note,
|
||||
however, that the "@@" in this example will be displayed as part of
|
||||
the page until MathJax processes the mathematics and replaces the
|
||||
preJax with the typeset mathematics. This may cause visual confusion
|
||||
that disturbs your readers. It might be better to use something like
|
||||
"[math]" as the text for the preJax, since this may make more sense to
|
||||
your readers. Because the pre- and postJax are regular expression
|
||||
patterns (not litteral strings), you will need to handle this
|
||||
carefully because [ and ] have special meaning in regular expressions.
|
||||
Use
|
||||
|
||||
preJax: "\\[math\\]"
|
||||
|
||||
to make preJax be "\[math\]" (the double backslashes are to quote the
|
||||
backslash as part of the JavaScript string, and the resulting \[ and
|
||||
\] quote these characters in the resulting regular expression so they
|
||||
are treated as literal characters rather than having their special
|
||||
meansings in regular expressions).
|
||||
|
||||
The other approach is to use a "MathJax preview" before the SCRIPT
|
||||
tag. This is a means by which you can supply an alternative form for
|
||||
the mathematics to be displayed prior to when MathJax runs. You
|
||||
could use a simple HTML version (if the mathematics is simple enough),
|
||||
or an IMG tag, or just the raw TeX code, for example. Note that the
|
||||
mathematics between the SCRIPT tags is NOT displayed (since it is a
|
||||
script, not text), so the preview can be used to show the TeX code up
|
||||
until the mathematics is typeset. (The tex2jax preprocessor does that
|
||||
automatically, for example). To make a preview, include a SPAN with
|
||||
CLASS="MathJax_Preview" as the element just before the math SCRIPT
|
||||
tag, e.g.,
|
||||
|
||||
... when <span class="MathJax_Preview">x < y</span><script
|
||||
type="math/tex">x < y</script> we have ...
|
||||
|
||||
This circumvents the Internet Explorer space-removal bug, while at the
|
||||
same time giving your readers a preview of the mathematics until
|
||||
MathJax has been able to typeset it.
|
||||
|
||||
You can use CSS styles to make it easier to distinguish the preview
|
||||
from the rest of the text. For example:
|
||||
|
||||
<script type="text/javascript" src="/MathJax/MathJax.js">
|
||||
MathJax.Hub.Config({
|
||||
...
|
||||
styles: {
|
||||
".MathJax_Preview": {
|
||||
color: "red",
|
||||
border: "1px solid",
|
||||
padding: "2px"
|
||||
}
|
||||
},
|
||||
...
|
||||
});
|
||||
</script>
|
||||
|
||||
would cause the preview mathematics to be shown in red, with a border
|
||||
and 2px of padding between the border and the preview text.
|
||||
|
||||
|
||||
MATHJAX WITH MATHML:
|
||||
|
||||
In addition to the TeX input processor, MathJax includes a MathML input
|
||||
processor, so that you can specify your mathematics using MathML rather
|
||||
than TeX, if you wish. (The input and output processors are called "jax".)
|
||||
As with the TeX input jax, there is a pre-processor that looks for MathML
|
||||
in your web page (XHTML or HTML) and converts it to the form needed by
|
||||
MathJax. The preprocessor is called "mml2jax.js", and the associated input
|
||||
jax is "input/MathML". You can request these in your
|
||||
MathJax/config/MathJax.js file, or in line, as in the following example:
|
||||
|
||||
<script type="text/javascript" src="/MathJax/MathJax.js">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["mml2jax.js"],
|
||||
jax: ["input/MathML","output/HTML-CSS"]
|
||||
});
|
||||
</script>
|
||||
|
||||
When it is used, the mml2jax preprocessor will scan your page for <math>
|
||||
tags and insert them into the <script> tags that MathJax needs to identify
|
||||
the mathematics on the page. This works in both HTML and XHTML pages, and
|
||||
with browsers that don't have native support for MathML. While MathJax is
|
||||
not as fast as a native implementation of MathML, it does bring MathML to
|
||||
all major browsers. (It is even possible to set up a GreaseMonkey-style
|
||||
script to have MathJax automatically process any MathML on any page you
|
||||
visit, so MathJax can be used to make MathML available even when the page
|
||||
author has not specifically loaded MathJax. There are some caveats for
|
||||
this, however, so such a script is not currently being supplied.)
|
||||
|
||||
For MathML that is handled via the pre-processor, you should not use the
|
||||
MathML named entities, but rather use the numeric entities like √ or
|
||||
unicode characters embedded in the page itself. The reason is that the
|
||||
entities are replaced by the browser before MathJax runs, and some browsers
|
||||
report errors for unknown entities; for browsers that are not MathML-aware,
|
||||
that will cause errors to be displayed for the MathML entities. While that
|
||||
might not occur in the browser you are using to compose your pages, it can
|
||||
happen with other browsers, so you should avoid the named entities whenever
|
||||
possible. If you must use named entities, you may need to declare them in
|
||||
the DOCTYPE declaration by hand.
|
||||
|
||||
|
||||
MATHML WITH NO PREPROCESSOR:
|
||||
|
||||
Just as there is a way to enter TeX code without a preprocessor, MathJax
|
||||
provides a means of specifying MathML without a preprocessor. In this
|
||||
case, you enclose your complete <math> substree within a
|
||||
<script type="math/mml">...</script> tag. E.g.:
|
||||
|
||||
<script type="math/mml">
|
||||
<math display="block">
|
||||
<mi>x</mi><mo>=</mo><mn>1</mn>
|
||||
</math>
|
||||
</script>
|
||||
|
||||
Note that the <math> tag's display attribute controls whether the node is
|
||||
typeset in-line or as a displayed equation. The same caveats concerning
|
||||
spacing apply to MathML as to TeX, so see the section on MATHJAX WITH NO
|
||||
PREPROCESSOR above for how to deal with an Internet Explorer bug that
|
||||
requires special treatment.
|
||||
|
||||
|
||||
MATHML OUTPUT:
|
||||
|
||||
In addition to the HTML-CSS output jax, MathJax provides a native-MathML
|
||||
output jax that generates MathML to display your mathematics rather than
|
||||
complicated HTML with CSS. For browsers that support MathML, this can be
|
||||
considerably faster, plus it provides for accessibility and the ability to
|
||||
cut and paste mathematics that MathML offers. MathML output is available
|
||||
for both TeX input and MathML input, so MathJax can act as a TeX-to-MathML
|
||||
converter right in the browser.
|
||||
|
||||
To use the native MathML output jax, specify "output/NativeMML" rather than
|
||||
"output/HTML-CSS" in the jax array of your MathJax.Hub.Config() call (or in
|
||||
MathJax/config/MathJax.js). For example:
|
||||
|
||||
<script type="text/javascript" src="/MathJax/MathJax.js">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX","output/NativeMML"]
|
||||
});
|
||||
</script>
|
||||
|
||||
Note that this will only work for those browsers that support MathML
|
||||
natively, so you should be careful to know your audience if you use this
|
||||
output jax. Also, note that the MathML output jax produces MathML3.0, not
|
||||
2.0, and so some browsers may not be able to handle all the constructs that
|
||||
MathJax will produce. Although it is slower, the HTML-CSS output jax is
|
||||
more reliable than the NativeMML output jax, at least from a cross-browser
|
||||
standpoint, particularly when the TeX input jax is used.
|
||||
|
||||
Because of the speed of the native MathML rendering, some users may prefer
|
||||
to use that than the HTML-CSS output jax, but you may not want to prevent
|
||||
those who don't have native MathML support from viewing your pages, so you
|
||||
may want to select between NativeMML and HTML-CSS automatically, depending
|
||||
on the capabilities of the browser. MathJax provides a configuration file
|
||||
that does just that. To use it, include "MMLorHTML.js" in the config array
|
||||
of your MathJax.Hub.Config() call. If you use this, be sure NOT to include
|
||||
an output jax in your jax array, as MMLorHTML.js will fill that in for you.
|
||||
For example:
|
||||
|
||||
<script type="text/javascript" src="/MathJax/MathJax.js">
|
||||
MathJax.Hub.Config({
|
||||
config: ["MMLorHTML.js"],
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX"]
|
||||
});
|
||||
</script>
|
||||
|
||||
In the case where both NativeMML and HTML-CSS are supported, the MMLorHTML
|
||||
configuration file will choose HTML-CSS, even though it is slower; this is
|
||||
because it is more reliable, since MathJax produces MathML3.0 and not all
|
||||
browsers can display that. This is configurable, however, and you may want
|
||||
to change the preference to NativeMML instead, especially if your input
|
||||
language is MathML already. This can be done using the MMLorHTML section
|
||||
of your configuration:
|
||||
|
||||
<script type="text/javascript" src="/MathJax/MathJax.js">
|
||||
MathJax.Hub.Config({
|
||||
config: ["MMLorHTML.js"],
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX"],
|
||||
MMLorHTML: {prefer: "MML"}
|
||||
});
|
||||
</script>
|
||||
|
||||
Note, however, that not all users will have your own preferences about what
|
||||
"looks best" or "performs best", so while you may value speed above all
|
||||
else, others may value readability or reliability more. Also, remember
|
||||
that browsers other than the one you are using (or the same browser on
|
||||
other operating systems) may not support native MathML as well as yours
|
||||
does. For example, Opera does handle simple MathML fairly well, but breaks
|
||||
down quickly for some more complex equations, and while you may have
|
||||
Firefox all set up for MathML, others may not have installed the needed
|
||||
fonts, and will be unhappy to get a warning dialog box whenever they visit
|
||||
your web page. So think carefully about the assumptions you are making on
|
||||
behalf of your readers. At some point, MathJax may include a control panel
|
||||
that will allow users to select preferences on their own, but that is not
|
||||
available currently.
|
||||
|
||||
|
||||
CONVERSION FROM JSMATH:
|
||||
|
||||
If you are currently using jsMath and would like to switch to MathJax, the
|
||||
transition should be fairly straight-forward. If you are using jsMath's
|
||||
easy/load.js, then you should simply switch the line that loads
|
||||
jsMath/easy/load.js to
|
||||
|
||||
<script src="path-to-mathjax/MathJax/MathJax.js"></script>
|
||||
|
||||
where "path-to-mathjax" is the path to the MathJax folder on your server.
|
||||
This uses the MathJax/config/MathJax.js file to configure MathJax, similar
|
||||
to easy/load.js, and you can read the comments in that file for details.
|
||||
Be sure to include "tex2jax.js" in your extensions array if you want the
|
||||
TeX preprocessor to run (comparable to the tex2math plugin for jsMath).
|
||||
|
||||
If you did not use the tex2math plugin for jsMath and instead inserted your
|
||||
own <span class="math">...</span> and <div class="math">...</div> tags with
|
||||
class="math", then you need to do a little more work for MathJax. These
|
||||
need to be replaced by <script type="math/tex">...</script> and <script
|
||||
type="math/tex; mode=display">...</script> tags. See also the section
|
||||
MATHJAX WITHOUT A PREPROCESSOR above for some caveats concerning an
|
||||
Internet Explorer bug that you will need to be aware of.
|
||||
|
||||
If you are using a preprocessor of your own to write your HTML files, it
|
||||
should be a simple matter of changing over the inserted tags to the ones
|
||||
that MathJax needs. If you have existing HTML pages, however, and don't
|
||||
want to (or can't) reprocess them, then you may want to use the jsMath2jax
|
||||
preprocessor, which will first convert the span and div tags to script tags
|
||||
before running MathJax. To do so, include "jsMath2jax.js" in your
|
||||
extensions array, as in the following example:
|
||||
|
||||
<script type="text/javascript" src="/MathJax/MathJax.js">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["jsMath2jax.js"],
|
||||
jax: ["input/TeX", "output/HTML-CSS"]
|
||||
});
|
||||
</script>
|
||||
|
||||
You should remove all the jsMath calls, like jsMath.Process(), or script
|
||||
tags that load jsMath extensions. Only the single script tag that loads
|
||||
MathJax should be needed.
|
||||
|
||||
If you have created pages with dynamic mathematics that is processed by
|
||||
jsMath on the fly, that is handled somewhat differently with MathJax.
|
||||
MathJax has a richer API for dealing with mathematics on the page, but the
|
||||
documentation is not yet ready. There have been discussions in the MathJax
|
||||
on-line forums that deal with this topic, so your best bet right now is to
|
||||
read them.
|
||||
|
||||
|
||||
COMMUNITY:
|
||||
|
||||
The main MathJax website is www.mathjax.org, and it includes announcements
|
||||
and other important information. MathJax also has a SourceForge site at
|
||||
http://sourceforge.net/projects/mathjax/ that includes the download site
|
||||
for the MathJax distribution, the bug-tracker for reporting bugs, and
|
||||
several user forums for asking questions and getting assistance:
|
||||
|
||||
Bug tracker: http://sourceforge.net/tracker/?group_id=261188&atid=1240827
|
||||
MathJax Help: http://sourceforge.net/projects/mathjax/forums/forum/948701
|
||||
Open Discussion: http://sourceforge.net/projects/mathjax/forums/forum/948700
|
||||
|
||||
Before reporting a bug, please check that it has not already been reported.
|
||||
Also, please use the bug tracker for reporting bugs rather than the help
|
||||
forum.
|
||||
@@ -1,63 +1,18 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* MathJax/extensions/MMLorHTML.js
|
||||
*
|
||||
* Chooses between the NativeMML and HTML-CSS output jax depending
|
||||
* on the capabilities of the browser and configuration settings
|
||||
* of the page.
|
||||
*
|
||||
* This file should be added to the config array when configuring
|
||||
* MathJax. Note that if you include this, you should NOT include
|
||||
* an output jax in the jax array (it will be added for you by
|
||||
* this file).
|
||||
*
|
||||
* ---------------------------------------------------------------------
|
||||
/*
|
||||
* ../SourceForge/trunk/mathjax/config/MMLorHTML.js
|
||||
*
|
||||
* Copyright (c) 2010 Design Science, Inc.
|
||||
*
|
||||
* Part of the MathJax library.
|
||||
* See http://www.mathjax.org for details.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* Licensed under the Apache License, Version 2.0;
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
(function (HUB) {
|
||||
var CONFIG = MathJax.Hub.Insert({prefer: "HTML"},(MathJax.Hub.config.MMLorHTML||{}));
|
||||
MathJax.Unpack([
|
||||
['(function(c){var i="1.0";var g=','MathJax.Hub','.Insert({prefer:{MSIE:"MML",Firefox:"MML",Opera:"HTML",other:"HTML"}},(',1,'.config.MMLorHTML||{}));var e={Firefox:3,Opera:9.52,MSIE:6,Chrome:0.3,Safari:2,Konqueror:4};var h=(c','.Browser','.version==="0.0"||','c.Browser.versionAtLeast','(e[c',5,']||0));var b;try{new ActiveXObject("MathPlayer.Factory.1");b=true}catch(d){b=false}var f=(c',5,'.isFirefox&&',7,'("1.5"))||(c',5,'.isMSIE&&b)||(c',5,'.isOpera&&',7,'("9.52"));var a=(g.prefer&&typeof(g.prefer)==="object"?g.prefer[',1,5,']||g.prefer.other||"HTML":g.prefer);if(h||f){if(f&&(a==="MML"||!h)){','c.config.jax.unshift("output/','NativeMML")}else{',24,'HTML-CSS")}}else{c.PreProcess','.disabled=true;','c.prepareScripts',28,'MathJax.Message.Set("Your browser does not support MathJax",null,4000);c.Startup.signal.Post("MathJax not supported")}})(',1,');MathJax.Ajax.loadComplete("[MathJax]/config/MMLorHTML.js");']
|
||||
]);
|
||||
|
||||
var MINBROWSERVERSION = {
|
||||
Firefox: 3.0,
|
||||
Opera: 9.52,
|
||||
MSIE: 6.0,
|
||||
Chrome: 0.3,
|
||||
Safari: 2.0,
|
||||
Konqueror: 4.0
|
||||
};
|
||||
|
||||
var canUseHTML = (HUB.Browser.version === "0.0" ||
|
||||
HUB.Browser.versionAtLeast(MINBROWSERVERSION[HUB.Browser]||0.0));
|
||||
|
||||
var MathPlayer; try {new ActiveXObject("MathPlayer.Factory.1"); MathPlayer = true} catch(err) {MathPlayer = false};
|
||||
|
||||
var canUseMML = (HUB.Browser.isFirefox && HUB.Browser.versionAtLeast("1.5")) ||
|
||||
(HUB.Browser.isMSIE && MathPlayer) ||
|
||||
(HUB.Browser.isOpera && HUB.Browser.versionAtLeast("9.52"));
|
||||
if (canUseHTML || canUseMML) {
|
||||
if (canUseMML && (CONFIG.prefer === "MML" || !canUseHTML))
|
||||
{HUB.config.jax.push("output/NativeMML")} else {HUB.config.jax.push("output/HTML-CSS")}
|
||||
} else {
|
||||
HUB.PreProcess.disabled = true;
|
||||
HUB.prepareScripts.disabled = true;
|
||||
MathJax.Message.Set("Your browser does not support MathJax",null,4000);
|
||||
HUB.Startup.signal.Post("MathJax not supported");
|
||||
}
|
||||
|
||||
})(MathJax.Hub);
|
||||
|
||||
MathJax.Ajax.loadComplete("[MathJax]/config/MMLorHTML.js");
|
||||
|
||||
@@ -29,7 +29,7 @@ MathJax.Hub.Config({
|
||||
//
|
||||
// A comma-separated list of configuration files to load
|
||||
// when MathJax starts up. E.g., to define local macros, etc.
|
||||
// teh default directory is the MathJax/config directory.
|
||||
// The default directory is the MathJax/config directory.
|
||||
//
|
||||
// Example: config: ["local/local.js"],
|
||||
// Example: config: ["local/local.js","MMLtoHTML.js"],
|
||||
@@ -60,8 +60,8 @@ MathJax.Hub.Config({
|
||||
|
||||
//
|
||||
// A comma-separated list of input and output jax to initialize at startup.
|
||||
// Their main code is only loaded when they are actually used, so it is not
|
||||
// inefficient to include jax that are not actually used on the page. These
|
||||
// Their main code is loaded only when they are actually used, so it is not
|
||||
// inefficient to include jax that may not actually be used on the page. These
|
||||
// are found in the MathJax/jax directory.
|
||||
//
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
@@ -74,47 +74,46 @@ MathJax.Hub.Config({
|
||||
//
|
||||
extensions: ["tex2jax.js"],
|
||||
|
||||
//
|
||||
// Comma-separated lists of .js and .css files to load at startup that depend
|
||||
// on the browser being used. The default directory is MathJax/config/browsers.
|
||||
//
|
||||
browser: {
|
||||
MSIE: [],
|
||||
Chrome: [],
|
||||
Safari: [],
|
||||
Firefox: [],
|
||||
Opera: []
|
||||
},
|
||||
|
||||
//
|
||||
// Patterns to remove from before and after math script tags. If you are not
|
||||
// using one of the preprocessors (e.g., tex2jax), you need to insert something
|
||||
// etra into your HTML file in order to avoid a bug in Internet Explorer (IE
|
||||
// removes spaces from the DOM that it things are redundent, and since a SCRIPT
|
||||
// extra into your HTML file in order to avoid a bug in Internet Explorer. IE
|
||||
// removes spaces from the DOM that it thinks are redundent, and since a SCRIPT
|
||||
// tag usually doesn't add content to the page, if there is a space before and after
|
||||
// a MathJax SCRIPT tag, IE will remove the first space. When MathJax inserts
|
||||
// the typeset mathematics, this means there will be no space before it and the
|
||||
// preceeding text. In order to avoid this, you should include some "guard characters"
|
||||
// before or after the math SCRIPT tag; define the patterns you want to use below.
|
||||
// Note that these are actually regular expressions, so you will need to quote
|
||||
// special characters. If both are defined, both must be present in order to be
|
||||
// removed. See also the preRemoveClass comments below.
|
||||
// Note that these are used as regular expressions, so you will need to quote
|
||||
// special characters. Furthermore, since they are javascript strings, you must
|
||||
// quote javascript special characters as well. So to obtain a backslash, you must
|
||||
// use \\ (doubled for javascript). For example, "\\[" is the pattern \[ in the
|
||||
// regular expression. That means that if you want an actual backslash in your
|
||||
// guard characters, you need to use "\\\\" in order to get \\ in the regular
|
||||
// expression, and \ in the actual text. If both preJax and postJax are defined,
|
||||
// both must be present in order to be removed.
|
||||
//
|
||||
// See also the preRemoveClass comments below.
|
||||
//
|
||||
// Example:
|
||||
// preJax: "\\\\", // makes a double backslash the preJax text
|
||||
// preJax: "\\\\\\\\", // makes a double backslash the preJax text
|
||||
// or
|
||||
// preJax: "\[\[", // jax scripts must be enclosed in double brackets
|
||||
// postJax: "\]\]",
|
||||
// preJax: "\\[\\[", // jax scripts must be enclosed in double brackets
|
||||
// postJax: "\\]\\]",
|
||||
//
|
||||
preJax: null,
|
||||
postJax: null,
|
||||
|
||||
//
|
||||
// The CSS class for a math preview to be removed preceeding a MathJax SCRIPT tag.
|
||||
// This allows you to include a math preview in a form that will be displayed prior
|
||||
// to MathJax loading performing its typesetting. It also avoids the Internet Explorer
|
||||
// space-removal bug, and can be used in place of preJax and postJax if that is more
|
||||
// convenient. For example
|
||||
// The CSS class for a math preview to be removed preceeding a MathJax
|
||||
// SCRIPT tag. If the tag just before the MathJax SCRIPT tag is of this
|
||||
// class, its contents are removed when MathJax processes the SCRIPT
|
||||
// tag. This allows you to include a math preview in a form that will
|
||||
// be displayed prior to MathJax performing its typesetting. It also
|
||||
// avoids the Internet Explorer space-removal bug, and can be used in
|
||||
// place of preJax and postJax if that is more convenient.
|
||||
//
|
||||
// For example
|
||||
//
|
||||
// <span class="MathJax_Preview">[math]</span><script type="math/tex">...</script>
|
||||
//
|
||||
@@ -129,6 +128,23 @@ MathJax.Hub.Config({
|
||||
//
|
||||
showProcessingMessages: true,
|
||||
|
||||
//
|
||||
// This value controls the verbosity of the messages in the lower left-hand corner.
|
||||
// Set it to "none" to eliminate all messages, or set it to "simple" to show
|
||||
// "Loading..." and "Processing..." rather than showing the full file name and the
|
||||
// percentage of the mathematics processed.
|
||||
//
|
||||
messageStyle: "normal",
|
||||
|
||||
//
|
||||
// These two parameters control the alignment and shifting of displayed equations.
|
||||
// The first can be "left", "center", or "right", and determines the alignment of
|
||||
// displayed equations. When the alignment is not "center", the second determines
|
||||
// an indentation from the left or right side for the displayed equations.
|
||||
//
|
||||
displayAlign: "center",
|
||||
displayIndent: "0em",
|
||||
|
||||
//
|
||||
// Normally MathJax will perform its starup commands (loading of
|
||||
// configuration, styles, jax, and so on) as soon as it can. If you
|
||||
@@ -182,6 +198,39 @@ MathJax.Hub.Config({
|
||||
['\\[','\\]']
|
||||
],
|
||||
|
||||
//
|
||||
// This array lists the names of the tags whose contents should not be
|
||||
// processed by tex2jax (other than to look for ignore/process classes
|
||||
// as listed below). You can add to (or remove from) this list to prevent
|
||||
// MathJax from processing mathematics in specific contexts.
|
||||
//
|
||||
skipTags: ["script","noscript","style","textarea","pre","code"],
|
||||
|
||||
//
|
||||
// This is the class name used to mark elements whose contents should
|
||||
// not be processed by tex2jax (other than to look for the
|
||||
// processClass pattern below). Note that this is a regular
|
||||
// expression, and so you need to be sure to quote any regexp special
|
||||
// characters. The pattern is automatically preceeded by '(^| )(' and
|
||||
// followed by ')( |$)', so your pattern will have to match full words
|
||||
// in the class name. Assigning an element this class name will
|
||||
// prevent `tex2jax` from processing its contents.
|
||||
//
|
||||
ignoreClass: "tex2jax_ignore",
|
||||
|
||||
//
|
||||
// This is the class name used to mark elements whose contents SHOULD
|
||||
// be processed by tex2jax. This is used to turn on processing within
|
||||
// tags that have been marked as ignored or skipped above. Note that
|
||||
// this is a regular expression, and so you need to be sure to quote
|
||||
// any regexp special characters. The pattern is automatically
|
||||
// preceeded by '(^| )(' and followed by ')( |$)', so your pattern
|
||||
// will have to match full words in the class name. Use this to
|
||||
// restart processing within an element that has been marked as
|
||||
// ignored above.
|
||||
//
|
||||
processClass: "tex2jax_process",
|
||||
|
||||
//
|
||||
// Set to "true" to allow \$ to produce a dollar without starting in-line
|
||||
// math mode. If you uncomment the ['$','$'] line above, you should change
|
||||
@@ -197,12 +246,51 @@ MathJax.Hub.Config({
|
||||
processEnvironments: true,
|
||||
|
||||
//
|
||||
// Controls whether tex2jax inserts MathJax_Preview spans so that the TeX
|
||||
// code is visible until it is processed by MathJax. Set to "false" to prevent
|
||||
// the previews from being inserted (the math will simply disappear until it is
|
||||
// typeset).
|
||||
// Controls whether tex2jax inserts MathJax_Preview spans to make a
|
||||
// preview available, and what preview to use, when it locates in-line
|
||||
// and display mathetics on the page. The default is "TeX", which
|
||||
// means use the TeX code as the preview (until it is processed by
|
||||
// MathJax). Set to "none" to prevent the previews from being
|
||||
// inserted (the math will simply disappear until it is typeset). Set
|
||||
// to an array containing the description of an HTML snippet in order
|
||||
// to use the same preview for all equations on the page (e.g., you
|
||||
// could have it say "[math]" or load an image).
|
||||
//
|
||||
previewTeX: true
|
||||
// E.g., preview: ["[math]"],
|
||||
// or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]]
|
||||
//
|
||||
preview: "TeX"
|
||||
|
||||
},
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// These parameters control the mml2jax preprocessor (when you have included
|
||||
// "mml2jax.js" in the extensions list above).
|
||||
//
|
||||
mml2jax: {
|
||||
|
||||
//
|
||||
// The Id of the element to be processed (defaults to full document)
|
||||
//
|
||||
element: null,
|
||||
|
||||
//
|
||||
// Controls whether mml2jax inserts MathJax_Preview spans to make a
|
||||
// preview available, and what preview to use, whrn it locates
|
||||
// mathematics on the page. The default is "alttext", which means use
|
||||
// the <math> tag's alttext attribute as the preview (until it is
|
||||
// processed by MathJax), if the tag has one. Set to "none" to
|
||||
// prevent the previews from being inserted (the math will simply
|
||||
// disappear until it is typeset). Set to an array containing the
|
||||
// description of an HTML snippet in order to use the same preview for
|
||||
// all equations on the page (e.g., you could have it say "[math]" or
|
||||
// load an image).
|
||||
//
|
||||
// E.g., preview: ["[math]"],
|
||||
// or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]]
|
||||
//
|
||||
preview: "alttext"
|
||||
|
||||
},
|
||||
|
||||
@@ -212,13 +300,28 @@ MathJax.Hub.Config({
|
||||
// "jsMath2jax.js" in the extensions list above).
|
||||
//
|
||||
jsMath2jax: {
|
||||
|
||||
//
|
||||
// Controls whether jsMath2tex inserts MathJax_Preview elements so that
|
||||
// the TeX code is visible until it is processed by MathJax. Set to "false"
|
||||
// to prevent previews from being inserted (the math will simply disappear
|
||||
// until it is typeset).
|
||||
// The Id of the element to be processed (defaults to full document)
|
||||
//
|
||||
previewTeX: true
|
||||
element: null,
|
||||
|
||||
//
|
||||
// Controls whether jsMath2jax inserts MathJax_Preview spans to make a
|
||||
// preview available, and what preview to use, when it locates
|
||||
// mathematics on the page. The default is "TeX", which means use the
|
||||
// TeX code as the preview (until it is processed by MathJax). Set to
|
||||
// "none" to prevent the previews from being inserted (the math will
|
||||
// simply disappear until it is typeset). Set to an array containing
|
||||
// the description of an HTML snippet in order to use the same preview
|
||||
// for all equations on the page (e.g., you could have it say "[math]"
|
||||
// or load an image).
|
||||
//
|
||||
// E.g., preview: ["[math]"],
|
||||
// or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]]
|
||||
//
|
||||
preview: "TeX"
|
||||
|
||||
},
|
||||
|
||||
//============================================================================
|
||||
@@ -241,7 +344,25 @@ MathJax.Hub.Config({
|
||||
//
|
||||
// This is the width to use for the multline environment
|
||||
//
|
||||
MultLineWidth: "85%"
|
||||
MultLineWidth: "85%",
|
||||
|
||||
//
|
||||
// List of macros to define. These are of the form
|
||||
// name: value
|
||||
// where 'value' is the replacement text for the macro \name.
|
||||
// The 'value' can also be [value,n] where 'value' is the replacement
|
||||
// text and 'n' is the number of parameters for the macro.
|
||||
// Note that backslashes must be doubled in the replacement string.
|
||||
//
|
||||
// E.g.,
|
||||
//
|
||||
// Macros: {
|
||||
// RR: '{\\bf R}',
|
||||
// bold: ['{\\bf #1}', 1]
|
||||
// }
|
||||
//
|
||||
Macros: {}
|
||||
|
||||
},
|
||||
|
||||
//============================================================================
|
||||
@@ -269,11 +390,13 @@ MathJax.Hub.Config({
|
||||
scale: 100,
|
||||
|
||||
//
|
||||
// This is a list of the fonts available to MathJax in the
|
||||
// MathJax/Fonts/HTML-CSS directory. If you don't want MathJax
|
||||
// to use one of these fonts (when available on the user's computer),
|
||||
// remove it from the list. Use an empty list to force the use of
|
||||
// web fonts (or image fonts).
|
||||
// This is a list of the fonts to look for on a user's computer in
|
||||
// preference to using MathJax's web-based fonts. These must
|
||||
// correspond to directories available in the jax/output/HTML-CSS/fonts
|
||||
// directory, where MathJax stores data about the characters available
|
||||
// in the fonts. Set this to ["TeX"], for example, to prevent the
|
||||
// use of the STIX fonts, or set it to an empty list, [], if
|
||||
// you want to force MathJax to use web-based or image fonts.
|
||||
//
|
||||
availableFonts: ["STIX","TeX"],
|
||||
|
||||
@@ -313,6 +436,19 @@ MathJax.Hub.Config({
|
||||
// MathJax TeX fonts.
|
||||
//
|
||||
imageFont: "TeX",
|
||||
|
||||
//
|
||||
// This controls whether the MathJax contextual menu will be available
|
||||
// on the mathematics in the page. If true, then right-clicking (on
|
||||
// the PC) or control-clicking (on the Mac) will produce a MathJax
|
||||
// menu that allows you to get the source of the mathematics in
|
||||
// various formats, change the size of the mathematics relative to the
|
||||
// surrounding text, and get information about MathJax.
|
||||
//
|
||||
// Set this to false to disable the menu. When true, the MathMenu
|
||||
// items below configure the actions of the menu.
|
||||
//
|
||||
showMathMenu: true,
|
||||
|
||||
//
|
||||
// This allows you to define or modify the styles used to display
|
||||
@@ -320,19 +456,117 @@ MathJax.Hub.Config({
|
||||
//
|
||||
// Example:
|
||||
// styles: {
|
||||
// ".MathJax_Display": {
|
||||
// "text-align": "left", // left aligned displayed math
|
||||
// "margin-left": "3em", // with 3em indentation
|
||||
// },
|
||||
// ".MathJax_Preview": {
|
||||
// "font-size": "80%", // preview uses a smaller font
|
||||
// color: "red" // and is in red
|
||||
// }
|
||||
// }
|
||||
//
|
||||
styles: {},
|
||||
|
||||
//
|
||||
// Configuration for <maction> tooltips
|
||||
// (see also the #MathJax_Tooltip CSS in MathJax/jax/output/HTML-CSS/config.js,
|
||||
// which can be overriden using the styles values above).
|
||||
//
|
||||
tooltip: {
|
||||
delayPost: 600, // milliseconds delay before tooltip is posted after mouseover
|
||||
delayClear: 600, // milliseconds delay before tooltip is cleared after mouseout
|
||||
offsetX: 10, offsetY: 5 // pixels to offset tooltip from mouse position
|
||||
}
|
||||
},
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// These parameters control the NativeMML output jax.
|
||||
//
|
||||
NativeMML: {
|
||||
|
||||
//
|
||||
// This controls the global scaling of mathematics as compared to the
|
||||
// surrounding text. Values between 100 and 133 are usually good choices.
|
||||
//
|
||||
scale: 100,
|
||||
|
||||
//
|
||||
// This controls whether the MathJax contextual menu will be available
|
||||
// on the mathematics in the page. If true, then right-clicking (on
|
||||
// the PC) or control-clicking (on the Mac) will produce a MathJax
|
||||
// menu that allows you to get the source of the mathematics in
|
||||
// various formats, change the size of the mathematics relative to the
|
||||
// surrounding text, and get information about MathJax.
|
||||
//
|
||||
// Set this to false to disable the menu. When true, the MathMenu
|
||||
// items below configure the actions of the menu.
|
||||
//
|
||||
// There is a separate setting for MSIE, since the code to handle that
|
||||
// is a bit delicate; if it turns out to have unexpected consequences,
|
||||
// you can turn it off without turing off other browser support.
|
||||
//
|
||||
showMathMenu: true,
|
||||
showMathMenuMSIE: true,
|
||||
|
||||
//
|
||||
// This allows you to define or modify the styles used to display
|
||||
// various math elements created by MathJax.
|
||||
//
|
||||
// Example:
|
||||
// styles: {
|
||||
// ".MathJax_MathML": {
|
||||
// color: "red" // MathML is in red
|
||||
// }
|
||||
// }
|
||||
//
|
||||
styles: {}
|
||||
},
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// These parameters control the contextual menus that are available on the
|
||||
// mathematics within the page (provided the showMathMenu value is true above).
|
||||
//
|
||||
MathMenu: {
|
||||
//
|
||||
// This is the hover delay for the display of submenus in the
|
||||
// contextual menu. When the mouse is still over a submenu label for
|
||||
// this long, the menu will appear. (The menu also will appear if you
|
||||
// click on the label.) It is in milliseconds.
|
||||
//
|
||||
delay: 400,
|
||||
|
||||
//
|
||||
// This is the URL for the MathJax Help menu item.
|
||||
//
|
||||
helpURL: "http://www.mathjax.org/help/user/",
|
||||
|
||||
//
|
||||
// These control whether the "Math Renderer", "Font Preferences",
|
||||
// and "Contextual Menu" submenus will be displayed or not.
|
||||
//
|
||||
showRenderer: true,
|
||||
showFontMenu: false,
|
||||
showContext: false,
|
||||
|
||||
//
|
||||
// These are the settings for the Show Source window. The initial
|
||||
// width and height will be reset after the source is shown in an
|
||||
// attempt to make the window fit the output better.
|
||||
//
|
||||
windowSettings: {
|
||||
status: "no", toolbar: "no", locationbar: "no", menubar: "no",
|
||||
directories: "no", personalbar: "no", resizable: "yes", scrollbars: "yes",
|
||||
width: 100, height: 50
|
||||
},
|
||||
|
||||
//
|
||||
// This allows you to change the CSS that controls the menu
|
||||
// appearance. See the extensions/MathMenu.js file for details
|
||||
// of the default settings.
|
||||
//
|
||||
styles: {}
|
||||
|
||||
},
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// These parameters control the MMLorHTML configuration file.
|
||||
@@ -344,7 +578,12 @@ MathJax.Hub.Config({
|
||||
// The output jax that is to be preferred when both are possible
|
||||
// (set to "MML" for native MathML, "HTML" for MathJax's HTML-CSS output jax).
|
||||
//
|
||||
prefer: "HTML"
|
||||
prefer: {
|
||||
MSIE: "MML",
|
||||
Firefox: "MML",
|
||||
Opera: "HTML",
|
||||
other: "HTML"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: fedf9ba9a5b2ef65b82b1fa1eea24e52
|
||||
tags: fbb0d17656682115ca4d033fb2f83ba1
|
||||
@@ -0,0 +1,173 @@
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>CSS Style Objects — MathJax v1.0 documentation</title>
|
||||
<link rel="stylesheet" href="_static/mj.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="MathJax v1.0 documentation" href="index.html" />
|
||||
<link rel="next" title="Glossary" href="glossary.html" />
|
||||
<link rel="prev" title="Describing HTML snippets" href="HTML-snippets.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="glossary.html" title="Glossary"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="HTML-snippets.html" title="Describing HTML snippets"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">MathJax v1.0 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
<div class="section" id="css-style-objects">
|
||||
<span id="id1"></span><h1>CSS Style Objects<a class="headerlink" href="#css-style-objects" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Many MathJax components allow you to specify CSS styles that control
|
||||
the look of the elements they create. These are described using CSS
|
||||
style objects, which are JavaScript objects that represent standard
|
||||
CSS declarations. The main CSS style object is a collection of
|
||||
<cite>name:value</cite> pairs where the <cite>name</cite> is the CSS selector that is being
|
||||
defined, and the <cite>value</cite> is an object that gives the style for that
|
||||
selector. Most often, the selector will need to be enclosed in
|
||||
quotation marks, as it will contain special characters, so you would
|
||||
need to use <tt class="docutils literal"><span class="pre">"#myID"</span></tt> rather than just <tt class="docutils literal"><span class="pre">#myID</span></tt> and <tt class="docutils literal"><span class="pre">"ul</span> <span class="pre">li"</span></tt>
|
||||
rather than just <tt class="docutils literal"><span class="pre">ul</span> <span class="pre">li</span></tt>.</p>
|
||||
<p>The value used to define the CSS style can either be a string
|
||||
containing the CSS definition, or a javascript object that is itself a
|
||||
collection of <cite>name:value</cite> pairs, where the <cite>name</cite> is the attribute
|
||||
being defined and <cite>value</cite> is the value that attibute should be given.
|
||||
Note that, since this is a JavaScript object, the pairs are separated
|
||||
by commas (not semi-colons) and the values are enclosed in quotation
|
||||
marks. If the name contains dashes, it should be enclosed in
|
||||
quotation marks as well.</p>
|
||||
<p>For example, <tt class="docutils literal"><span class="pre">jax/output/HTML-CSS/config.js</span></tt> includes the following
|
||||
declaration:</p>
|
||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">styles</span><span class="o">:</span> <span class="p">{</span>
|
||||
|
||||
<span class="s2">".MathJax .merror"</span><span class="o">:</span> <span class="p">{</span>
|
||||
<span class="s2">"background-color"</span><span class="o">:</span> <span class="s2">"#FFFF88"</span><span class="p">,</span>
|
||||
<span class="nx">color</span><span class="o">:</span> <span class="s2">"#CC0000"</span><span class="p">,</span>
|
||||
<span class="nx">border</span><span class="o">:</span> <span class="s2">"1px solid #CC0000"</span><span class="p">,</span>
|
||||
<span class="nx">padding</span><span class="o">:</span> <span class="s2">"1px 3px"</span><span class="p">,</span>
|
||||
<span class="s2">"font-family"</span><span class="o">:</span> <span class="s2">"serif"</span><span class="p">,</span>
|
||||
<span class="s2">"font-style"</span><span class="o">:</span> <span class="s2">"normal"</span><span class="p">,</span>
|
||||
<span class="s2">"font-size"</span><span class="o">:</span> <span class="s2">"90%"</span>
|
||||
<span class="p">},</span>
|
||||
|
||||
<span class="s2">".MathJax_Preview"</span><span class="o">:</span> <span class="p">{</span><span class="nx">color</span><span class="o">:</span> <span class="s2">"#888888"</span><span class="p">},</span>
|
||||
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This defines two CSS styles, one for the selector <tt class="docutils literal"><span class="pre">.MathJax</span>
|
||||
<span class="pre">.merror</span></tt>, which specifies a background color, foreground color,
|
||||
border, and so on, and a second for <tt class="docutils literal"><span class="pre">.MathJax_Preview</span></tt> that sets its
|
||||
color.</p>
|
||||
<p>You can add as many such definitions to a <tt class="docutils literal"><span class="pre">styles</span></tt> object as you
|
||||
wish. Note, however, that since this is a JavaScript object, the
|
||||
selectors must be unique (e.g., you can’t use two definitions for
|
||||
<tt class="docutils literal"><span class="pre">"img"</span></tt>, for example, as only the last one would be saved). If you
|
||||
need to use more than one entry for a single selector, you can add
|
||||
comments like <tt class="docutils literal"><span class="pre">/*</span> <span class="pre">1</span> <span class="pre">*/</span></tt> and <tt class="docutils literal"><span class="pre">/*</span> <span class="pre">2</span> <span class="pre">*/</span></tt> to the selector to make them
|
||||
unique.</p>
|
||||
<p>It is possible to include selectors like <tt class="docutils literal"><span class="pre">"@media</span> <span class="pre">print"</span></tt>, in which
|
||||
case the value is a CSS style object. For example:</p>
|
||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">styles</span><span class="o">:</span> <span class="p">{</span>
|
||||
<span class="s2">"@media print"</span><span class="o">:</span> <span class="p">{</span>
|
||||
<span class="s2">".MathJax .merror"</span><span class="o">:</span> <span class="p">{</span>
|
||||
<span class="s2">"background-color"</span><span class="o">:</span> <span class="s2">"white"</span><span class="p">,</span>
|
||||
<span class="nx">border</span><span class="o">:</span> <span class="mi">0</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The various extensions and output processors include more examples of
|
||||
CSS style objects, so see the code for those files for additional
|
||||
samples. In particular, the <tt class="docutils literal"><span class="pre">extensions/MathMenu.js</span></tt>,
|
||||
<tt class="docutils literal"><span class="pre">extensions/MathZoom.js</span></tt>, <tt class="docutils literal"><span class="pre">extensions/FontWarnsing.js</span></tt>, and
|
||||
<tt class="docutils literal"><span class="pre">jax/output/HTML-CSS/jax.js</span></tt> files include such definitions.</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="HTML-snippets.html"
|
||||
title="previous chapter">Describing HTML snippets</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="glossary.html"
|
||||
title="next chapter">Glossary</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/CSS-styles.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" size="18" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="glossary.html" title="Glossary"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="HTML-snippets.html" title="Describing HTML snippets"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">MathJax v1.0 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2010 Design Science.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0b2.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,170 @@
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Describing HTML snippets — MathJax v1.0 documentation</title>
|
||||
<link rel="stylesheet" href="_static/mj.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="MathJax v1.0 documentation" href="index.html" />
|
||||
<link rel="next" title="CSS Style Objects" href="CSS-styles.html" />
|
||||
<link rel="prev" title="Converting to MathJax from jsMath" href="jsMath.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="CSS-styles.html" title="CSS Style Objects"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="jsMath.html" title="Converting to MathJax from jsMath"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">MathJax v1.0 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
<div class="section" id="describing-html-snippets">
|
||||
<span id="html-snippets"></span><h1>Describing HTML snippets<a class="headerlink" href="#describing-html-snippets" title="Permalink to this headline">¶</a></h1>
|
||||
<p>A number of MathJax configuration options allow you to specify an HTML
|
||||
snippet using a JavaScript object. This lets you include HTML in your
|
||||
configutation files even though they are not HTML files themselves.
|
||||
The format is fairly simple, but flexible enough to let you represent
|
||||
complicated HTML trees.</p>
|
||||
<p>An HTML snippet is an array consisting of a series elements that formt
|
||||
he HTML tree. Those elements are one of two things: either a string,
|
||||
which represents text to be included in the snippet, or an array,
|
||||
which represents an HTML tag to be included. In the latter case, the
|
||||
array consists of three items: a string that is the tag name (e.g.,
|
||||
“img”), an optional object that gives attributes for the tag (as
|
||||
described below), and an optional HTML snippet array that gives the
|
||||
contents of the tag.</p>
|
||||
<p>When attributes are provided, they are given as <cite>name:value</cite> pairs,
|
||||
with the <cite>name</cite> giving the attribute name, and <cite>value</cite> giving its
|
||||
value. For example</p>
|
||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[[</span><span class="s2">"img"</span><span class="p">,{</span><span class="nx">src</span><span class="o">:</span><span class="s2">"/images/mypic.jpg"</span><span class="p">}]]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>represents an HTML snippet that includes one element: an <tt class="docutils literal"><span class="pre"><img></span></tt> tag
|
||||
with <tt class="docutils literal"><span class="pre">src</span></tt> set to <tt class="docutils literal"><span class="pre">/images/mypic.jpg</span></tt>. That is, this is
|
||||
equivalent to</p>
|
||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><img</span> <span class="na">src=</span><span class="s">"/images/mypic.jpg"</span><span class="nt">></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Note that the snippet has two sets of square brackets. The outermost
|
||||
one is for the array that holds the snippet, and the innermost set is
|
||||
because the first (and only) element in the snippet is a tag, not
|
||||
text. Note that the code <tt class="docutils literal"><span class="pre">["img",{src:"/images/mypic.jpg"}]</span></tt>
|
||||
is invalid as an HTML snippet. It would represent a snippet that
|
||||
starts with “img” as text in the snippet (not a tag), but the second
|
||||
item is neither a string nor an array, and so is illegal. This is a
|
||||
common mistake that should be avoided.</p>
|
||||
<p>A more complex example is the following:</p>
|
||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[</span>
|
||||
<span class="s2">"Please read the "</span><span class="p">,</span>
|
||||
<span class="p">[</span><span class="s2">"a"</span><span class="p">,{</span><span class="nx">href</span><span class="o">:</span><span class="s2">"instructions.html"</span><span class="p">},[</span><span class="s2">"instructions"</span><span class="p">]],</span>
|
||||
<span class="s2">" carefully before proceeding"</span>
|
||||
<span class="p">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>which is equivalent to</p>
|
||||
<div class="highlight-html"><div class="highlight"><pre>please read the <span class="nt"><a</span> <span class="na">href=</span><span class="s">"instructions.html"</span><span class="nt">></span>instructions<span class="nt"></a></span> carefully
|
||||
before proceeding.
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>A final example shows how to set style attributes on an object:</p>
|
||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[[</span><span class="s2">"span"</span><span class="p">,</span>
|
||||
<span class="p">{</span>
|
||||
<span class="nx">id</span><span class="o">:</span><span class="s2">"mySpan"</span><span class="p">,</span>
|
||||
<span class="nx">style</span><span class="o">:</span> <span class="p">{</span><span class="nx">color</span><span class="o">:</span><span class="s2">"red"</span><span class="p">,</span> <span class="s2">"font-weight"</span><span class="o">:</span><span class="s2">"bold"</span><span class="p">}</span>
|
||||
<span class="p">},</span>
|
||||
<span class="p">[</span><span class="s2">" This is bold text shown in red "</span><span class="p">]</span>
|
||||
<span class="p">]]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>which is equivalent to</p>
|
||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><span</span> <span class="na">id=</span><span class="s">"mySpan"</span> <span class="na">style=</span><span class="s">"color: red; font-weight: bold;"</span><span class="nt">></span>
|
||||
This is bold text shown in red
|
||||
<span class="nt"></span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="jsMath.html"
|
||||
title="previous chapter">Converting to MathJax from jsMath</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="CSS-styles.html"
|
||||
title="next chapter">CSS Style Objects</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/HTML-snippets.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" size="18" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="CSS-styles.html" title="CSS Style Objects"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="jsMath.html" title="Converting to MathJax from jsMath"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">MathJax v1.0 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2010 Design Science.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0b2.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
@@ -0,0 +1,79 @@
|
||||
.. _css-style-objects:
|
||||
|
||||
*****************
|
||||
CSS Style Objects
|
||||
*****************
|
||||
|
||||
Many MathJax components allow you to specify CSS styles that control
|
||||
the look of the elements they create. These are described using CSS
|
||||
style objects, which are JavaScript objects that represent standard
|
||||
CSS declarations. The main CSS style object is a collection of
|
||||
`name:value` pairs where the `name` is the CSS selector that is being
|
||||
defined, and the `value` is an object that gives the style for that
|
||||
selector. Most often, the selector will need to be enclosed in
|
||||
quotation marks, as it will contain special characters, so you would
|
||||
need to use ``"#myID"`` rather than just ``#myID`` and ``"ul li"``
|
||||
rather than just ``ul li``.
|
||||
|
||||
The value used to define the CSS style can either be a string
|
||||
containing the CSS definition, or a javascript object that is itself a
|
||||
collection of `name:value` pairs, where the `name` is the attribute
|
||||
being defined and `value` is the value that attibute should be given.
|
||||
Note that, since this is a JavaScript object, the pairs are separated
|
||||
by commas (not semi-colons) and the values are enclosed in quotation
|
||||
marks. If the name contains dashes, it should be enclosed in
|
||||
quotation marks as well.
|
||||
|
||||
For example, ``jax/output/HTML-CSS/config.js`` includes the following
|
||||
declaration:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
styles: {
|
||||
|
||||
".MathJax .merror": {
|
||||
"background-color": "#FFFF88",
|
||||
color: "#CC0000",
|
||||
border: "1px solid #CC0000",
|
||||
padding: "1px 3px",
|
||||
"font-family": "serif",
|
||||
"font-style": "normal",
|
||||
"font-size": "90%"
|
||||
},
|
||||
|
||||
".MathJax_Preview": {color: "#888888"},
|
||||
|
||||
}
|
||||
|
||||
This defines two CSS styles, one for the selector ``.MathJax
|
||||
.merror``, which specifies a background color, foreground color,
|
||||
border, and so on, and a second for ``.MathJax_Preview`` that sets its
|
||||
color.
|
||||
|
||||
You can add as many such definitions to a ``styles`` object as you
|
||||
wish. Note, however, that since this is a JavaScript object, the
|
||||
selectors must be unique (e.g., you can't use two definitions for
|
||||
``"img"``, for example, as only the last one would be saved). If you
|
||||
need to use more than one entry for a single selector, you can add
|
||||
comments like ``/* 1 */`` and ``/* 2 */`` to the selector to make them
|
||||
unique.
|
||||
|
||||
It is possible to include selectors like ``"@media print"``, in which
|
||||
case the value is a CSS style object. For example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
styles: {
|
||||
"@media print": {
|
||||
".MathJax .merror": {
|
||||
"background-color": "white",
|
||||
border: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
The various extensions and output processors include more examples of
|
||||
CSS style objects, so see the code for those files for additional
|
||||
samples. In particular, the ``extensions/MathMenu.js``,
|
||||
``extensions/MathZoom.js``, ``extensions/FontWarnsing.js``, and
|
||||
``jax/output/HTML-CSS/jax.js`` files include such definitions.
|
||||
@@ -0,0 +1,83 @@
|
||||
.. _html-snippets:
|
||||
|
||||
************************
|
||||
Describing HTML snippets
|
||||
************************
|
||||
|
||||
A number of MathJax configuration options allow you to specify an HTML
|
||||
snippet using a JavaScript object. This lets you include HTML in your
|
||||
configutation files even though they are not HTML files themselves.
|
||||
The format is fairly simple, but flexible enough to let you represent
|
||||
complicated HTML trees.
|
||||
|
||||
An HTML snippet is an array consisting of a series elements that formt
|
||||
he HTML tree. Those elements are one of two things: either a string,
|
||||
which represents text to be included in the snippet, or an array,
|
||||
which represents an HTML tag to be included. In the latter case, the
|
||||
array consists of three items: a string that is the tag name (e.g.,
|
||||
"img"), an optional object that gives attributes for the tag (as
|
||||
described below), and an optional HTML snippet array that gives the
|
||||
contents of the tag.
|
||||
|
||||
When attributes are provided, they are given as `name:value` pairs,
|
||||
with the `name` giving the attribute name, and `value` giving its
|
||||
value. For example
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
[["img",{src:"/images/mypic.jpg"}]]
|
||||
|
||||
represents an HTML snippet that includes one element: an ``<img>`` tag
|
||||
with ``src`` set to ``/images/mypic.jpg``. That is, this is
|
||||
equivalent to
|
||||
|
||||
.. code-block:: html
|
||||
|
||||
<img src="/images/mypic.jpg">
|
||||
|
||||
Note that the snippet has two sets of square brackets. The outermost
|
||||
one is for the array that holds the snippet, and the innermost set is
|
||||
because the first (and only) element in the snippet is a tag, not
|
||||
text. Note that the code ``["img",{src:"/images/mypic.jpg"}]``
|
||||
is invalid as an HTML snippet. It would represent a snippet that
|
||||
starts with "img" as text in the snippet (not a tag), but the second
|
||||
item is neither a string nor an array, and so is illegal. This is a
|
||||
common mistake that should be avoided.
|
||||
|
||||
A more complex example is the following:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
[
|
||||
"Please read the ",
|
||||
["a",{href:"instructions.html"},["instructions"]],
|
||||
" carefully before proceeding"
|
||||
]
|
||||
|
||||
which is equivalent to
|
||||
|
||||
.. code-block:: html
|
||||
|
||||
please read the <a href="instructions.html">instructions</a> carefully
|
||||
before proceeding.
|
||||
|
||||
A final example shows how to set style attributes on an object:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
[["span",
|
||||
{
|
||||
id:"mySpan",
|
||||
style: {color:"red", "font-weight":"bold"}
|
||||
},
|
||||
[" This is bold text shown in red "]
|
||||
]]
|
||||
|
||||
which is equivalent to
|
||||
|
||||
.. code-block:: html
|
||||
|
||||
<span id="mySpan" style="color: red; font-weight: bold;">
|
||||
This is bold text shown in red
|
||||
</span>
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
.. _api-ajax:
|
||||
|
||||
***********************
|
||||
The MathJax.Ajax Object
|
||||
***********************
|
||||
|
||||
The `MathJax.Ajax` structure holds the data and functions for handling
|
||||
loading of external modules. Modules are loaded only once, even if
|
||||
called for in several places. The loading of files is asynchronous,
|
||||
and so the code that requests an external module will continue to run
|
||||
even when that module has not completed loading, so it is important to
|
||||
be aware of the timing issues this may cause. Similarly, creating or
|
||||
loading stylesheets is an asynchronous action. In particular, all
|
||||
actions that rely on the file or stylesheet having been loaded must be
|
||||
delayed until after the file has been downloaded completely. This is
|
||||
the reason for the large number of routines that take callback
|
||||
functions.
|
||||
|
||||
Any operation that could cause the loading of a file or stylesheet
|
||||
must be synchronized with the rest of the code via such callbacks.
|
||||
Since processing any mathematics might cause files to be loaded (e.g.,
|
||||
little-used markup might be implemented in an extension that is loaded
|
||||
only when that markup is used), any code that dynamically typesets
|
||||
mathematics will need to be structured to use callbacks to guarantee
|
||||
that the mathematics has been completely processed before the code
|
||||
tries to use it. See the :ref:`Synchronizing with MathJax <synchronization>`
|
||||
documentation for details on how to do this properly.
|
||||
|
||||
|
||||
Properties
|
||||
==========
|
||||
|
||||
.. describe:: timeout
|
||||
|
||||
Number of milliseconds to wait for a file to load before
|
||||
it is considered to have failed to load.
|
||||
|
||||
*Default:* 20 seconds
|
||||
|
||||
.. describe:: STATUS.OK
|
||||
|
||||
The value used to indicate that a file load has occurred
|
||||
successfully.
|
||||
|
||||
.. describe:: STATUS.ERROR
|
||||
|
||||
The value used to indicate that a file load has caused an error or
|
||||
a timeout to occur.
|
||||
|
||||
.. describe:: loaded
|
||||
|
||||
An object containing the names of the files that have been loaded (or
|
||||
requested) so far. ``MathJax.Ajax.loaded["file"]`` will be
|
||||
non-``null`` when the file has been loaded, with the value being
|
||||
the ``MathJax.Ajax.STATUS`` value of the load attempt.
|
||||
|
||||
.. describe:: loading
|
||||
|
||||
An object containing the files that are currently loading, the
|
||||
callbacks that are to be run when they load or timeout, and
|
||||
additional internal data.
|
||||
|
||||
|
||||
Methods
|
||||
=======
|
||||
|
||||
.. method:: Require(file[,callback])
|
||||
|
||||
Loads the given file if it hasn't been already. The file must be a
|
||||
JavaScript file or a CSS stylesheet; i.e., it must end in ``.js``
|
||||
or ``.css``. Alternatively, it can be an object with a single
|
||||
`key:value` pair where the `key` is one of ``js`` or ``css`` and
|
||||
the `value` is the file of that type to be loaded (this makes it
|
||||
possible to have the file be created by a CGI script, for example,
|
||||
or to use a ``data::`` URL). The file must be relative to the
|
||||
MathJax home directory and can not contain ``../`` file path
|
||||
components.
|
||||
|
||||
When the file is completely loaded and run, the `callback`, if
|
||||
provided, will be executed passing it the status of the file load.
|
||||
If there was an error while loading the file, or if the file fails
|
||||
to load within the time limit given by ``MathJax.Ajax.timout``,
|
||||
the status will be ``MathJax.Ajax.STATUS.ERROR`` otherwise it
|
||||
will be ``MathJax.Ajax.STATUS.OK``. If the file is already
|
||||
loaded, the callback will be called immediately and the file will
|
||||
not be loaded again.
|
||||
|
||||
:Parameters:
|
||||
- **file** --- name of the file to be loaded
|
||||
- **callback** --- the callback specification
|
||||
:Returns: the callback object
|
||||
|
||||
.. method:: Load(file[,callback])
|
||||
|
||||
Used internally to load a given file without checking if it
|
||||
already has been loaded, or where it is to be found.
|
||||
|
||||
:Parameters:
|
||||
- **file** --- name of the file to be loaded
|
||||
- **callback** --- the callback specification
|
||||
:Returns: the callback object
|
||||
|
||||
.. method:: loadComplete(file)
|
||||
|
||||
Called from within the loaded files to inform MathJax that the
|
||||
file has been completely loaded and initialized. The `file`
|
||||
parameter is the name of the file that has been loaded. This
|
||||
routine will cause any callback functions registered for the file
|
||||
or included in the :meth:``MathJax.Ajax.Require()`` calls to be
|
||||
executed, passing them the status or the load
|
||||
(`MathJax.Ajax.STATUS.OK`` or ``MathJax.Ajax.STATUS.ERROR``) as
|
||||
their last parameter.
|
||||
|
||||
:Parameters:
|
||||
- **file** --- name of the file that has been loaded
|
||||
:Returns: ``null``
|
||||
|
||||
.. method:: loadTimeout(file)
|
||||
|
||||
Called when the timeout period is over and the file hasn't loaded.
|
||||
This indicates an error condition, and the
|
||||
:meth:`MathJax.Ajax.loadError()` method will be executed, then the
|
||||
file's callback will be run with ``MathJax.Ajax.STATUS.ERROR`` as
|
||||
its parameter.
|
||||
|
||||
:Parameters:
|
||||
- **file** --- name of the file that timed out
|
||||
:Returns: ``null``
|
||||
|
||||
.. method:: loadError(file)
|
||||
|
||||
The default error handler called when a file fails to load. It
|
||||
puts a warning message into the MathJax message box on screen.
|
||||
|
||||
:Parameters:
|
||||
- **file** --- the name of the file that failed to load
|
||||
:Returns: ``null``
|
||||
|
||||
.. method:: loadHook(file,callback)
|
||||
|
||||
Registers a callback to be executed when the given file is
|
||||
loaded. The file load operation need to be started when this
|
||||
method is called, so it can be used to register a hook for a file
|
||||
that may be loaded in the future.
|
||||
|
||||
:Parameters:
|
||||
- **file** --- the name of the file to wait for
|
||||
- **callback** --- the callback specification
|
||||
:Returns: the callback object
|
||||
|
||||
.. method:: Styles(styles[,callback])
|
||||
|
||||
Creates a stylesheet from the given style data. `styles` can
|
||||
either be a string containing a stylesheet definition, or an
|
||||
object containing a :ref:`CSS Style Object <css-style-objects>`.
|
||||
For example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
MathJax.Ajax.Styles("body {font-family: serif; font-style: italic}");
|
||||
|
||||
and
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
MathJax.Ajax.Styles({
|
||||
body: {
|
||||
"font-family": "serif",
|
||||
"font-style": "italic"
|
||||
}
|
||||
});
|
||||
|
||||
both set the body font family and style.
|
||||
|
||||
The callback routine is called when the stylesheet has been
|
||||
created and is available for use.
|
||||
|
||||
:Parameters:
|
||||
- **styles** --- CSS style object for the styles to set
|
||||
- **callback** --- the callback specification
|
||||
:Returns: the callback object
|
||||
|
||||
.. note::
|
||||
|
||||
Internet Explorer has a limit of 32 dynamically created
|
||||
stylesheets, so it is best to combine your styles into one
|
||||
large group rather than making several smaller calls.
|
||||
|
||||
.. method:: fileURL(file)
|
||||
|
||||
Returns a complete URL to a file (replacing ``[MathJax]`` with the
|
||||
actual root URL location).
|
||||
|
||||
:Parameters:
|
||||
- **file** --- the file name possibly including ``[MathJax]``
|
||||
:Returns: the full URL for the file
|
||||
@@ -0,0 +1,259 @@
|
||||
.. _api-callback:
|
||||
|
||||
**************************
|
||||
The MathJax.Callback Class
|
||||
**************************
|
||||
|
||||
The ``MathJax.Callback`` object is one of the key mechanisms used by
|
||||
MathJax to synchronize its actions with those that occur
|
||||
asynchronously, like loading files and stylesheets. A `Callback`
|
||||
object is used to tie the execution of a function to the completion of
|
||||
an asynchronous action. See :ref:`Synchronizing with MathJax
|
||||
<synchronization>` for more details, and :ref:`Using Callbacks
|
||||
<using-callbacks>` in particular for examples of how to specify and
|
||||
use MathJax `Callback` objects.
|
||||
|
||||
|
||||
Specifying a callback
|
||||
---------------------
|
||||
|
||||
When a method includes a callback as one of its arguments, that
|
||||
callback can be specified in a number of different ways, depending on
|
||||
the functionality that is required of the callback. The easiest case
|
||||
is to simply provide a function to be called, but it is also possible
|
||||
to include data to pass to the function when it is executed, and even
|
||||
the object that will be used as the javascript `this` object when the
|
||||
function is called.
|
||||
|
||||
Most functions that take callbacks as arguments accept a `callback
|
||||
specification` rather than an actual callback object, though you can
|
||||
use the :meth:`MathJax.Callback` function to convert a callback
|
||||
specification into a Callback object if needed.
|
||||
|
||||
A callback specification is any one of the following:
|
||||
|
||||
.. describe:: fn
|
||||
|
||||
A function that is to be called when the callback is executed.
|
||||
No additional data is passed to it (other that what it is
|
||||
called with at the time the callback is executed), and `this`
|
||||
will be the window object.
|
||||
|
||||
.. describe:: [fn]
|
||||
|
||||
An array containing a function to be called when the callback
|
||||
is executed (as above).
|
||||
|
||||
.. describe:: [fn, data...]
|
||||
|
||||
An array containing a function together with data to be passed
|
||||
to that function when the callback is executed; `this` is still
|
||||
the window object. For example,
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
[function (x,y) {return x+y}, 2, 3]
|
||||
|
||||
would specify a callback that would pass ``2`` and ``3`` to
|
||||
the given function, and it would return their sum, ``5``, when
|
||||
the callback is executed.
|
||||
|
||||
.. describe:: [object, fn]
|
||||
|
||||
An array containing an object to use as `this` and a function to
|
||||
call for the callback. For example,
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
[{x:'foo', y:'bar'}, function () {this.x}]
|
||||
|
||||
would produce a callback that returns the string ``"foo"``
|
||||
when it is called.
|
||||
|
||||
.. describe:: [object, fn, data...]
|
||||
|
||||
Similar to the previous case, but with data that is passed to
|
||||
the function as well.
|
||||
|
||||
..describe:: ["method", object]
|
||||
|
||||
Here, `object` is an object that has a method called `method`, and
|
||||
the callback will execute that method (with the object as
|
||||
`this`) when it is called. For example,
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
["length",[1,2,3,4]]
|
||||
|
||||
would call the `length` method on the array ``[1,2,3,4]`` when
|
||||
the callback is called, returning ``4``.
|
||||
|
||||
.. describe:: ["method", object, data...]
|
||||
|
||||
Similar to the previous case, but with data that is passed to
|
||||
the method. E.g.,
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
["slice",[1,2,3,4],1,3]
|
||||
|
||||
would perform the equivalent of ``[1,2,3,4].slice(1,3)``,
|
||||
which returns the array ``[2,3]`` as a result.
|
||||
|
||||
.. describe:: {hook: fn, data: [...], object: this}
|
||||
|
||||
Here the data for the callback are given in an associative
|
||||
array of `key:value` pairs. The value of `hook` is the
|
||||
function to call, the value of `data` is an array of the
|
||||
arguments to pass to the function, and the value of `object`
|
||||
is the object to use as `this` in the function call. The
|
||||
specification need not include all three `key:value` pairs; any
|
||||
that are missing get default values (a function that does
|
||||
nothing, an empty array, and the window object, respectively).
|
||||
|
||||
.. describe:: "string"
|
||||
|
||||
This specifies a callback where the string is executed via an
|
||||
``eval()`` statement. The code is run in the global context,
|
||||
so any variables or functions created by the string become
|
||||
part of the global namespace. The return value is the value of
|
||||
the last statement executed in the string.
|
||||
|
||||
|
||||
Executing a Callback Object
|
||||
===========================
|
||||
|
||||
The `Callback` object is itself a function, and calling that function
|
||||
executes the callback. You can pass the callback additional
|
||||
parameters, just as you can any function, and these will be added to
|
||||
the callback function's argument list following any data that was
|
||||
supplied at the time the callback was created. For example
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
var f = function (x,y) {return x + " and " +y}
|
||||
var cb = MathJax.Callback([f, "foo"]);
|
||||
var result = cb("bar"); // sets result to "foo and bar"
|
||||
|
||||
Usually, the callback is not executed by the code that creates it (as
|
||||
it is in the example above), but by some other code that runs at a
|
||||
later time at the completion of some other activity (say the loading
|
||||
of a file), or in response to a user action. For example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
function f(x) {alert("x contains "+x)};
|
||||
function DelayedX(time) {
|
||||
var x = "hi";
|
||||
setTimeout(MathJax.Callback([f, x], time);
|
||||
}
|
||||
|
||||
The ``DelayedX`` function arranges for the function ``f`` to be called at
|
||||
a later time, passing it the value of a local variable, ``x``. Normally,
|
||||
this would require the use of a closure, but that is not needed when a
|
||||
`MathJax.Callback` object is used.
|
||||
|
||||
|
||||
Callback Object Properties
|
||||
--------------------------
|
||||
|
||||
.. describe:: hook
|
||||
|
||||
The function to be called when the callback is executed.
|
||||
|
||||
.. describe:: data
|
||||
|
||||
An array containing the arguments to pass to the callback
|
||||
function when it is executed.
|
||||
|
||||
.. describe:: object
|
||||
|
||||
The object to use as `this` during the call to the callback
|
||||
function.
|
||||
|
||||
.. describe:: called
|
||||
|
||||
Set to ``true`` after the callback has been called, and undefined
|
||||
otherwise. A callback will not be exectued a second time unless
|
||||
the callback's :meth:`reset()` method is called first, or its
|
||||
``autoReset`` property is set to ``true``.
|
||||
|
||||
.. describe:: autoReset
|
||||
|
||||
Set this to ``true`` if you want to be able to call the callback
|
||||
more than once. (This is the case for signal listeners, for example).
|
||||
|
||||
.. describe:: isCallback
|
||||
|
||||
Always set to ``true`` (used to detect if an object is a callback
|
||||
or not).
|
||||
|
||||
|
||||
Callback Object Methods
|
||||
-----------------------
|
||||
|
||||
.. method:: reset()
|
||||
|
||||
Clears the callback's `called` property.
|
||||
|
||||
|
||||
MathJax.Callback Methods
|
||||
------------------------
|
||||
|
||||
.. method:: Delay(time[, callback])
|
||||
|
||||
Waits for the specified time (given in milliseconds) and then
|
||||
performs the callback. It returns the Callback object (or a blank
|
||||
one if none was supplied). The returned callback structure has a
|
||||
`timeout` property set to the result of the ``setTimeout()`` call
|
||||
that was used to perform the wait so that you can cancel the wait,
|
||||
if needed. Thus :meth:`MathJax.Callback.Delay()` can be used to
|
||||
start a timeout delay that executes the callback if an action
|
||||
doesn't occur within the given time (and if the action does occur,
|
||||
the timeout can be canceled). Since
|
||||
:meth:`MathJax.Callback.Delay()` returns a callback structure, it
|
||||
can be used in a callback queue to insert a delay between queued
|
||||
commands.
|
||||
|
||||
:Parameters:
|
||||
- **time** --- the amount of time to wait
|
||||
- **callback** --- the callback specification
|
||||
:Returns: the callback object
|
||||
|
||||
.. method:: executeHooks(hooks[, data[,reset]])
|
||||
|
||||
Calls each callback in the `hooks` array (or the single hook if it
|
||||
is not an array), passing it the arguments stored in the data
|
||||
array. It `reset` is ``true``, then the callback's
|
||||
:meth:`reset()` method will be called before each hook is
|
||||
executed. If any of the hooks returns a `Callback` object, then
|
||||
it collects those callbacks and returns a new callback that will
|
||||
execute when all the ones returned by the hooks have been
|
||||
completed. Otherwise, :meth:`MathJax.Callback.executeHooks()`
|
||||
returns ``null``.
|
||||
|
||||
:Parameters:
|
||||
- **hooks** --- array of hooks to be called, or a hook
|
||||
- **data** --- array of arguments to pass to each hook in turn
|
||||
- **reset** --- ``true`` if the :meth:`reset()` method should be called
|
||||
:Returns: callback that waits for all the hooks to complete, or ``null``
|
||||
|
||||
.. method:: Queue([callback,...])
|
||||
|
||||
Creates a `MathJax.CallBack.Queue` object and pushes the given
|
||||
callbacks into the queue. See :ref:`Using Queues <using-queues>`
|
||||
for more details about MathJax queues.
|
||||
|
||||
:Parameters:
|
||||
- **callback** --- one or more callback specifications
|
||||
:Returns: the `Queue` object
|
||||
|
||||
.. method:: Signal(name)
|
||||
|
||||
Looks for a named signal, creates it if it doesn't already exist,
|
||||
and returns the signal object. See
|
||||
:ref:`Using Signals <using-signals>` for more details.
|
||||
|
||||
:Parameters:
|
||||
- **name** --- name of the signal to get or create
|
||||
:Returns: the `Signal` object
|
||||
@@ -0,0 +1,122 @@
|
||||
.. _api-element-jax:
|
||||
|
||||
****************************
|
||||
The MathJax.ElementJax Class
|
||||
****************************
|
||||
|
||||
The element jax is the bridge between the input and output jax, and
|
||||
contains the data produced by the input jax needed by the output jax
|
||||
to display the results. It is tied to the individual ``<script>`` tag
|
||||
that produced it, and is the object used by JavaScript programs to
|
||||
interact with the mathematics on the page.
|
||||
|
||||
An element jax is stored in the ``jax.js`` file in a subdirectory of
|
||||
the ``jax/element`` directory, with the subdirectory name being the
|
||||
name of the element jax. Currently, there is only one element jax
|
||||
class, the `mml` element jax, and it is stored in ``jax/element/mml``.
|
||||
|
||||
The `MathJax.ElementJax` class is a subclass of the :ref:`MathJax Jax
|
||||
<api-jax>` class, and inherits the properties and methods of that
|
||||
class. Those listed below are the additional or overridden ones from
|
||||
that class.
|
||||
|
||||
|
||||
Class Properties
|
||||
================
|
||||
|
||||
.. describe:: name
|
||||
|
||||
The name of the jax.
|
||||
|
||||
.. describe:: version
|
||||
|
||||
The version number of the jax.
|
||||
|
||||
.. describe:: directory
|
||||
|
||||
The directory where the jax files are stored (e.g., ``"[MathJax]/jax/element/mml"``);
|
||||
|
||||
|
||||
Instance Properties
|
||||
===================
|
||||
|
||||
.. describe:: inputJax
|
||||
|
||||
A reference to the input jax that created the element.
|
||||
|
||||
.. describe:: outputJax
|
||||
|
||||
A reference to the output jax that has processed this element.
|
||||
|
||||
.. describe:: inputID
|
||||
|
||||
The DOM `id` of the ``<script>`` tag that generated this element
|
||||
(if it doesn't have one initially, the MathJax hub will supply
|
||||
one). Note that this is not a reference to the element itself;
|
||||
that element will have a reference to this element jax, and if
|
||||
`inputID` were a reference back, that would cause a reference
|
||||
loop, which some browsers would not free properly during trash
|
||||
collection, thus causing a memory leak.
|
||||
|
||||
.. describe:: originalText
|
||||
|
||||
A string indicating the original input text that was processed for
|
||||
this element.
|
||||
|
||||
.. describe:: mimeType
|
||||
|
||||
The MIME-type of the element jax (`jax/mml` in the case of an
|
||||
`mml` element jax).
|
||||
|
||||
Other data specific to the element jax subclass may also appear here.
|
||||
|
||||
|
||||
Methods
|
||||
=======
|
||||
|
||||
.. Method:: Text(text[,callback])
|
||||
|
||||
Sets the input text for this element to the given text and
|
||||
reprocesses the mathematics. (I.e., update the equation to the
|
||||
new one given by `text`). When the processing is complete, the
|
||||
`callback`, if any, is called.
|
||||
|
||||
:Parameters:
|
||||
- **text** --- the new mathematic source string for the element
|
||||
- **callback** --- the callback specification
|
||||
:Returns: the callback object
|
||||
|
||||
.. Method:: Reprocess([callback])
|
||||
:noindex:
|
||||
|
||||
Remove the output and produce it again. This may be necessary if
|
||||
there are changes to the CSS styles that would affect the layout
|
||||
of the mathematics, for example. The `callback`, if any, is
|
||||
called when the process completes.
|
||||
|
||||
:Parameters:
|
||||
- **callback** --- the callback specification
|
||||
:Returns: the callback object
|
||||
|
||||
.. Method:: Remove()
|
||||
:noindex:
|
||||
|
||||
Removes the output for this element from the web page (but does
|
||||
not remove the original ``<script>``). The ``<script>`` will be
|
||||
considered unprocessed, and the next call to
|
||||
:meth:`MathJax.hub.Typeset()` will re-display it.
|
||||
|
||||
:Returns: ``null``
|
||||
|
||||
.. Method:: SourceElement()
|
||||
|
||||
Returns a reference to the original ``<script>`` DOM element
|
||||
associated to this element jax.
|
||||
|
||||
:Returns: the ``<script>`` element
|
||||
|
||||
Output jax may add new methods to the base element jax class to
|
||||
perform exporting to other formats. For example, a MathML output jax
|
||||
could add ``toMathML()``, or an accessibility output jax could add
|
||||
``toAudible()``. These could be made available via the MathJax
|
||||
contextual menu.
|
||||
@@ -0,0 +1,122 @@
|
||||
.. _api-html:
|
||||
|
||||
***********************
|
||||
The MathJax.HTML Object
|
||||
***********************
|
||||
|
||||
The ``MathJax.HTML`` object provides routines for creating HTML
|
||||
elements and adding them to the page, and int particular, it contains
|
||||
the code that processes MathJax's :ref:`HTML snippets <html-snippets>`
|
||||
and turns them into actual DOM objects. It also implements the
|
||||
methods used to manage the cookies used by MathJax.
|
||||
|
||||
|
||||
Properties
|
||||
==========
|
||||
|
||||
.. describe:: Cookie.prefix: "mjx"
|
||||
|
||||
The prefix used for names of cookies stored by MathJax.
|
||||
|
||||
.. describe:: Cookie.expires: 365
|
||||
|
||||
The expiration time (in days) for cookies created by MathJax.
|
||||
|
||||
|
||||
Methods
|
||||
=======
|
||||
|
||||
.. method:: Element(type[,attributes[,contents]])
|
||||
|
||||
Creates a DOM element of the given type. If `attributes` is
|
||||
non-``null``, it is an object that contains `key:value` pairs of
|
||||
attributes to set for the newly created element. If `contents` is
|
||||
non-``null``, it is an :ref:`HTML snippet <html-snippets>` that
|
||||
describes the contents to create for the element. For example
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
var div = MathJax.HTML.Element(
|
||||
"div",
|
||||
{id: "MathDiv", style:{border:"1px solid", padding:"5px"}},
|
||||
["Here is math: $x+1$",["br"],"and a display $$x+1\\over x-1$$"]
|
||||
);
|
||||
|
||||
:Parameters:
|
||||
- **type** --- node type to be created
|
||||
- **attributes** --- object specifying attributes to set
|
||||
- **contents** --- HTML snippet representing contents of node
|
||||
:Returns: the DOM element created
|
||||
|
||||
.. method:: addElement(parent,type[,attributes[,content]])
|
||||
|
||||
Creates a DOM element and appends it to the `parent` node
|
||||
provided. It is equivalent to
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
parent.appendChild(MathJax.HTML.Element(type,attributes,content))
|
||||
|
||||
:Parameters:
|
||||
- **parent** --- the node where the element will be added
|
||||
- **attributes** --- object specifying attributes to set
|
||||
- **contents** --- HTML snippet representing contents of node
|
||||
:Returns: the DOM element created
|
||||
|
||||
.. method:: TextNode(text)
|
||||
|
||||
Creates a DOM text node with the given text as its content.
|
||||
|
||||
:Parameters:
|
||||
- **text** --- the text for the node
|
||||
:Returns: the new text node
|
||||
|
||||
.. method:: addText(parent,text)
|
||||
|
||||
Creates a DOM text node with the given text and appends it to the
|
||||
`parent` node.
|
||||
|
||||
:Parameters:
|
||||
- **parent** --- the node where the text will be added
|
||||
- **text** --- the text for the new node
|
||||
:Returns: the new text node
|
||||
|
||||
.. describe:: Cookie.Set(name,data)
|
||||
|
||||
Creates a MathJax cookie using the ``MathJax.HTML.Cookie.prefix``
|
||||
and the `name` as the cookie name, and the `key:value` pairs in
|
||||
the `data` object as the data for the cookie. For example,
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
MathJax.HTML.Cookie.Set("test",{x:42, y:"It Works!"});
|
||||
|
||||
will create a cookie named "mjx:test" that stores the values of
|
||||
``x`` and ``y`` provided in the `data` object. This data can be
|
||||
retrieved using the :meth:`MathJax.HTML.Cookie.Get()` method
|
||||
discussed below.
|
||||
|
||||
:Parameters:
|
||||
- **name** --- the name that identifies the coookie
|
||||
- **data** --- object containing the data to store in the cookie
|
||||
:Returns: ``null``
|
||||
|
||||
.. describe:: Cookie.Get(name[,obj])
|
||||
|
||||
Looks up the data for the cookie named `name` and merges the data
|
||||
into the given `obj` object, or returns a new object containing
|
||||
the data. For instance, given the cookie stored by the example
|
||||
above,
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
var data = MathJax.HTML.Cookie.Get("test");
|
||||
|
||||
would set ``data`` to ``{x:42, y:"It Works!"}``, while
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
var data = {x:10, z:"Safe"};
|
||||
MathJax.HTML.Cookie.Get("test",data);
|
||||
|
||||
would leave ``data`` as ``{x:42, y:"It Works!", z:"Safe"}``.
|
||||