Compare commits

..

45 Commits

Author SHA1 Message Date
Corey Donohoe d817a4fdb6 fixup page versioning, fixes #174
Thanks @nealpoole and @arr2036
2012-05-06 13:30:23 -07:00
Corey Donohoe 19635b06cf gemspec updates 2012-05-06 12:08:25 -07:00
Corey Donohoe 872776660b next version will be 2.0 2012-05-06 12:08:12 -07:00
Corey Donohoe 9644d4b00e dupe sanitization attrs initialized by constants, fixes #200 2012-05-06 12:07:41 -07:00
Corey Donohoe 9a1dddaccf whitelist apt uri schemes, fixes #233 2012-05-05 11:56:01 -07:00
Corey Donohoe 4110ab5a82 Merge pull request #308 from bootstraponline/title
Title defined by filename only.
2012-05-04 15:35:32 -07:00
Corey Donohoe 5d1844e491 Merge pull request #313 from kristi/frontend-tweak
Fix searchbar scaling issue
2012-05-04 09:44:23 -07:00
kristi 6a126d46ee Fix searchbar scaling issue 2012-05-04 09:35:27 -07:00
kristi f834a0c84f searchbar fix for ie9 2012-05-04 09:24:20 -07:00
Corey Donohoe 9dfeb237e7 Merge pull request #312 from kristi/frontend-tweak
searchbar fix for ie9
2012-05-04 09:21:45 -07:00
Corey Donohoe b769ba2974 Merge pull request #310 from kristi/frontend-tweak
Frontend tweaks
2012-05-04 08:32:17 -07:00
Corey Donohoe fc1feb280f let's use 0.8.0 if at all 2012-05-04 08:25:01 -07:00
Corey Donohoe bface83af7 Merge pull request #309 from nricciar/master
Gollum using very old version of wikicloth
2012-05-04 08:24:14 -07:00
Vicent Martí 2bea800a37 Proper ordering for markup processing, fixes #135
Code blocks get extracted first.
2012-05-02 18:53:41 -07:00
kristi 4c1ff7deb7 fixup the compare revisions page 2012-05-02 16:55:16 -07:00
kristi 5a7cb129bb Fixup css styling for pages, editor, history 2012-05-02 15:52:15 -07:00
kristi b29d22e99b Make navbar flow nicely for narrow windows 2012-05-02 13:51:26 -07:00
David 12cf102543 removing hardcoded reference to old version of wikicloth 2012-05-02 20:45:46 +00:00
kristi 3d95730880 Fix navbar and searchbar css 2012-05-02 13:00:46 -07:00
bootstraponline c5d807dd58 Fix tests. 2012-05-02 12:13:18 -06:00
bootstraponline d40df79dce Title defined by filename only. 2012-05-02 12:05:57 -06:00
Corey Donohoe 3cfa297b49 hide the page title as before 2012-05-02 19:29:17 +02:00
Corey Donohoe e435769345 remove executable bit 2012-05-02 19:20:57 +02:00
bootstraponline 9a73877b3e Fix search bar and restore title. 2012-05-02 11:03:37 -06:00
Corey Donohoe e2cd8d93f4 Merge pull request #306 from pdeschen/master
README Installation requirements sub section for mathematical equations support
2012-05-01 16:33:51 -07:00
Corey Donohoe afc6ec468f bit of testing info 2012-05-02 01:33:15 +02:00
Corey Donohoe 391838cfc3 no more rbx 2012-05-02 01:25:52 +02:00
Corey Donohoe 36a11ded4f Merge pull request #304 from rwfowler/asciidocLinksWithTravis
Disable internal link processing for asciidoc
2012-05-01 16:10:51 -07:00
Corey Donohoe f540ef2e06 Merge pull request #305 from rwfowler/goForGreen
Fix the test_normalizes_commit_hash on Travis-CI
2012-05-01 16:04:39 -07:00
Corey Donohoe b061e0f859 2.0 is unnecessary 2012-05-02 00:49:44 +02:00
Corey Donohoe 4972fbbc7b this doesn't build on 1.9.x /cc @brianmario 2012-05-02 00:44:17 +02:00
Pascal Deschenes 1f318de812 add missing note about dvips in installation requirements sub section + associated section text 2012-05-01 18:15:01 -04:00
Pascal Deschenes 0ceeadd75b add installation requirements regarding mathematical equations support 2012-05-01 18:10:21 -04:00
Ryan Fowler b9dad32707 Fix the test_normalizes_commit_hash on Travis-CI 2012-05-01 17:02:50 -05:00
Ryan Fowler d1cf698b45 Disable internal link processing for asciidoc
asciidoc's representation of section identifiers interferes with
Gollum's page linking. This disables Gollum's page link tag
extraction for asciidoc files.

Adds "apt-get install -y asciidoc" to .travis.yml so tests pass
on @travis-ci.
2012-05-01 14:23:26 -05:00
Corey Donohoe 9dba3f9c58 Revert "Merge pull request #303 from rwfowler/asciidocLinks"
This reverts commit 8fbbe40300, reversing
changes made to b7fb4c5950.
2012-05-01 19:51:05 +02:00
Corey Donohoe 8fbbe40300 Merge pull request #303 from rwfowler/asciidocLinks
Fix for #52 - Disable internal link processing for asciidoc
2012-05-01 10:42:31 -07:00
Ryan Fowler f73c925ad9 Disable internal link processing for asciidoc
asciidoc's representation of section identifiers interferes with
Gollum's page linking. This disables Gollum's page link tag
extraction for asciidoc files.
2012-05-01 11:43:27 -05:00
Corey Donohoe b7fb4c5950 Merge pull request #302 from kristi/master
fix Rack config.ru documentation
2012-05-01 02:32:07 -07:00
kristi fed49bb98b Fix gollum_path in rack setup documentation 2012-05-01 01:37:17 -07:00
Vicent Martí 6aa4e382b2 Tag 1.4.3 2012-04-25 14:12:54 -07:00
Vicent Martí 8051d4f9b0 Fix the public path 2012-04-25 14:11:02 -07:00
Vicent Martí 31a49601b1 Namespace the public assets 2012-04-25 14:11:02 -07:00
Corey Donohoe 4a50635fe1 docs for releasing the gem 2012-04-25 20:52:40 +02:00
Vicent Martí 9b92e9d325 Add Gollum.assets_path hook 2012-04-25 11:46:28 -07:00
37 changed files with 459 additions and 403 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
rvm:
- 1.8.7
- 1.9.2
- rbx-2.0
notifications:
disabled: true
before_install:
- sudo apt-get install -y asciidoc
+19
View File
@@ -311,6 +311,7 @@ backticks.
## MATHEMATICAL EQUATIONS
Page files may contain mathematic equations in TeX syntax that will be nicely
typeset into the expected output. A block-style equation is delimited by `\[`
and `\]`. For example:
@@ -322,6 +323,13 @@ inline with regular text. For example:
The Pythagorean theorem is \( a^2 + b^2 = c^2 \).
### INSTALLATION REQUIREMENTS
In order to get the mathematical equations rendering to work, you need the following binaries:
* LaText, TeTex or MacTex/BasicTeX (latex, dvips)
* ImageMagick (convert)
* Ghostscript (gs)
## SEQUENCE DIAGRAMS
@@ -454,9 +462,14 @@ like Rack::Auth, OmniAuth, etc.
require 'gollum/frontend/app'
gollum_path = File.expand_path(File.dirname(__FILE__)) # CHANGE THIS TO POINT TO YOUR OWN WIKI REPO
Precious::App.set(:gollum_path, gollum_path)
Precious::App.set(:default_markup, :markdown) # set your favorite markup language
run Precious::App
## Testing
[![Build Status](https://secure.travis-ci.org/github/gollum.png?branch=master)](http://travis-ci.org/github/gollum)
## CONTRIBUTE
If you'd like to hack on Gollum, start by forking my repo on GitHub:
@@ -475,3 +488,9 @@ your changes merged back into core is as follows:
1. If necessary, rebase your commits into logical chunks, without errors
1. Push the branch up to GitHub
1. Send a pull request to the github/gollum project.
## RELEASING
$ rake gemspec
$ gem build gollum.gemspec
$ gem push gollum-X.Y.Z.gem
+22 -22
View File
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
s.rubygems_version = '1.3.5'
s.name = 'gollum'
s.version = '1.4.2'
s.date = '2012-04-25'
s.version = '2.0.0'
s.date = '2012-05-06'
s.rubyforge_project = 'gollum'
s.summary = "A simple, Git-powered wiki."
@@ -37,7 +37,7 @@ Gem::Specification.new do |s|
s.add_development_dependency('org-ruby', '~>0.6.2')
s.add_development_dependency('shoulda')
s.add_development_dependency('rack-test')
s.add_development_dependency('wikicloth', '~> 0.6.3')
s.add_development_dependency('wikicloth', '~>0.8.0')
s.add_development_dependency('rake', '~> 0.9.2')
# = MANIFEST =
@@ -56,25 +56,25 @@ Gem::Specification.new do |s|
lib/gollum/committer.rb
lib/gollum/file.rb
lib/gollum/frontend/app.rb
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/ie7.css
lib/gollum/frontend/public/css/template.css
lib/gollum/frontend/public/images/icon-sprite.png
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/gollum.placeholder.js
lib/gollum/frontend/public/javascript/jquery.color.js
lib/gollum/frontend/public/javascript/jquery.js
lib/gollum/frontend/public/gollum/css/dialog.css
lib/gollum/frontend/public/gollum/css/editor.css
lib/gollum/frontend/public/gollum/css/gollum.css
lib/gollum/frontend/public/gollum/css/ie7.css
lib/gollum/frontend/public/gollum/css/template.css
lib/gollum/frontend/public/gollum/images/icon-sprite.png
lib/gollum/frontend/public/gollum/javascript/editor/gollum.editor.js
lib/gollum/frontend/public/gollum/javascript/editor/langs/asciidoc.js
lib/gollum/frontend/public/gollum/javascript/editor/langs/creole.js
lib/gollum/frontend/public/gollum/javascript/editor/langs/markdown.js
lib/gollum/frontend/public/gollum/javascript/editor/langs/org.js
lib/gollum/frontend/public/gollum/javascript/editor/langs/pod.js
lib/gollum/frontend/public/gollum/javascript/editor/langs/rdoc.js
lib/gollum/frontend/public/gollum/javascript/editor/langs/textile.js
lib/gollum/frontend/public/gollum/javascript/gollum.dialog.js
lib/gollum/frontend/public/gollum/javascript/gollum.js
lib/gollum/frontend/public/gollum/javascript/gollum.placeholder.js
lib/gollum/frontend/public/gollum/javascript/jquery.color.js
lib/gollum/frontend/public/gollum/javascript/jquery.js
lib/gollum/frontend/templates/compare.mustache
lib/gollum/frontend/templates/create.mustache
lib/gollum/frontend/templates/edit.mustache
+5 -1
View File
@@ -21,7 +21,11 @@ require File.expand_path('../gollum/tex', __FILE__)
require File.expand_path('../gollum/web_sequence_diagram', __FILE__)
module Gollum
VERSION = '1.4.2'
VERSION = '2.0.0'
def self.assets_path
::File.expand_path('gollum/frontend/public', ::File.dirname(__FILE__))
end
class Error < StandardError; end
+2 -1
View File
@@ -13,7 +13,7 @@ module Precious
dir = File.dirname(File.expand_path(__FILE__))
# We want to serve public assets for now
set :public_folder, "#{dir}/public"
set :public_folder, "#{dir}/public/gollum"
set :static, true
set :default_markup, :markdown
@@ -47,6 +47,7 @@ module Precious
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
if page = wiki.page(@name)
@page = page
@page.version = wiki.repo.log(wiki.ref, @page.path).first
@content = page.raw_data
mustache :edit
else
@@ -18,7 +18,7 @@
width: 450px;
border: 7px solid #999;
border: 7px solid rgba(0, 0, 0, 0.3);
border: 7px solid rgba(0, 0, 0, 0.3);
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
@@ -28,7 +28,7 @@
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);
}
@@ -71,7 +71,7 @@
padding: 0;
min-width: 80px;
}
#gollum-dialog-dialog-body fieldset .field input[type="text"] {
border: 1px solid #ddd;
display: block;
@@ -82,11 +82,11 @@
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;
}
@@ -30,8 +30,9 @@ a {
-webkit-border-radius: 1em;
}
.ff #gollum-editor,
.ie #gollum-editor {
padding-bottom: 1em;
padding-bottom: 1em;
}
#gollum-editor form fieldset {
@@ -51,9 +52,9 @@ a {
background: #fff;
border: 1px solid #ddd;
color: #000;
font-size: 1.3em;
font-size: 1.1em;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
line-height: 1.8em;
line-height: 1.5em;
margin: 1em 0 0.4em;
padding: 0.5em;
width: 98%;
@@ -119,11 +120,11 @@ a {
/* 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);
@@ -133,7 +134,7 @@ a {
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);
@@ -162,7 +163,7 @@ 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-help span { background-position: -405px 0; }
a#function-bold:hover span { background-position: 0 -28px; }
a#function-italic:hover span { background-position: -27px -28px; }
@@ -177,7 +178,7 @@ 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; }
a#function-help:hover span { background-position: -405px -28px; }
#gollum-editor #gollum-editor-function-bar a.disabled {
@@ -192,60 +193,52 @@ a#function-help:hover span { background-position: -405px -28px; }
#gollum-editor #gollum-editor-function-bar #gollum-editor-format-selector {
overflow: hidden;
padding: 0 0 1.1em 0;
padding: .2em 0 .5em 0;
}
#gollum-editor #gollum-editor-function-bar
#gollum-editor-format-selector select {
#gollum-editor #gollum-editor-function-bar
#gollum-editor-format-selector select {
background-color: #f9f9f9;
border: 1px solid transparent;
border: 1px solid #ddd;
color: #333;
float: right;
font-size: 1.1em;
font-size: 1em;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: bold;
line-height: 1.6em;
padding: 0.5em 0.7em;
margin-bottom: 0;
padding: 0.3em 0.4em;
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;
-webkit-border-radius: 0.5em;
}
#gollum-editor #gollum-editor-function-bar
#gollum-editor-format-selector label {
color: #999;
float: right;
font-size: 1.1em;
font-size: 1em;
font-weight: bold;
line-height: 1.6em;
padding: 0.6em 0.5em 0 0;
padding: .3em 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-size: 1em;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
line-height: 1.8em;
line-height: 1.4em;
margin: 1em 0 0.4em;
padding: 0.5em; /* I don't really like mixing pct & em here… */
width: 98%;
@@ -259,7 +252,7 @@ a#function-help:hover span { background-position: -405px -28px; }
cursor: pointer;
display: block;
float: left;
font-size: 1.2em;
font-size: 1em;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: bold;
margin: 0;
@@ -322,11 +315,11 @@ a#function-help:hover span { background-position: -405px -28px; }
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);
@@ -346,7 +339,7 @@ a#function-help:hover span { background-position: -405px -28px; }
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);
@@ -403,7 +396,7 @@ a#function-help:hover span { background-position: -405px -28px; }
color: #333;
cursor: pointer;
display: block;
font-size: 1.2em;
font-size: 1em;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: bold;
line-height: 1.2em;
@@ -461,16 +454,16 @@ a#function-help:hover span { background-position: -405px -28px; }
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;
@@ -478,7 +471,7 @@ a#function-help:hover span { background-position: -405px -28px; }
margin: 0;
padding: 0;
}
#gollum-editor-help-parent li a,
#gollum-editor-help-list li a {
border: 1px solid transparent;
@@ -490,16 +483,16 @@ a#function-help:hover span { background-position: -405px -28px; }
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;
@@ -507,29 +500,29 @@ a#function-help:hover span { background-position: -405px -28px; }
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;
@@ -37,19 +37,19 @@ a:hover, a:visited {
/* @section head */
#head {
border-bottom: 1px solid #ddd;
margin: 4.5em 0 0.5em;
padding: 0.5em 0;
overflow: hidden;
}
#head h1 {
display: none;
display: none;
}
#head ul.actions {
float: right;
}
/* @section content */
#wiki-content {
height: 1%;
@@ -77,7 +77,7 @@ a:hover, a:visited {
.has-rightbar #wiki-body {
width: 68%;
}
/* @section rightbar */
#wiki-rightbar {
background-color: #f7f7f7;
@@ -86,12 +86,12 @@ a:hover, a:visited {
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;
}
@@ -107,13 +107,13 @@ a:hover, a:visited {
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;
@@ -121,12 +121,12 @@ a:hover, a:visited {
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;
@@ -134,23 +134,24 @@ a:hover, a:visited {
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;
@@ -158,12 +159,12 @@ a:hover, a:visited {
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;
@@ -171,18 +172,18 @@ a:hover, a:visited {
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;
@@ -191,33 +192,34 @@ a:hover, a:visited {
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 #ddd;
margin: 1em 0 7em;
}
#footer p#last-edit {
font-size: .9em;
line-height: 1.6em;
color: #999;
margin: 0.9em 0;
}
#footer p#last-edit span.username {
font-weight: bold;
}
@@ -235,84 +237,86 @@ a:hover, a:visited {
}
#wiki-history {
margin-top: 3em;
margin-top: 2em;
}
#wiki-history fieldset {
border: 0;
margin: 2em 0;
margin: 1em 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;
font-size: 1em;
line-height: 1.6em;
margin: 0;
padding: 0.3em 0.7em;
}
#wiki-history table tr td.checkbox {
min-width: 2em;
width: 4em;
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;
margin: 0 auto;
width: 1.2em;
height: 1.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;
@@ -324,13 +328,17 @@ a:hover, a:visited {
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 #footer {
margin-bottom: 7em;
}
.history #wiki-history ul.actions li,
.history #footer ul.actions li {
margin: 0 0.6em 0 0;
@@ -359,25 +367,25 @@ a:hover, a:visited {
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;
}
@@ -387,11 +395,11 @@ a:hover, a:visited {
line-height: 1.6em;
margin-top: 2em;
}
.results #footer ul.actions li {
margin: 0 1em 0 0;
}
/* @section compare */
.compare h1 {
@@ -403,38 +411,46 @@ a:hover, a:visited {
color: #000;
font-weight: bold;
}
.compare #compare-content {
margin-top: 3em;
}
.compare .data {
border: 1px solid #ddd;
margin-top: 1em;
margin: 1em 0 2em;
overflow: auto;
}
.compare .data table {
width: 100%;
}
.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;
line-height: 1.2em;
margin: 0;
padding: 0;
}
.compare .data tr td + td + td {
width: 100%;
}
.compare .data td.line_numbers {
background: #f7f7f7;
border-right: 1px solid #999;
color: #999;
color: #999;
padding: 0 0 0 0.5em;
}
@@ -443,32 +459,36 @@ a:hover, a:visited {
margin-left: 0;
margin-right: 0.6em;
}
.compare #footer {
margin-bottom: 7em;
}
/* @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 .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 }
.highlight .go { color: #888888 }
.highlight .gp { color: #555555 }
.highlight .gs { font-weight: bold }
.highlight .gu { color: #aaaaaa }
.highlight .gt { color: #aa0000 }
/* @control minibutton */
@@ -481,8 +501,9 @@ ul.actions {
ul.actions li {
float: left;
font-size: 1.2em;
font-size: 0.9em;
margin-left: 0.6em;
margin-bottom: 0.6em;
}
.minibutton a {
@@ -562,7 +583,7 @@ ul.actions {
margin: -10% 0 0 -35%;
position: absolute;
width: 70%;
border-radius: 0.5em;
-moz-border-radius: 0.5em;
-webkit-border-radius: 0.5em;
@@ -586,7 +607,6 @@ ul.actions {
/* @control searchbar */
#head #searchbar {
float: right;
margin: 1em 0 0 0;
padding: 0;
overflow: hidden;
}
@@ -595,7 +615,8 @@ ul.actions {
background: #fff;
border: 1px solid #d4d4d4;
overflow: hidden;
height: 2.2em;
border-radius: 0.3em;
-moz-border-radius: 0.3em;
-webkit-border-radius: 0.3em;
@@ -606,24 +627,21 @@ ul.actions {
color: #000;
float: left;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 1.2em;
height: 1.8em;
font-size: 1em;
height: inherit;
padding: 0 .5em;
-webkit-focus-ring: none;
}
.ff #head #searchbar #searchbar-fauxtext input#search-query {
padding: 0.2em 0 0.2em 0.5em;
.ie8 #head #searchbar #searchbar-fauxtext input#search-query {
padding: 0.5em 0 0 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;
@@ -631,19 +649,19 @@ ul.actions {
margin: 0 !important;
padding: 0;
float: right;
font-size: 1.2em;
height: inherit;
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;
height: inherit;
overflow: hidden;
text-indent: -5000px;
width: 28px;
@@ -10,7 +10,7 @@
html, body {
color: black;
color: #333;
}
body {
@@ -24,7 +24,7 @@ img {
#template {
font-size: 14px;
line-height: 1.4;
line-height: 1.6;
margin-bottom: 40px;
}
@@ -35,34 +35,34 @@ a.absent {
/* Primary Body Copy */
#template p {
margin: 1em 0;
margin: 1.4em 0;
padding: 0;
}
/* ReST first graf in nested list */
#template * li p.first {
display: inline-block;
}
/* Headings */
#template h1, #template h2, #template h3,
#template h1, #template h2, #template h3,
#template h4, #template h5, #template h6 {
margin: 0;
padding: 0;
}
#template h1 {
border-bottom: 1px solid #ccc;
font-size: 33px; /* was 32, GH is 33px */
font-size: 28px;
line-height: normal;
padding: .08em 0 0 0;
margin: 0;
padding: 10px 0 0 0;
margin: 30px 0 10px;
}
#template h2 {
border-bottom: 1px solid #ddd;
font-size: 22px;
line-height: normal;
margin: 22px 0 0;
line-height: 1.6;
margin: 22px 0 10px;
padding: 7px 0 0;
}
@@ -91,7 +91,7 @@ a.absent {
#template h6 {
color: #666;
font-size: 14px;
font-size: 14px;
line-height: 26px;
margin-bottom: -19px;
padding: 18px 0 0;
@@ -107,32 +107,32 @@ a.absent {
padding: 0;
}
/* Border Reset for headers with horizontal rules */
#template > h2:first-child,
/* Border Reset for headers with horizontal rules */
#template > h2:first-child,
#template > h1:first-child {
margin: 12px 0 0;
padding: 10px 0 0;
margin: 12px 0 10px;
padding: 10px 0 10px;
}
/* Lists, Blockquotes & Such */
#template ul,
#template ul,
#template ol {
margin-top: 1.5em;
margin-left: 2.6em;
margin: 15px 0;
padding-left: 30px;
}
/* Nested Lists */
#template ul li,
#template ol li,
#template ul li ul,
#template ul li,
#template ol li,
#template ul li ul,
#template ol li ol,
#template ul li ol,
#template ol li ul,
#template ul ul,
#template ul ul,
#template ol ol {
padding: 0;
margin: .5em 0;
margin: 15px 0;
}
#template dl {
@@ -181,7 +181,7 @@ a.absent {
border: 1px solid #ccc;
text-align: left;
margin: 0;
padding: 6px 13px;
padding: 6px 13px;
}
/* Images & Stuff */
@@ -267,7 +267,7 @@ a.absent {
}
#template span.float-right {
display: block;
display: block;
margin-left: 13px;
overflow: hidden;
float: right;
@@ -286,7 +286,7 @@ a.absent {
background-color: #f8f8f8;
border: 1px solid #dedede;
font-size: 13px;
padding: 0;
padding: 1px 5px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
@@ -313,10 +313,11 @@ pre, code {
#template pre code, #template pre tt {
background-color: transparent;
border: none;
padding: 0;
}
/*
Highlight rules from pull req 191
Highlight rules from pull req 191
https://github.com/eboto/gollum/commit/5df09477abf4a04c82c7fcaa2bd7ee2a85e7ec82
*/
#template .highlight { background:#fff; }

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

@@ -1,24 +1,24 @@
(function($) {
var Placeholder = {
_PLACEHOLDERS : [],
_p : function( $field ) {
this.fieldObject = $field;
this.fieldObject = $field;
this.placeholderText = $field.val();
var placeholderText = $field.val();
$field.addClass('ph');
$field.blur(function() {
if ( $(this).val() == '' ) {
$(this).val( placeholderText );
$(this).addClass('ph');
}
});
$field.focus(function() {
$(this).removeClass('ph');
if ( $(this).val() == placeholderText ) {
@@ -27,28 +27,28 @@
$(this)[0].select();
}
});
},
add : function( $field ) {
Placeholder._PLACEHOLDERS.push( new Placeholder._p( $field ) );
},
clearAll: function() {
for ( var i=0; i < Placeholder._PLACEHOLDERS.length; i++ ) {
if ( Placeholder._PLACEHOLDERS[i].fieldObject.val() ==
if ( Placeholder._PLACEHOLDERS[i].fieldObject.val() ==
Placeholder._PLACEHOLDERS[i].placeholderText ) {
Placeholder._PLACEHOLDERS[i].fieldObject.val('');
}
}
},
exists : function() {
return ( _PLACEHOLDERS.length );
}
};
$.GollumPlaceholder = Placeholder;
})(jQuery);
@@ -53,7 +53,7 @@
// Otherwise, we're most likely dealing with a named color
return colors[jQuery.trim(color).toLowerCase()];
}
function getColor(elem, attr) {
var color;
@@ -62,14 +62,14 @@
// Keep going until we find an element that has color, or we hit the body
if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") )
break;
break;
attr = "backgroundColor";
} while ( elem = elem.parentNode );
return getRGB(color);
};
// Some named colors to work with
// From Interface by Stefan Petre
// http://interface.eyecon.ro/
@@ -119,5 +119,5 @@
white:[255,255,255],
yellow:[255,255,0]
};
})(jQuery);
@@ -75,10 +75,10 @@ var jQuery = function( selector, context ) {
// For matching the engine and version of the browser
browserMatch,
// Has the ready events already been bound?
readyBound = false,
// The functions to execute on DOM ready
readyList = [],
@@ -92,7 +92,7 @@ var jQuery = function( selector, context ) {
slice = Array.prototype.slice,
trim = String.prototype.trim,
indexOf = Array.prototype.indexOf,
// [[Class]] -> type pairs
class2type = {};
@@ -111,7 +111,7 @@ jQuery.fn = jQuery.prototype = {
this.length = 1;
return this;
}
// The body element only exists once, optimize finding it
if ( selector === "body" && !context && document.body ) {
this.context = document;
@@ -150,9 +150,9 @@ jQuery.fn = jQuery.prototype = {
ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
}
return jQuery.merge( this, selector );
// HANDLE: $("#id")
} else {
elem = document.getElementById( match[2] );
@@ -245,7 +245,7 @@ jQuery.fn = jQuery.prototype = {
if ( jQuery.isArray( elems ) ) {
push.apply( ret, elems );
} else {
jQuery.merge( ret, elems );
}
@@ -271,7 +271,7 @@ jQuery.fn = jQuery.prototype = {
each: function( callback, args ) {
return jQuery.each( this, callback, args );
},
ready: function( fn ) {
// Attach the listeners
jQuery.bindReady();
@@ -289,7 +289,7 @@ jQuery.fn = jQuery.prototype = {
return this;
},
eq: function( i ) {
return i === -1 ?
this.slice( i ) :
@@ -314,7 +314,7 @@ jQuery.fn = jQuery.prototype = {
return callback.call( elem, i, elem );
}));
},
end: function() {
return this.prevObject || jQuery(null);
},
@@ -403,14 +403,14 @@ jQuery.extend({
return jQuery;
},
// Is the DOM ready to be used? Set to true once it occurs.
isReady: false,
// A counter to track how many items to wait for before
// the ready event fires. See #6781
readyWait: 1,
// Handle when the DOM is ready
ready: function( wait ) {
// A third-party is pushing the ready event forwards
@@ -454,7 +454,7 @@ jQuery.extend({
}
}
},
bindReady: function() {
if ( readyBound ) {
return;
@@ -473,7 +473,7 @@ jQuery.extend({
if ( document.addEventListener ) {
// Use the handy event callback
document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
// A fallback to window.onload, that will always work
window.addEventListener( "load", jQuery.ready, false );
@@ -482,7 +482,7 @@ jQuery.extend({
// ensure firing before onload,
// maybe late but safe also for iframes
document.attachEvent("onreadystatechange", DOMContentLoaded);
// A fallback to window.onload, that will always work
window.attachEvent( "onload", jQuery.ready );
@@ -533,20 +533,20 @@ jQuery.extend({
if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
return false;
}
// Not own constructor property must be Object
if ( obj.constructor &&
!hasOwn.call(obj, "constructor") &&
!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
return false;
}
// Own properties are enumerated firstly, so to speed up,
// if last one is own, then all properties are own.
var key;
for ( key in obj ) {}
return key === undefined || hasOwn.call( obj, key );
},
@@ -556,11 +556,11 @@ jQuery.extend({
}
return true;
},
error: function( msg ) {
throw msg;
},
parseJSON: function( data ) {
if ( typeof data !== "string" || !data ) {
return null;
@@ -568,7 +568,7 @@ jQuery.extend({
// Make sure leading/trailing whitespace is removed (IE can't handle it)
data = jQuery.trim( data );
// Make sure the incoming data is actual JSON
// Logic borrowed from http://json.org/json2.js
if ( rvalidchars.test(data.replace(rvalidescape, "@")
@@ -710,7 +710,7 @@ jQuery.extend({
for ( var l = second.length; j < l; j++ ) {
first[ i++ ] = second[ j ];
}
} else {
while ( second[j] !== undefined ) {
first[ i++ ] = second[ j++ ];
@@ -790,7 +790,7 @@ jQuery.extend({
// The value/s can be optionally by executed if its a function
access: function( elems, key, value, exec, fn, pass ) {
var length = elems.length;
// Setting many attributes
if ( typeof key === "object" ) {
for ( var k in key ) {
@@ -798,19 +798,19 @@ jQuery.extend({
}
return elems;
}
// Setting one attribute
if ( value !== undefined ) {
// Optionally, function values get executed if exec is true
exec = !pass && exec && jQuery.isFunction(value);
for ( var i = 0; i < length; i++ ) {
fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
}
return elems;
}
// Getting an attribute
return length ? fn( elems[0], key ) : undefined;
},
@@ -1115,7 +1115,7 @@ jQuery.extend({
// Please use with caution
uuid: 0,
// Unique for each copy of jQuery on the page
// Unique for each copy of jQuery on the page
expando: "jQuery" + jQuery.now(),
// The following elements throw uncatchable exceptions if you
@@ -1607,7 +1607,7 @@ jQuery.fn.extend({
var option = options[ i ];
// Don't return options that are disabled or in a disabled optgroup
if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
// Get the specific value for the option
@@ -1630,7 +1630,7 @@ jQuery.fn.extend({
if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) {
return elem.getAttribute("value") === null ? "on" : elem.value;
}
// Everything else, we just grab the value
return (elem.value || "").replace(rreturn, "");
@@ -1696,7 +1696,7 @@ jQuery.extend({
height: true,
offset: true
},
attr: function( elem, name, value, pass ) {
// don't set attributes on text and comment nodes
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
@@ -1865,7 +1865,7 @@ jQuery.event = {
var eventKey = elem.nodeType ? "events" : "__events__",
events = elemData[ eventKey ],
eventHandle = elemData.handle;
if ( typeof events === "function" ) {
// On plain objects events is a fn that holds the the data
// which prevents this data from being JSON serialized
@@ -1945,9 +1945,9 @@ jQuery.event = {
}
}
}
if ( special.add ) {
special.add.call( elem, handleObj );
if ( special.add ) {
special.add.call( elem, handleObj );
if ( !handleObj.handler.guid ) {
handleObj.handler.guid = handler.guid;
@@ -1986,7 +1986,7 @@ jQuery.event = {
if ( !elemData || !events ) {
return;
}
if ( typeof events === "function" ) {
elemData = events;
events = events.events;
@@ -2024,7 +2024,7 @@ jQuery.event = {
namespaces = type.split(".");
type = namespaces.shift();
namespace = new RegExp("(^|\\.)" +
namespace = new RegExp("(^|\\.)" +
jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
}
@@ -2186,7 +2186,7 @@ jQuery.event = {
isClick = jQuery.nodeName( target, "a" ) && targetType === "click",
special = jQuery.event.special[ targetType ] || {};
if ( (!special._default || special._default.call( elem, event ) === false) &&
if ( (!special._default || special._default.call( elem, event ) === false) &&
!isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {
try {
@@ -2256,7 +2256,7 @@ jQuery.event = {
event.handler = handleObj.handler;
event.data = handleObj.data;
event.handleObj = handleObj;
var ret = handleObj.handler.apply( this, args );
if ( ret !== undefined ) {
@@ -2355,7 +2355,7 @@ jQuery.event = {
add: function( handleObj ) {
jQuery.event.add( this,
liveConvert( handleObj.origType, handleObj.selector ),
jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
},
remove: function( handleObj ) {
@@ -2385,7 +2385,7 @@ jQuery.removeEvent = document.removeEventListener ?
if ( elem.removeEventListener ) {
elem.removeEventListener( type, handle, false );
}
} :
} :
function( elem, type, handle ) {
if ( elem.detachEvent ) {
elem.detachEvent( "on" + type, handle );
@@ -2432,7 +2432,7 @@ jQuery.Event.prototype = {
if ( !e ) {
return;
}
// if preventDefault exists run it on the original event
if ( e.preventDefault ) {
e.preventDefault();
@@ -2528,7 +2528,7 @@ if ( !jQuery.support.submitBubbles ) {
return trigger( "submit", this, arguments );
}
});
jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
var elem = e.target,
type = elem.type;
@@ -2590,7 +2590,7 @@ if ( !jQuery.support.changeBubbles ) {
if ( e.type !== "focusout" || elem.type !== "radio" ) {
jQuery.data( elem, "_change_data", val );
}
if ( data === undefined || val === data ) {
return;
}
@@ -2604,7 +2604,7 @@ if ( !jQuery.support.changeBubbles ) {
jQuery.event.special.change = {
filters: {
focusout: testChange,
focusout: testChange,
beforedeactivate: testChange,
@@ -2675,15 +2675,15 @@ if ( document.addEventListener ) {
if ( focusCounts[fix]++ === 0 ) {
document.addEventListener( orig, handler, true );
}
},
teardown: function() {
},
teardown: function() {
if ( --focusCounts[fix] === 0 ) {
document.removeEventListener( orig, handler, true );
}
}
};
function handler( e ) {
function handler( e ) {
e = jQuery.event.fix( e );
e.type = fix;
return jQuery.event.trigger( e, null, e.target );
@@ -2700,7 +2700,7 @@ jQuery.each(["bind", "one"], function( i, name ) {
}
return this;
}
if ( jQuery.isFunction( data ) || data === false ) {
fn = data;
data = undefined;
@@ -2740,20 +2740,20 @@ jQuery.fn.extend({
return this;
},
delegate: function( selector, types, data, fn ) {
return this.live( types, data, fn, selector );
},
undelegate: function( selector, types, fn ) {
if ( arguments.length === 0 ) {
return this.unbind( "live" );
} else {
return this.die( types, null, fn, selector );
}
},
trigger: function( type, data ) {
return this.each(function() {
jQuery.event.trigger( type, data, this );
@@ -2810,12 +2810,12 @@ jQuery.each(["live", "die"], function( i, name ) {
var type, i = 0, match, namespaces, preType,
selector = origSelector || this.selector,
context = origSelector ? this : jQuery( this.context );
if ( typeof types === "object" && !types.preventDefault ) {
for ( var key in types ) {
context[ name ]( key, data, types[key], selector );
}
return this;
}
@@ -2862,7 +2862,7 @@ jQuery.each(["live", "die"], function( i, name ) {
context.unbind( "live." + liveConvert( type, selector ), fn );
}
}
return this;
};
});
@@ -2881,7 +2881,7 @@ function liveHandler( event ) {
if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) {
return;
}
if ( event.namespace ) {
namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
}
@@ -3029,7 +3029,7 @@ var Sizzle = function( selector, context, results, seed ) {
if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
return [];
}
if ( !selector || typeof selector !== "string" ) {
return results;
}
@@ -3039,7 +3039,7 @@ var Sizzle = function( selector, context, results, seed ) {
contextXML = Sizzle.isXML( context ),
parts = [],
soFar = selector;
// Reset the position of the chunker regexp (start from head)
do {
chunker.exec( "" );
@@ -3047,9 +3047,9 @@ var Sizzle = function( selector, context, results, seed ) {
if ( m ) {
soFar = m[3];
parts.push( m[1] );
if ( m[2] ) {
extra = m[3];
break;
@@ -3073,7 +3073,7 @@ var Sizzle = function( selector, context, results, seed ) {
if ( Expr.relative[ selector ] ) {
selector += parts.shift();
}
set = posProcess( selector, set );
}
}
@@ -3202,7 +3202,7 @@ Sizzle.find = function( expr, context, isXML ) {
for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
var match,
type = Expr.order[i];
if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
var left = match[1];
match.splice( 1, 1 );
@@ -3518,7 +3518,7 @@ var Expr = Sizzle.selectors = {
ATTR: function( match, curLoop, inplace, result, not, isXML ) {
var name = match[1].replace(/\\/g, "");
if ( !isXML && Expr.attrMap[name] ) {
match[1] = Expr.attrMap[name];
}
@@ -3549,7 +3549,7 @@ var Expr = Sizzle.selectors = {
} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
return true;
}
return match;
},
@@ -3559,7 +3559,7 @@ var Expr = Sizzle.selectors = {
return match;
}
},
filters: {
enabled: function( elem ) {
return elem.disabled === false && elem.type !== "hidden";
@@ -3572,12 +3572,12 @@ var Expr = Sizzle.selectors = {
checked: function( elem ) {
return elem.checked === true;
},
selected: function( elem ) {
// Accessing this property makes selected-by-default
// options in Safari work properly
elem.parentNode.selectedIndex;
return elem.selected === true;
},
@@ -3703,21 +3703,21 @@ var Expr = Sizzle.selectors = {
case "only":
case "first":
while ( (node = node.previousSibling) ) {
if ( node.nodeType === 1 ) {
return false;
if ( node.nodeType === 1 ) {
return false;
}
}
if ( type === "first" ) {
return true;
if ( type === "first" ) {
return true;
}
node = elem;
case "last":
while ( (node = node.nextSibling) ) {
if ( node.nodeType === 1 ) {
return false;
if ( node.nodeType === 1 ) {
return false;
}
}
@@ -3730,22 +3730,22 @@ var Expr = Sizzle.selectors = {
if ( first === 1 && last === 0 ) {
return true;
}
var doneName = match[0],
parent = elem.parentNode;
if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
var count = 0;
for ( node = parent.firstChild; node; node = node.nextSibling ) {
if ( node.nodeType === 1 ) {
node.nodeIndex = ++count;
}
}
}
parent.sizcache = doneName;
}
var diff = elem.nodeIndex - last;
if ( first === 0 ) {
@@ -3764,7 +3764,7 @@ var Expr = Sizzle.selectors = {
TAG: function( elem, match ) {
return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
},
CLASS: function( elem, match ) {
return (" " + (elem.className || elem.getAttribute("class")) + " ")
.indexOf( match ) > -1;
@@ -3830,7 +3830,7 @@ var makeArray = function( array, results ) {
results.push.apply( results, array );
return results;
}
return array;
};
@@ -4077,7 +4077,7 @@ if ( document.querySelectorAll ) {
if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
return;
}
Sizzle = function( query, context, extra, seed ) {
context = context || document;
@@ -4115,7 +4115,7 @@ if ( document.querySelectorAll ) {
}
}
}
return oldSizzle(query, context, extra, seed);
};
@@ -4137,7 +4137,7 @@ if ( document.querySelectorAll ) {
// This should fail with an exception
// Gecko does not error, returns false instead
matches.call( document.documentElement, "[test!='']:sizzle" );
} catch( pseudoError ) {
pseudoWorks = true;
}
@@ -4148,7 +4148,7 @@ if ( document.querySelectorAll ) {
expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
if ( !Sizzle.isXML( node ) ) {
try {
try {
if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
return matches.call( node, expr );
}
@@ -4177,7 +4177,7 @@ if ( document.querySelectorAll ) {
if ( div.getElementsByClassName("e").length === 1 ) {
return;
}
Expr.order.splice(1, 0, "CLASS");
Expr.find.CLASS = function( match, context, isXML ) {
if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
@@ -4228,7 +4228,7 @@ function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
if ( elem ) {
var match = false;
elem = elem[dir];
while ( elem ) {
@@ -4281,7 +4281,7 @@ if ( document.documentElement.contains ) {
Sizzle.isXML = function( elem ) {
// documentElement is verified for cases where it doesn't yet exist
// (such as loading iframes in IE - #4833)
// (such as loading iframes in IE - #4833)
var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
return documentElement ? documentElement.nodeName !== "HTML" : false;
@@ -4373,7 +4373,7 @@ jQuery.fn.extend({
filter: function( selector ) {
return this.pushStack( winnow(this, selector, true), "filter", selector );
},
is: function( selector ) {
return !!selector && jQuery.filter( selector, this ).length > 0;
},
@@ -4391,7 +4391,7 @@ jQuery.fn.extend({
selector = selectors[i];
if ( !matches[selector] ) {
matches[selector] = jQuery.expr.match.POS.test( selector ) ?
matches[selector] = jQuery.expr.match.POS.test( selector ) ?
jQuery( selector, context || this.context ) :
selector;
}
@@ -4414,7 +4414,7 @@ jQuery.fn.extend({
return ret;
}
var pos = POS.test( selectors ) ?
var pos = POS.test( selectors ) ?
jQuery( selectors, context || this.context ) : null;
for ( i = 0, l = this.length; i < l; i++ ) {
@@ -4435,10 +4435,10 @@ jQuery.fn.extend({
}
ret = ret.length > 1 ? jQuery.unique(ret) : ret;
return this.pushStack( ret, "closest", selectors );
},
// Determine the position of an element within
// the matched set of elements
index: function( elem ) {
@@ -4519,7 +4519,7 @@ jQuery.each({
}, function( name, fn ) {
jQuery.fn[ name ] = function( until, selector ) {
var ret = jQuery.map( this, fn, until );
if ( !runtil.test( name ) ) {
selector = until;
}
@@ -4548,7 +4548,7 @@ jQuery.extend({
jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
jQuery.find.matches(expr, elems);
},
dir: function( elem, dir, until ) {
var matched = [],
cur = elem[ dir ];
@@ -4770,7 +4770,7 @@ jQuery.fn.extend({
return set;
}
},
// keepData is for internal use only--do not document
remove: function( selector, keepData ) {
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
@@ -4785,7 +4785,7 @@ jQuery.fn.extend({
}
}
}
return this;
},
@@ -4801,7 +4801,7 @@ jQuery.fn.extend({
elem.removeChild( elem.firstChild );
}
}
return this;
},
@@ -4952,9 +4952,9 @@ jQuery.fn.extend({
} else {
results = jQuery.buildFragment( args, this, scripts );
}
fragment = results.fragment;
if ( fragment.childNodes.length === 1 ) {
first = fragment = fragment.firstChild;
} else {
@@ -5062,18 +5062,18 @@ jQuery.each({
var ret = [],
insert = jQuery( selector ),
parent = this.length === 1 && this[0].parentNode;
if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
insert[ original ]( this[0] );
return this;
} else {
for ( var i = 0, l = insert.length; i < l; i++ ) {
var elems = (i > 0 ? this.clone(true) : this).get();
jQuery( insert[i] )[ original ]( elems );
ret = ret.concat( elems );
}
return this.pushStack( ret, name, insert.selector );
}
};
@@ -5161,7 +5161,7 @@ jQuery.extend({
for ( i = 0; ret[i]; i++ ) {
if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
} else {
if ( ret[i].nodeType === 1 ) {
ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
@@ -5173,22 +5173,22 @@ jQuery.extend({
return ret;
},
cleanData: function( elems ) {
var data, id, cache = jQuery.cache,
special = jQuery.event.special,
deleteExpando = jQuery.support.deleteExpando;
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
continue;
}
id = elem[ jQuery.expando ];
if ( id ) {
data = cache[ id ];
if ( data && data.events ) {
for ( var type in data.events ) {
if ( special[ type ] ) {
@@ -5199,14 +5199,14 @@ jQuery.extend({
}
}
}
if ( deleteExpando ) {
delete elem[ jQuery.expando ];
} else if ( elem.removeAttribute ) {
elem.removeAttribute( jQuery.expando );
}
delete cache[ id ];
}
}
@@ -5819,7 +5819,7 @@ jQuery.extend({
data = tmp;
jQuery.handleSuccess( s, xhr, status, data );
jQuery.handleComplete( s, xhr, status, data );
if ( head ) {
head.removeChild( script );
}
@@ -6078,19 +6078,19 @@ jQuery.extend({
value = jQuery.isFunction(value) ? value() : value;
s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
};
// Set traditional to true for jQuery <= 1.3.2 behavior.
if ( traditional === undefined ) {
traditional = jQuery.ajaxSettings.traditional;
}
// If an array was passed in, assume that it is an array of form elements.
if ( jQuery.isArray(a) || a.jquery ) {
// Serialize the form elements
jQuery.each( a, function() {
add( this.name, this.value );
});
} else {
// If traditional, encode the "old" way (the way 1.3.2 or older
// did it), otherwise encode params recursively.
@@ -6123,7 +6123,7 @@ function buildParams( prefix, obj, traditional, add ) {
buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
}
});
} else if ( !traditional && obj != null && typeof obj === "object" ) {
if ( jQuery.isEmptyObject( obj ) ) {
add( prefix, "" );
@@ -6134,7 +6134,7 @@ function buildParams( prefix, obj, traditional, add ) {
buildParams( prefix + "[" + k + "]", v, traditional, add );
});
}
} else {
// Serialize scalar item.
add( prefix, obj );
@@ -6192,7 +6192,7 @@ jQuery.extend({
jQuery.event.trigger( "ajaxStop" );
}
},
triggerGlobal: function( s, type, args ) {
(s.context && s.context.url == null ? jQuery(s.context) : jQuery.event).trigger(type, args);
},
@@ -6815,7 +6815,7 @@ if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.fn.offset = function( options ) {
var elem = this[0], box;
if ( options ) {
if ( options ) {
return this.each(function( i ) {
jQuery.offset.setOffset( this, options, i );
});
@@ -6857,7 +6857,7 @@ if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.fn.offset = function( options ) {
var elem = this[0];
if ( options ) {
if ( options ) {
return this.each(function( i ) {
jQuery.offset.setOffset( this, options, i );
});
@@ -6976,7 +6976,7 @@ jQuery.offset = {
return { top: top, left: left };
},
setOffset: function( elem, options, i ) {
var position = jQuery.css( elem, "position" );
@@ -7010,7 +7010,7 @@ jQuery.offset = {
if (options.left != null) {
props.left = (options.left - curOffset.left) + curLeft;
}
if ( "using" in options ) {
options.using.call( elem, props );
} else {
@@ -7070,7 +7070,7 @@ jQuery.each( ["Left", "Top"], function( i, name ) {
jQuery.fn[ method ] = function(val) {
var elem = this[0], win;
if ( !elem ) {
return null;
}
@@ -7138,7 +7138,7 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
if ( !elem ) {
return size == null ? null : this;
}
if ( jQuery.isFunction( size ) ) {
return this.each(function( i ) {
var self = jQuery( this );
+13 -3
View File
@@ -3,10 +3,16 @@
<h1>History for <strong>{{path}}</strong></h1>
<ul class="actions">
<li class="minibutton">
{{>searchbar}}
</li>
<li class="minibutton"><a href="/{{escaped_name}}"
class="action-view-page">View Page</a></li>
<li class="minibutton"><a href="/edit/{{escaped_name}}"
class="action-edit-page">Edit Page</a></li>
<li class="minibutton"><a href="/history/{{escaped_name}}"
class="action-page-history">Back to Page History</a></li>
class="action-page-history">Page History</a></li>
</ul>
{{>searchbar}}
</div>
{{#message}}
@@ -17,6 +23,8 @@
{{#show_revert}}
<ul class="actions">
<li class="minibutton"><a href="/history/{{escaped_name}}"
class="action-page-history">Back to Page History</a></li>
<li class="minibutton">
<form name="gollum-revert" action="/revert/{{escaped_name}}/{{before}}/{{after}}" method="post" id="gollum-revert-form">
<a href="#" class="gollum-revert-button">Revert Changes</a>
@@ -41,6 +49,8 @@
</div>
<div id="footer">
<ul class="actions">
<li class="minibutton"><a href="/history/{{escaped_name}}"
class="action-page-history">Back to Page History</a></li>
{{#show_revert}}
<li class="minibutton">
<a href="#" class="gollum-revert-button">Revert Changes</a>
@@ -50,4 +60,4 @@
</ul>
</div>
</div>
</div>
</div>
View File
+4 -2
View File
@@ -2,12 +2,14 @@
<div id="head">
<h1>History for <strong>{{title}}</strong></h1>
<ul class="actions">
<li class="minibutton">
{{>searchbar}}
</li>
<li class="minibutton"><a href="/{{escaped_name}}"
class="action-view-page">View Page</a></li>
<li class="minibutton"><a href="/edit/{{escaped_name}}"
class="action-edit-page">Edit Page</a></li>
</ul>
{{>searchbar}}
</div>
<div id="wiki-history">
@@ -57,4 +59,4 @@
class="action-back-to-top">Back to Top</a></li>
</ul>
</div>
</div>
</div>
View File
+3 -1
View File
@@ -2,6 +2,9 @@
<div id="head">
<h1>{{title}}</h1>
<ul class="actions">
<li class="minibutton">
{{>searchbar}}
</li>
<li class="minibutton"><a href="/pages"
class="action-all-pages">All Pages</a></li>
<li class="minibutton" class="jaws">
@@ -13,7 +16,6 @@
<li class="minibutton"><a href="/history/{{escaped_name}}"
class="action-page-history">Page History</a></li>
</ul>
{{>searchbar}}
</div>
<div id="wiki-content">
<div class="wrap {{#has_footer}} has-footer {{/has_footer}} {{#has_sidebar}} has-rightbar{{/has_sidebar}}">
+3 -1
View File
@@ -2,10 +2,12 @@
<div id="head">
<h1>{{title}}</h1>
<ul class="actions">
<li class="minibutton">
{{>searchbar}}
</li>
<li class="minibutton"><a href="/"
class="action-edit-page">Home</a></li>
</ul>
{{>searchbar}}
</div>
<div id="results">
@@ -2,10 +2,12 @@
<div id="head">
<h1>Search Results for <strong>{{query}}</strong></h1>
<ul class="actions">
<li class="minibutton">
{{>searchbar}}
</li>
<li class="minibutton"><a href="/"
class="action-edit-page">Home</a></li>
</ul>
{{>searchbar}}
</div>
<div id="results">
+5 -1
View File
@@ -38,8 +38,9 @@ module Gollum
@wiki.history_sanitizer :
@wiki.sanitizer
data = extract_tex(@data.dup)
data = @data.dup
data = extract_code(data)
data = extract_tex(data)
data = extract_wsd(data)
data = extract_tags(data)
begin
@@ -116,6 +117,9 @@ module Gollum
#
# Returns the placeholder'd String data.
def extract_tags(data)
if @format == :asciidoc
return data
end
data.gsub!(/(.?)\[\[(.+?)\]\]([^\[]?)/m) do
if $1 == "'" && $3 != "'"
"[[#{$2}]]#{$3}"
+2 -24
View File
@@ -124,35 +124,13 @@ module Gollum
self.class.canonicalize_filename(filename)
end
# Public: If the first element of a formatted page is an <h1> tag it can
# be considered the title of the page and used in the display. If the
# first element is NOT an <h1> tag, the title will be constructed from the
# Public: The title will be constructed from the
# filename by stripping the extension and replacing any dashes with
# spaces.
#
# Returns the fully sanitized String title.
def title
doc = Nokogiri::HTML(%{<div id="gollum-root">} + self.formatted_data + %{</div>})
header =
case self.format
when :asciidoc
doc.css("div#gollum-root > div#header > h1:first-child")
when :org
doc.css("div#gollum-root > p.title:first-child")
when :pod
doc.css("div#gollum-root > a.dummyTopAnchor:first-child + h1")
when :rest
doc.css("div#gollum-root > div > div > h1:first-child")
else
doc.css("div#gollum-root > h1:first-child")
end
if !header.empty?
Sanitize.clean(header.to_html)
else
Sanitize.clean(name)
end.strip
header = Sanitize.clean(name).strip
end
# Public: The path of the page within the repo.
+6 -6
View File
@@ -43,7 +43,7 @@ module Gollum
# Default whitelisted protocols for URLs.
PROTOCOLS = {
'a' => {'href' => ['http', 'https', 'mailto', 'ftp', 'irc', :relative]},
'a' => {'href' => ['http', 'https', 'mailto', 'ftp', 'irc', 'apt', :relative]},
'img' => {'src' => ['http', 'https', :relative]}
}.freeze
@@ -120,12 +120,12 @@ module Gollum
attr_writer :allow_comments
def initialize
@elements = ELEMENTS
@attributes = ATTRIBUTES
@protocols = PROTOCOLS
@transformers = TRANSFORMERS
@elements = ELEMENTS.dup
@attributes = ATTRIBUTES.dup
@protocols = PROTOCOLS.dup
@transformers = TRANSFORMERS.dup
@add_attributes = {}
@remove_contents = REMOVE_CONTENTS
@remove_contents = REMOVE_CONTENTS.dup
@allow_comments = false
@id_prefix = 'wiki-'
yield self if block_given?
+2 -2
View File
@@ -8,8 +8,8 @@ context "Wiki" do
test "normalizes commit hash" do
commit = {:message => 'abc'}
name = @wiki.repo.config['user.name']
email = @wiki.repo.config['user.email']
name = @wiki.repo.config['user.name'] || @wiki.default_committer_name
email = @wiki.repo.config['user.email'] || @wiki.default_committer_email
committer = Gollum::Committer.new(@wiki, commit)
assert_equal name, committer.actor.name
assert_equal email, committer.actor.email
+20
View File
@@ -495,6 +495,13 @@ np.array([[2,2],[1,3]],np.float)
compare(content, output)
end
test "allows apt uri schemes" do
content = "[Hack me](apt:gettext)"
output = "<p><a href=\"apt:gettext\">Hackme</a></p>"
compare(content, output)
end
test "removes style blocks completely" do
content = "<style>body { color: red }</style>foobar"
output = "<p>foobar</p>"
@@ -588,6 +595,19 @@ np.array([[2,2],[1,3]],np.float)
compare(content, output, 'md')
end
#########################################################################
# Asciidoc
#########################################################################
test "asciidoc header" do
compare("= Book Title\n\n== Heading", '<div class="sect1"><h2 id="wiki-_heading">Heading</h2><div class="sectionbody"></div></div>', 'asciidoc')
end
test "internal links with asciidoc" do
compare("= Book Title\n\n[[anid]]\n== Heading", '<div class="sect1"><h2 id="wiki-anid">Heading</h2><div class="sectionbody"></div></div>', 'asciidoc')
end
#########################################################################
#
# Helpers
+4 -4
View File
@@ -104,12 +104,12 @@ context "Page" do
assert_equal 'My Precious', page.title
end
test "title from h1 with normal contents" do
test "title from filename with normal contents" do
page = @wiki.page('Home')
assert_equal "The LOTR Wiki", page.title
assert_equal "Home", page.title
end
test "title from h1 with html contents" do
test "title from filename with html contents" do
page = @wiki.page('Eye Of Sauron')
assert_equal "Eye Of Sauron", page.title
end
@@ -163,4 +163,4 @@ context "Page" do
assert_equal "/foo", Gollum::BlobEntry.normalize_dir("foo")
assert_equal "/foo", Gollum::BlobEntry.normalize_dir("/foo")
end
end
end