Merge with upstream.

This commit is contained in:
bootstraponline
2012-05-08 13:13:36 -06:00
30 changed files with 982 additions and 780 deletions
+10 -1
View File
@@ -106,6 +106,13 @@ 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 Sidebars affect all pages in their directory and any subdirectories that do not
have a sidebar file of their own. have a sidebar file of their own.
## HEADER FILES
Header files allow you to add a simple header to your wiki. Header files must
be named `_Header.ext` where the extension is one of the supported formats.
Like sidebars, headers affect all pages in their directory and any
subdirectories that do not have a header file of their own.
## FOOTER FILES ## FOOTER FILES
Footer files allow you to add a simple footer to your wiki. Footer files must Footer files allow you to add a simple footer to your wiki. Footer files must
@@ -113,7 +120,6 @@ be named `_Footer.ext` where the extension is one of the supported formats.
Like sidebars, footers affect all pages in their directory and any Like sidebars, footers affect all pages in their directory and any
subdirectories that do not have a footer file of their own. subdirectories that do not have a footer file of their own.
## HTML SANITIZATION ## HTML SANITIZATION
For security and compatibility reasons Gollum wikis may not contain custom CSS For security and compatibility reasons Gollum wikis may not contain custom CSS
@@ -466,6 +472,9 @@ like Rack::Auth, OmniAuth, etc.
Precious::App.set(:default_markup, :markdown) # set your favorite markup language Precious::App.set(:default_markup, :markdown) # set your favorite markup language
run Precious::App run Precious::App
## Windows Filename Validation
Note that filenames on windows must not contain any of the following characters `\ / : * ? " < > |`. See [this support article](http://support.microsoft.com/kb/177506) for details.
## Testing ## Testing
[![Build Status](https://secure.travis-ci.org/github/gollum.png?branch=master)](http://travis-ci.org/github/gollum) [![Build Status](https://secure.travis-ci.org/github/gollum.png?branch=master)](http://travis-ci.org/github/gollum)
+4 -79
View File
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
s.rubygems_version = '1.3.5' s.rubygems_version = '1.3.5'
s.name = 'gollum' s.name = 'gollum'
s.version = '1.4.3' s.version = '2.0.0'
s.date = '2012-05-03' s.date = '2012-05-06'
s.rubyforge_project = 'gollum' s.rubyforge_project = 'gollum'
s.summary = "A simple, Git-powered wiki." s.summary = "A simple, Git-powered wiki."
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--charset=UTF-8"] s.rdoc_options = ["--charset=UTF-8"]
s.extra_rdoc_files = %w[README.md LICENSE] s.extra_rdoc_files = %w[README.md LICENSE]
s.add_dependency('grit', "~> 2.4.1") s.add_dependency('grit', "~> 2.5.0")
s.add_dependency('github-markup', [">= 0.7.0", "< 1.0.0"]) s.add_dependency('github-markup', [">= 0.7.0", "< 1.0.0"])
s.add_dependency('github-markdown') s.add_dependency('github-markdown')
s.add_dependency('pygments.rb', "~> 0.2.0") s.add_dependency('pygments.rb', "~> 0.2.0")
@@ -37,7 +37,7 @@ Gem::Specification.new do |s|
s.add_development_dependency('org-ruby', '~>0.6.2') s.add_development_dependency('org-ruby', '~>0.6.2')
s.add_development_dependency('shoulda') s.add_development_dependency('shoulda')
s.add_development_dependency('rack-test') 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') s.add_development_dependency('rake', '~> 0.9.2')
# = MANIFEST = # = MANIFEST =
@@ -75,80 +75,6 @@ Gem::Specification.new do |s|
lib/gollum/frontend/public/gollum/javascript/gollum.placeholder.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.color.js
lib/gollum/frontend/public/gollum/javascript/jquery.js lib/gollum/frontend/public/gollum/javascript/jquery.js
lib/gollum/frontend/public/gollum/livepreview/css/custom.css
lib/gollum/frontend/public/gollum/livepreview/css/gollum/template.css
lib/gollum/frontend/public/gollum/livepreview/css/highlightjs/github.css
lib/gollum/frontend/public/gollum/livepreview/images/lr_24.png
lib/gollum/frontend/public/gollum/livepreview/images/save_24.png
lib/gollum/frontend/public/gollum/livepreview/index.html
lib/gollum/frontend/public/gollum/livepreview/js/ace/ace.js
lib/gollum/frontend/public/gollum/livepreview/js/ace/mode-markdown.js
lib/gollum/frontend/public/gollum/livepreview/js/ace/theme-twilight.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/highlight.pack.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/1c.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/actionscript.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/apache.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/avrasm.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/axapta.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/bash.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/cmake.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/coffeescript.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/cpp.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/cs.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/css.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/d.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/delphi.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/diff.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/django.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/dos.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/erlang-repl.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/erlang.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/go.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/haskell.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/http.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/ini.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/java.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/javascript.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/lisp.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/lua.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/markdown.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/matlab.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/mel.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/nginx.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/objectivec.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/parser3.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/perl.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/php.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/profile.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/python.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/r.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/renderman.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/ruby.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/rust.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/scala.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/smalltalk.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/sql.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/tex.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/vala.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/vbscript.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/vhdl.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/xml.js
lib/gollum/frontend/public/gollum/livepreview/js/jquery/jquery-1.7.2.min.js
lib/gollum/frontend/public/gollum/livepreview/js/pagedown/Markdown.Converter.js
lib/gollum/frontend/public/gollum/livepreview/js/pagedown/Markdown.Sanitizer.js
lib/gollum/frontend/public/gollum/livepreview/licenses/ace/LICENSE.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/bootstraponline_gollum/LICENSE.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/gollum/LICENSE.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/highlightjs/AUTHORS.en.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/highlightjs/AUTHORS.ru.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/highlightjs/LICENSE.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/jquery/MIT-LICENSE.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/licenses.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/notepages/LICENSE.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/pagedown/LICENSE.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/retina_display_icon_set/by_sa_3.0_unported_legalcode.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/sizzle/LICENSE.txt
lib/gollum/frontend/public/gollum/livepreview/readme.md
lib/gollum/frontend/templates/compare.mustache lib/gollum/frontend/templates/compare.mustache
lib/gollum/frontend/templates/create.mustache lib/gollum/frontend/templates/create.mustache
lib/gollum/frontend/templates/edit.mustache lib/gollum/frontend/templates/edit.mustache
@@ -160,7 +86,6 @@ Gem::Specification.new do |s|
lib/gollum/frontend/templates/pages.mustache lib/gollum/frontend/templates/pages.mustache
lib/gollum/frontend/templates/search.mustache lib/gollum/frontend/templates/search.mustache
lib/gollum/frontend/templates/searchbar.mustache lib/gollum/frontend/templates/searchbar.mustache
lib/gollum/frontend/uri_encode_component.rb
lib/gollum/frontend/views/compare.rb lib/gollum/frontend/views/compare.rb
lib/gollum/frontend/views/create.rb lib/gollum/frontend/views/create.rb
lib/gollum/frontend/views/edit.rb lib/gollum/frontend/views/edit.rb
+1 -1
View File
@@ -21,7 +21,7 @@ require File.expand_path('../gollum/tex', __FILE__)
require File.expand_path('../gollum/web_sequence_diagram', __FILE__) require File.expand_path('../gollum/web_sequence_diagram', __FILE__)
module Gollum module Gollum
VERSION = '1.4.3' VERSION = '2.0.0'
def self.assets_path def self.assets_path
::File.expand_path('gollum/frontend/public', ::File.dirname(__FILE__)) ::File.expand_path('gollum/frontend/public', ::File.dirname(__FILE__))
+2
View File
@@ -60,6 +60,7 @@ module Precious
redirect '/livepreview/index.html?page=' + encodeURIComponent(@name) redirect '/livepreview/index.html?page=' + encodeURIComponent(@name)
else else
@page = page @page = page
@page.version = wiki.repo.log(wiki.ref, @page.path).first
@content = page.raw_data @content = page.raw_data
mustache :edit mustache :edit
end end
@@ -77,6 +78,7 @@ module Precious
update_wiki_page(wiki, page, params[:content], commit, name, update_wiki_page(wiki, page, params[:content], commit, name,
params[:format]) params[:format])
update_wiki_page(wiki, page.header, params[:header], commit) if params[:header]
update_wiki_page(wiki, page.footer, params[:footer], commit) if params[:footer] update_wiki_page(wiki, page.footer, params[:footer], commit) if params[:footer]
update_wiki_page(wiki, page.sidebar, params[:sidebar], commit) if params[:sidebar] update_wiki_page(wiki, page.sidebar, params[:sidebar], commit) if params[:sidebar]
committer.commit committer.commit
@@ -30,6 +30,7 @@ a {
-webkit-border-radius: 1em; -webkit-border-radius: 1em;
} }
.ff #gollum-editor,
.ie #gollum-editor { .ie #gollum-editor {
padding-bottom: 1em; padding-bottom: 1em;
} }
@@ -51,9 +52,9 @@ a {
background: #fff; background: #fff;
border: 1px solid #ddd; border: 1px solid #ddd;
color: #000; color: #000;
font-size: 1.3em; font-size: 1.1em;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
line-height: 1.8em; line-height: 1.5em;
margin: 1em 0 0.4em; margin: 1em 0 0.4em;
padding: 0.5em; padding: 0.5em;
width: 98%; width: 98%;
@@ -192,44 +193,36 @@ a#function-help:hover span { background-position: -405px -28px; }
#gollum-editor #gollum-editor-function-bar #gollum-editor-format-selector { #gollum-editor #gollum-editor-function-bar #gollum-editor-format-selector {
overflow: hidden; overflow: hidden;
padding: 0 0 1.1em 0; padding: .2em 0 .5em 0;
} }
#gollum-editor #gollum-editor-function-bar #gollum-editor #gollum-editor-function-bar
#gollum-editor-format-selector select { #gollum-editor-format-selector select {
background-color: #f9f9f9; background-color: #f9f9f9;
border: 1px solid transparent; border: 1px solid #ddd;
color: #333;
float: right; float: right;
font-size: 1.1em; font-size: 1em;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: bold; font-weight: bold;
line-height: 1.6em; line-height: 1.6em;
padding: 0.5em 0.7em; padding: 0.3em 0.4em;
margin-bottom: 0;
border-radius: 0.5em; border-radius: 0.5em;
-moz-border-radius: 0.5em; -moz-border-radius: 0.5em;
-webkit-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 #gollum-editor-function-bar
#gollum-editor-format-selector label { #gollum-editor-format-selector label {
color: #999; color: #999;
float: right; float: right;
font-size: 1.1em; font-size: 1em;
font-weight: bold; font-weight: bold;
line-height: 1.6em; 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 #gollum-editor-function-bar
@@ -240,12 +233,13 @@ a#function-help:hover span { background-position: -405px -28px; }
/* @section form-fields */ /* @section form-fields */
#gollum-editor textarea#gollum-editor-sidebar,
#gollum-editor textarea#gollum-editor-body { #gollum-editor textarea#gollum-editor-body {
background: #fff; background: #fff;
border: 1px solid #ddd; border: 1px solid #ddd;
font-size: 1.3em; font-size: 1em;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
line-height: 1.8em; line-height: 1.4em;
margin: 1em 0 0.4em; margin: 1em 0 0.4em;
padding: 0.5em; /* I don't really like mixing pct & em here… */ padding: 0.5em; /* I don't really like mixing pct & em here… */
width: 98%; width: 98%;
@@ -259,7 +253,7 @@ a#function-help:hover span { background-position: -405px -28px; }
cursor: pointer; cursor: pointer;
display: block; display: block;
float: left; float: left;
font-size: 1.2em; font-size: 1em;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: bold; font-weight: bold;
margin: 0; margin: 0;
@@ -337,12 +331,15 @@ a#function-help:hover span { background-position: -405px -28px; }
font-size: 1.6em; font-size: 1.6em;
float: left; float: left;
margin: 0; margin: 0;
padding: 0.4em 0 0 0.3em; padding: 0.15em 0 0 0.3em;
text-shadow: 0 -1px 0 #fff; text-shadow: 0 -1px 0 #fff;
} }
#gollum-editor .collapsed h4 {
color: #bbb;
}
#gollum-editor .collapsed a.button:hover, #gollum-editor .collapsed a.button:hover,
#gollum-editor .expanded h4 a.button:hover { #gollum-editor .expanded a.button:hover {
color: #fff; color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
text-decoration: none; text-decoration: none;
@@ -403,7 +400,7 @@ a#function-help:hover span { background-position: -405px -28px; }
color: #333; color: #333;
cursor: pointer; cursor: pointer;
display: block; display: block;
font-size: 1.2em; font-size: 1em;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: bold; font-weight: bold;
line-height: 1.2em; line-height: 1.2em;
@@ -37,8 +37,8 @@ a:hover, a:visited {
/* @section head */ /* @section head */
#head { #head {
border-bottom: 1px solid #ddd;
margin: 4.5em 0 0.5em; margin: 4.5em 0 0.5em;
padding: 0.5em 0;
overflow: hidden; overflow: hidden;
} }
@@ -71,6 +71,7 @@ a:hover, a:visited {
display: block; display: block;
float: left; float: left;
margin-right: 3%; margin-right: 3%;
margin-bottom: 40px;
width: 100%; width: 100%;
} }
@@ -86,6 +87,7 @@ a:hover, a:visited {
float: right; float: right;
padding: 7px; padding: 7px;
width: 25%; width: 25%;
color: #555;
border-radius: 0.5em; border-radius: 0.5em;
-moz-border-radius: 0.5em; -moz-border-radius: 0.5em;
@@ -97,7 +99,7 @@ a:hover, a:visited {
} }
#wiki-rightbar > p:first-child { #wiki-rightbar > p:first-child {
margin-top: 0; margin-top: 10px;
} }
#wiki-rightbar p.parent { #wiki-rightbar p.parent {
@@ -114,34 +116,8 @@ a:hover, a:visited {
content: "← "; 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 */ /* @section footer */
#wiki-footer { #wiki-footer {
clear: both; clear: both;
margin: 2em 0 5em; margin: 2em 0 5em;
@@ -151,18 +127,22 @@ a:hover, a:visited {
width: 70%; width: 70%;
} }
#wiki-header #header-content,
#wiki-footer #footer-content { #wiki-footer #footer-content {
background-color: #f7f7f7; background-color: #f7f7f7;
border: 1px solid #ddd; border: 1px solid #ddd;
font-size: 1.2em;
line-height: 1.5em;
margin-top: 1.5em;
padding: 1em; padding: 1em;
border-radius: 0.5em; border-radius: 0.5em;
-moz-border-radius: 0.5em; -moz-border-radius: 0.5em;
-webkit-border-radius: 0.5em; -webkit-border-radius: 0.5em;
} }
#wiki-header #header-content {
margin-bottom: 1.5em;
}
#wiki-footer #footer-content {
margin-top: 1.5em;
}
#wiki-footer #footer-content h3 { #wiki-footer #footer-content h3 {
font-size: 1.2em; font-size: 1.2em;
@@ -208,6 +188,7 @@ a:hover, a:visited {
/* @section page-footer */ /* @section page-footer */
.page #footer { .page #footer {
border-top: 1px solid #ddd;
margin: 1em 0 7em; margin: 1em 0 7em;
} }
@@ -235,12 +216,12 @@ a:hover, a:visited {
} }
#wiki-history { #wiki-history {
margin-top: 3em; margin-top: 2em;
} }
#wiki-history fieldset { #wiki-history fieldset {
border: 0; border: 0;
margin: 2em 0; margin: 1em 0;
padding: 0; padding: 0;
} }
@@ -262,14 +243,14 @@ a:hover, a:visited {
#wiki-history table tr td { #wiki-history table tr td {
border: 1px solid #c0dce9; border: 1px solid #c0dce9;
font-size: 1.2em; font-size: 1em;
line-height: 1.6em; line-height: 1.6em;
margin: 0; margin: 0;
padding: 0.3em 0.7em; padding: 0.3em 0.7em;
} }
#wiki-history table tr td.checkbox { #wiki-history table tr td.checkbox {
min-width: 2em; width: 4em;
padding: 0.3em; padding: 0.3em;
} }
@@ -278,7 +259,9 @@ a:hover, a:visited {
display: block; display: block;
padding-right: 0; padding-right: 0;
padding-top: 0.4em; 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:nth-child(2n),
@@ -331,6 +314,10 @@ a:hover, a:visited {
padding: 0 0.2em; padding: 0 0.2em;
} }
.history #footer {
margin-bottom: 7em;
}
.history #wiki-history ul.actions li, .history #wiki-history ul.actions li,
.history #footer ul.actions li { .history #footer ul.actions li {
margin: 0 0.6em 0 0; margin: 0 0.6em 0 0;
@@ -410,10 +397,14 @@ a:hover, a:visited {
.compare .data { .compare .data {
border: 1px solid #ddd; border: 1px solid #ddd;
margin-top: 1em; margin: 1em 0 2em;
overflow: auto; overflow: auto;
} }
.compare .data table {
width: 100%;
}
.compare .data pre { .compare .data pre {
margin: 0; margin: 0;
padding: 0; padding: 0;
@@ -426,11 +417,15 @@ a:hover, a:visited {
.compare .data tr td { .compare .data tr td {
font-family: "Consolas", "Monaco", "Andale Mono", "Courier New", monospace; font-family: "Consolas", "Monaco", "Andale Mono", "Courier New", monospace;
font-size: 1.2em; font-size: 1.2em;
line-height: 1.8em; line-height: 1.2em;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.compare .data tr td + td + td {
width: 100%;
}
.compare .data td.line_numbers { .compare .data td.line_numbers {
background: #f7f7f7; background: #f7f7f7;
border-right: 1px solid #999; border-right: 1px solid #999;
@@ -444,6 +439,10 @@ a:hover, a:visited {
margin-right: 0.6em; margin-right: 0.6em;
} }
.compare #footer {
margin-bottom: 7em;
}
/* @control syntax */ /* @control syntax */
@@ -481,8 +480,9 @@ ul.actions {
ul.actions li { ul.actions li {
float: left; float: left;
font-size: 1.2em; font-size: 0.9em;
margin-left: 0.6em; margin-left: 0.6em;
margin-bottom: 0.6em;
} }
.minibutton a { .minibutton a {
@@ -594,6 +594,7 @@ ul.actions {
background: #fff; background: #fff;
border: 1px solid #d4d4d4; border: 1px solid #d4d4d4;
overflow: hidden; overflow: hidden;
height: 2.2em;
border-radius: 0.3em; border-radius: 0.3em;
-moz-border-radius: 0.3em; -moz-border-radius: 0.3em;
@@ -605,18 +606,15 @@ ul.actions {
color: #000; color: #000;
float: left; float: left;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 1.2em; font-size: 1em;
height: 2.15em; height: inherit;
padding: 0 .5em;
-webkit-focus-ring: none; -webkit-focus-ring: none;
} }
.ff #head #searchbar #searchbar-fauxtext input#search-query { .ie8 #head #searchbar #searchbar-fauxtext input#search-query {
padding: 0.2em 0 0.2em 0.5em; 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 { #head #searchbar #searchbar-fauxtext input#search-query.ph {
@@ -630,7 +628,7 @@ ul.actions {
margin: 0 !important; margin: 0 !important;
padding: 0; padding: 0;
float: right; float: right;
font-size: 1.2em; height: inherit;
border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0; -moz-border-radius: 0 3px 3px 0;
@@ -639,10 +637,10 @@ ul.actions {
#head #searchbar #searchbar-fauxtext #search-submit span { #head #searchbar #searchbar-fauxtext #search-submit span {
background-image: url(/images/icon-sprite.png); background-image: url(/images/icon-sprite.png);
background-position: -431px 4px; background-position: -431px -1px;
background-repeat: no-repeat; background-repeat: no-repeat;
display: block; display: block;
height: 2.15em; height: inherit;
overflow: hidden; overflow: hidden;
text-indent: -5000px; text-indent: -5000px;
width: 28px; width: 28px;
+435 -244
View File
@@ -10,7 +10,7 @@
html, body { html, body {
color: black; color: #333;
} }
body { body {
@@ -22,182 +22,228 @@ img {
border: 0; border: 0;
} }
#template {
font-size: 14px;
line-height: 1.4;
margin-bottom: 40px;
}
/* Link Colors */
a.absent { a.absent {
color: #c00; color: #c00;
} }
/* Primary Body Copy */ .markdown-body {
#template p { font-size: 14px;
margin: 1em 0; line-height: 1.6;
}
.markdown-body>*:first-child {
margin-top: 0!important
}
.markdown-body>*:last-child {
margin-bottom: 0!important
}
.markdown-body a.absent {
color: #c00
}
.markdown-body a.anchor {
display: block;
padding-left: 30px;
margin-left: -30px;
cursor: pointer;
position: absolute;
top: 0;
left: 0;
bottom: 0;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin: 20px 0 10px;
padding: 0; padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
cursor: text;
position: relative;
} }
.markdown-body h1:hover a.anchor,
/* ReST first graf in nested list */ .markdown-body h2:hover a.anchor,
#template * li p.first { .markdown-body h3:hover a.anchor,
display: inline-block; .markdown-body h4:hover a.anchor,
.markdown-body h5:hover a.anchor,
.markdown-body h6:hover a.anchor {
background: url('/images/para.png') no-repeat 10px center;
text-decoration: none;
} }
.markdown-body h1 tt,
/* Headings */ .markdown-body h1 code,
#template h1, #template h2, #template h3, .markdown-body h2 tt,
#template h4, #template h5, #template h6 { .markdown-body h2 code,
margin: 0; .markdown-body h3 tt,
padding: 0; .markdown-body h3 code,
.markdown-body h4 tt,
.markdown-body h4 code,
.markdown-body h5 tt,
.markdown-body h5 code,
.markdown-body h6 tt,
.markdown-body h6 code {
font-size: inherit
} }
.markdown-body h1 {
#template h1 { font-size: 28px;
color: #000;
}
.markdown-body h2 {
font-size: 24px;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
font-size: 33px; /* was 32, GH is 33px */ color: #000;
line-height: normal;
padding: .08em 0 0 0;
margin: 0;
} }
.markdown-body h3 {
#template h2 { font-size: 18px
font-size: 22px;
line-height: normal;
margin: 22px 0 0;
padding: 7px 0 0;
} }
.markdown-body h4 {
#template h3 { font-size: 16px
font-size: 16px;
line-height: 26px;
padding: 26px 0 0;
} }
.markdown-body h5 {
#template h4 { font-size: 14px
}
.markdown-body h6 {
color: #777;
font-size: 14px; font-size: 14px;
line-height: 26px;
padding: 18px 0 4px;
font-weight: bold;
text-transform: uppercase;
} }
.markdown-body p,
#template h5 { .markdown-body blockquote,
font-size: 13px; .markdown-body ul,
line-height: 26px; .markdown-body ol,
margin-bottom: -19px; .markdown-body dl,
padding: 14px 0 0; .markdown-body li,
font-weight: bold; .markdown-body table,
text-transform: uppercase; .markdown-body pre {
margin: 15px 0
} }
.markdown-body hr {
#template h6 { background: transparent url('/images/dirty-shade.png') repeat-x 0 0;
color: #666; border: 0 none;
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; color: #ccc;
border: 2px solid #ccc; height: 4px;
margin: 20px 0;
padding: 0; padding: 0;
} }
.markdown-body>h2:first-child,
/* Border Reset for headers with horizontal rules */ .markdown-body>h1:first-child,
#template > h2:first-child, .markdown-body>h1:first-child+h2,
#template > h1:first-child { .markdown-body>h3:first-child,
margin: 12px 0 0; .markdown-body>h4:first-child,
padding: 10px 0 0; .markdown-body>h5:first-child,
.markdown-body>h6:first-child {
margin-top: 0;
padding-top: 0;
} }
.markdown-body a:first-child h1,
.markdown-body a:first-child h2,
/* Lists, Blockquotes & Such */ .markdown-body a:first-child h3,
#template ul, .markdown-body a:first-child h4,
#template ol { .markdown-body a:first-child h5,
margin-top: 1.5em; .markdown-body a:first-child h6 {
margin-left: 2.6em; margin-top: 0;
padding-top: 0;
} }
.markdown-body h1+p,
/* Nested Lists */ .markdown-body h2+p,
#template ul li, .markdown-body h3+p,
#template ol li, .markdown-body h4+p,
#template ul li ul, .markdown-body h5+p,
#template ol li ol, .markdown-body h6+p {
#template ul li ol, margin-top: 0
#template ol li ul,
#template ul ul,
#template ol ol {
padding: 0;
margin: .5em 0;
} }
.markdown-body li p.first {
#template dl { display: inline-block
margin: 0;
padding: 20px 0 0;
} }
.markdown-body ul,
#template dl dt { .markdown-body ol {
padding-left: 30px
}
.markdown-body ul li>:first-child,
.markdown-body ol li>:first-child {
margin-top: 0
}
.markdown-body ul li>:last-child,
.markdown-body ol li>:last-child {
margin-bottom: 0
}
.markdown-body dl {
padding: 0
}
.markdown-body dl dt {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
line-height: normal; font-style: italic;
margin: 0;
padding: 20px 0 0;
}
#template dl dt:first-child {
padding: 0; padding: 0;
margin: 15px 0 5px;
} }
.markdown-body dl dt:first-child {
#template dl dd { padding: 0
font-size: 13px;
margin: 0;
padding: 3px 0 0;
} }
.markdown-body dl dt>:first-child {
/* Tables */ margin-top: 0
#template table {
border-collapse: collapse;
margin: 20px 0 0;
padding: 0;
} }
.markdown-body dl dt>:last-child {
#template table * tr { margin-bottom: 0
}
.markdown-body dl dd {
margin: 0 0 15px;
padding: 0 15px;
}
.markdown-body dl dd>:first-child {
margin-top: 0
}
.markdown-body dl dd>:last-child {
margin-bottom: 0
}
.markdown-body blockquote {
border-left: 4px solid #DDD;
padding: 0 15px;
color: #777;
}
.markdown-body blockquote>:first-child {
margin-top: 0
}
.markdown-body blockquote>:last-child {
margin-bottom: 0
}
.markdown-body table {
padding: 0
}
.markdown-body table tr {
border-top: 1px solid #ccc; border-top: 1px solid #ccc;
background-color: #fff; background-color: #fff;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.markdown-body table tr:nth-child(2n) {
#template table * tr:nth-child(2n) { background-color: #f8f8f8
background-color: #f8f8f8;
} }
.markdown-body table tr th {
#template table * tr th, font-weight: bold
#template table * tr td { }
.markdown-body table tr th,
.markdown-body table tr td {
border: 1px solid #ccc; border: 1px solid #ccc;
text-align: left; text-align: left;
margin: 0; margin: 0;
padding: 6px 13px; padding: 6px 13px;
} }
.markdown-body table tr th>:first-child,
/* Images & Stuff */ .markdown-body table tr td>:first-child {
#template img { margin-top: 0
max-width: 100%;
} }
.markdown-body table tr th>:last-child,
/* Gollum Image Tags */ .markdown-body table tr td>:last-child {
margin-bottom: 0
/* Framed */ }
#template span.frame { .markdown-body img {
max-width: 100%
}
.markdown-body span.frame {
display: block; display: block;
overflow: hidden; overflow: hidden;
} }
.markdown-body span.frame>span {
#template span.frame > span {
border: 1px solid #ddd; border: 1px solid #ddd;
display: block; display: block;
float: left; float: left;
@@ -206,176 +252,321 @@ a.absent {
padding: 7px; padding: 7px;
width: auto; width: auto;
} }
.markdown-body span.frame span img {
#template span.frame span img {
display: block; display: block;
float: left; float: left;
} }
.markdown-body span.frame span span {
#template span.frame span span {
clear: both; clear: both;
color: #333; color: #333;
display: block; display: block;
padding: 5px 0 0; padding: 5px 0 0;
} }
.markdown-body span.align-center {
#template span.align-center {
display: block; display: block;
overflow: hidden; overflow: hidden;
clear: both; clear: both;
} }
.markdown-body span.align-center>span {
#template span.align-center > span {
display: block; display: block;
overflow: hidden; overflow: hidden;
margin: 13px auto 0; margin: 13px auto 0;
text-align: center; text-align: center;
} }
.markdown-body span.align-center span img {
#template span.align-center span img {
margin: 0 auto; margin: 0 auto;
text-align: center; text-align: center;
} }
.markdown-body span.align-right {
#template span.align-right {
display: block; display: block;
overflow: hidden; overflow: hidden;
clear: both; clear: both;
} }
.markdown-body span.align-right>span {
#template span.align-right > span {
display: block; display: block;
overflow: hidden; overflow: hidden;
margin: 13px 0 0; margin: 13px 0 0;
text-align: right; text-align: right;
} }
.markdown-body span.align-right span img {
#template span.align-right span img {
margin: 0; margin: 0;
text-align: right; text-align: right;
} }
.markdown-body span.float-left {
#template span.float-left {
display: block; display: block;
margin-right: 13px; margin-right: 13px;
overflow: hidden; overflow: hidden;
float: left; float: left;
} }
.markdown-body span.float-left span {
#template span.float-left span { margin: 13px 0 0
margin: 13px 0 0;
} }
.markdown-body span.float-right {
#template span.float-right {
display: block; display: block;
margin-left: 13px; margin-left: 13px;
overflow: hidden; overflow: hidden;
float: right; float: right;
} }
.markdown-body span.float-right>span {
#template span.float-right > span {
display: block; display: block;
overflow: hidden; overflow: hidden;
margin: 13px auto 0; margin: 13px auto 0;
text-align: right; text-align: right;
} }
.markdown-body code,
.markdown-body tt {
/* Code */ margin: 0 2px;
#template code, #template tt { padding: 0 5px;
white-space: nowrap;
border: 1px solid #ddd;
background-color: #f8f8f8; background-color: #f8f8f8;
border: 1px solid #dedede;
font-size: 13px;
padding: 0;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
} }
.markdown-body pre>code {
#template .highlight pre, #template pre { margin: 0;
padding: 0;
white-space: pre;
border: none;
background: transparent;
}
.markdown-body .highlight pre,
.markdown-body pre {
background-color: #f8f8f8; background-color: #f8f8f8;
border: 1px solid #ccc; border: 1px solid #ccc;
font-size: 13px; font-size: 13px;
line-height: 19px; line-height: 19px;
overflow: auto; overflow: auto;
padding: 6px 10px; padding: 6px 10px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
} }
.markdown-body pre code,
pre, code { .markdown-body pre tt {
font: 12px 'Bitstream Vera Sans Mono','Courier',monospace
}
#template pre code, #template pre tt {
background-color: transparent; background-color: transparent;
border: none; border: none;
} }
/* .highlight {
Highlight rules from pull req 191 background: #fff
https://github.com/eboto/gollum/commit/5df09477abf4a04c82c7fcaa2bd7ee2a85e7ec82 }
*/ .highlight .c {
#template .highlight { background:#fff; } color: #998;
#template .highlight .c { color:#998;font-style:italic; } font-style: italic;
#template .highlight .err { color:#a61717;background-color:#e3d2d2; } }
#template .highlight .k { font-weight:bold; } .highlight .err {
#template .highlight .o { font-weight:bold; } color: #a61717;
#template .highlight .cm { color:#998;font-style:italic; } background-color: #e3d2d2;
#template .highlight .cp { color:#999;font-weight:bold; } }
#template .highlight .c1 { color:#998;font-style:italic; } .highlight .k {
#template .highlight .cs { color:#999;font-weight:bold;font-style:italic; } font-weight: bold
#template .highlight .gd { color:#000;background-color:#fdd; } }
#template .highlight .gd .x { color:#000;background-color:#faa; } .highlight .o {
#template .highlight .ge { font-style:italic; } font-weight: bold
#template .highlight .gr { color:#a00; } }
#template .highlight .gh { color:#999; } .highlight .cm {
#template .highlight .gi { color:#000;background-color:#dfd; } color: #998;
#template .highlight .gi .x { color:#000;background-color:#afa; } font-style: italic;
#template .highlight .go { color:#888; } }
#template .highlight .gp { color:#555; } .highlight .cp {
#template .highlight .gs { font-weight:bold; } color: #999;
#template .highlight .gu { color:#800080;font-weight:bold; } font-weight: bold;
#template .highlight .gt { color:#a00; } }
#template .highlight .kc { font-weight:bold; } .highlight .c1 {
#template .highlight .kd { font-weight:bold; } color: #998;
#template .highlight .kp { font-weight:bold; } font-style: italic;
#template .highlight .kr { font-weight:bold; } }
#template .highlight .kt { color:#458;font-weight:bold; } .highlight .cs {
#template .highlight .m { color:#099; } color: #999;
#template .highlight .s { color:#d14; } font-weight: bold;
#template .highlight .na { color:#008080; } font-style: italic;
#template .highlight .nb { color:#0086B3; } }
#template .highlight .nc { color:#458;font-weight:bold; } .highlight .gd {
#template .highlight .no { color:#008080; } color: #000;
#template .highlight .ni { color:#800080; } background-color: #fdd;
#template .highlight .ne { color:#900;font-weight:bold; } }
#template .highlight .nf { color:#900;font-weight:bold; } .highlight .gd .x {
#template .highlight .nn { color:#555; } color: #000;
#template .highlight .nt { color:#000080; } background-color: #faa;
#template .highlight .nv { color:#008080; } }
#template .highlight .ow { font-weight:bold; } .highlight .ge {
#template .highlight .w { color:#bbb; } font-style: italic
#template .highlight .mf { color:#099; } }
#template .highlight .mh { color:#099; } .highlight .gr {
#template .highlight .mi { color:#099; } color: #a00
#template .highlight .mo { color:#099; } }
#template .highlight .sb { color:#d14; } .highlight .gh {
#template .highlight .sc { color:#d14; } color: #999
#template .highlight .sd { color:#d14; } }
#template .highlight .s2 { color:#d14; } .highlight .gi {
#template .highlight .se { color:#d14; } color: #000;
#template .highlight .sh { color:#d14; } background-color: #dfd;
#template .highlight .si { color:#d14; } }
#template .highlight .sx { color:#d14; } .highlight .gi .x {
#template .highlight .sr { color:#009926; } color: #000;
#template .highlight .s1 { color:#d14; } background-color: #afa;
#template .highlight .ss { color:#990073; } }
#template .highlight .bp { color:#999; } .highlight .go {
#template .highlight .vc { color:#008080; } color: #888
#template .highlight .vg { color:#008080; } }
#template .highlight .vi { color:#008080; } .highlight .gp {
#template .highlight .il { color:#099; } color: #555
}
.highlight .gs {
font-weight: bold
}
.highlight .gu {
color: #800080;
font-weight: bold;
}
.highlight .gt {
color: #a00
}
.highlight .kc {
font-weight: bold
}
.highlight .kd {
font-weight: bold
}
.highlight .kn {
font-weight: bold
}
.highlight .kp {
font-weight: bold
}
.highlight .kr {
font-weight: bold
}
.highlight .kt {
color: #458;
font-weight: bold;
}
.highlight .m {
color: #099
}
.highlight .s {
color: #d14
}
.highlight .na {
color: #008080
}
.highlight .nb {
color: #0086B3
}
.highlight .nc {
color: #458;
font-weight: bold;
}
.highlight .no {
color: #008080
}
.highlight .ni {
color: #800080
}
.highlight .ne {
color: #900;
font-weight: bold;
}
.highlight .nf {
color: #900;
font-weight: bold;
}
.highlight .nn {
color: #555
}
.highlight .nt {
color: #000080
}
.highlight .nv {
color: #008080
}
.highlight .ow {
font-weight: bold
}
.highlight .w {
color: #bbb
}
.highlight .mf {
color: #099
}
.highlight .mh {
color: #099
}
.highlight .mi {
color: #099
}
.highlight .mo {
color: #099
}
.highlight .sb {
color: #d14
}
.highlight .sc {
color: #d14
}
.highlight .sd {
color: #d14
}
.highlight .s2 {
color: #d14
}
.highlight .se {
color: #d14
}
.highlight .sh {
color: #d14
}
.highlight .si {
color: #d14
}
.highlight .sx {
color: #d14
}
.highlight .sr {
color: #009926
}
.highlight .s1 {
color: #d14
}
.highlight .ss {
color: #990073
}
.highlight .bp {
color: #999
}
.highlight .vc {
color: #008080
}
.highlight .vg {
color: #008080
}
.highlight .vi {
color: #008080
}
.highlight .il {
color: #099
}
.highlight .gc {
color: #999;
background-color: #EAF2F5;
}
.type-csharp .highlight .k {
color: #00F
}
.type-csharp .highlight .kt {
color: #00F
}
.type-csharp .highlight .nf {
color: #000;
font-weight: normal;
}
.type-csharp .highlight .nc {
color: #2B91AF
}
.type-csharp .highlight .nn {
color: #000
}
.type-csharp .highlight .s {
color: #A31515
}
.type-csharp .highlight .sc {
color: #A31515
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 939 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

+13 -3
View File
@@ -3,10 +3,16 @@
<h1>History for <strong>{{path}}</strong></h1> <h1>History for <strong>{{path}}</strong></h1>
<ul class="actions"> <ul class="actions">
<li class="minibutton"><a href="/history/{{escaped_name}}" <li class="minibutton">
class="action-page-history">Back to Page History</a></li>
</ul>
{{>searchbar}} {{>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">Page History</a></li>
</ul>
</div> </div>
{{#message}} {{#message}}
@@ -17,6 +23,8 @@
{{#show_revert}} {{#show_revert}}
<ul class="actions"> <ul class="actions">
<li class="minibutton"><a href="/history/{{escaped_name}}"
class="action-page-history">Back to Page History</a></li>
<li class="minibutton"> <li class="minibutton">
<form name="gollum-revert" action="/revert/{{escaped_name}}/{{before}}/{{after}}" method="post" id="gollum-revert-form"> <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> <a href="#" class="gollum-revert-button">Revert Changes</a>
@@ -41,6 +49,8 @@
</div> </div>
<div id="footer"> <div id="footer">
<ul class="actions"> <ul class="actions">
<li class="minibutton"><a href="/history/{{escaped_name}}"
class="action-page-history">Back to Page History</a></li>
{{#show_revert}} {{#show_revert}}
<li class="minibutton"> <li class="minibutton">
<a href="#" class="gollum-revert-button">Revert Changes</a> <a href="#" class="gollum-revert-button">Revert Changes</a>
@@ -2,12 +2,14 @@
<div id="head"> <div id="head">
<h1>History for <strong>{{title}}</strong></h1> <h1>History for <strong>{{title}}</strong></h1>
<ul class="actions"> <ul class="actions">
<li class="minibutton">
{{>searchbar}}
</li>
<li class="minibutton"><a href="/{{escaped_name}}" <li class="minibutton"><a href="/{{escaped_name}}"
class="action-view-page">View Page</a></li> class="action-view-page">View Page</a></li>
<li class="minibutton"><a href="/edit/{{escaped_name}}" <li class="minibutton"><a href="/edit/{{escaped_name}}"
class="action-edit-page">Edit Page</a></li> class="action-edit-page">Edit Page</a></li>
</ul> </ul>
{{>searchbar}}
</div> </div>
<div id="wiki-history"> <div id="wiki-history">
+14 -3
View File
@@ -2,6 +2,9 @@
<div id="head"> <div id="head">
<h1>{{title}}</h1> <h1>{{title}}</h1>
<ul class="actions"> <ul class="actions">
<li class="minibutton">
{{>searchbar}}
</li>
<li class="minibutton"><a href="/pages" <li class="minibutton"><a href="/pages"
class="action-all-pages">All Pages</a></li> class="action-all-pages">All Pages</a></li>
<li class="minibutton" class="jaws"> <li class="minibutton" class="jaws">
@@ -13,23 +16,31 @@
<li class="minibutton"><a href="/history/{{escaped_name}}" <li class="minibutton"><a href="/history/{{escaped_name}}"
class="action-page-history">Page History</a></li> class="action-page-history">Page History</a></li>
</ul> </ul>
{{>searchbar}}
</div> </div>
<div id="wiki-content"> <div id="wiki-content">
<div class="wrap {{#has_footer}} has-footer {{/has_footer}} {{#has_sidebar}} has-rightbar{{/has_sidebar}}"> <div class="wrap {{#has_footer}} has-footer {{/has_footer}} {{#has_sidebar}} has-rightbar{{/has_sidebar}}">
<div id="wiki-body" class="gollum-{{format}}-content"> <div id="wiki-body" class="gollum-{{format}}-content">
<div id="template"> {{#has_header}}
<div id="wiki-header" class="gollum-{{header_format}}-content">
<div id="header-content" class="markdown-body">
{{{header_content}}}
</div>
</div>
{{/has_header}}
<div class="markdown-body">
{{{content}}} {{{content}}}
</div> </div>
</div> </div>
{{#has_sidebar}} {{#has_sidebar}}
<div id="wiki-rightbar" class="gollum-{{sidebar_format}}-content"> <div id="wiki-rightbar" class="gollum-{{sidebar_format}}-content">
<div id="sidebar-content" class="markdown-body">
{{{sidebar_content}}} {{{sidebar_content}}}
</div> </div>
</div>
{{/has_sidebar}} {{/has_sidebar}}
{{#has_footer}} {{#has_footer}}
<div id="wiki-footer" class="gollum-{{footer_format}}-content"> <div id="wiki-footer" class="gollum-{{footer_format}}-content">
<div id="footer-content"> <div id="footer-content" class="markdown-body">
{{{footer_content}}} {{{footer_content}}}
</div> </div>
</div> </div>
+3 -1
View File
@@ -2,10 +2,12 @@
<div id="head"> <div id="head">
<h1>{{title}}</h1> <h1>{{title}}</h1>
<ul class="actions"> <ul class="actions">
<li class="minibutton">
{{>searchbar}}
</li>
<li class="minibutton"><a href="/" <li class="minibutton"><a href="/"
class="action-edit-page">Home</a></li> class="action-edit-page">Home</a></li>
</ul> </ul>
{{>searchbar}}
</div> </div>
<div id="results"> <div id="results">
@@ -2,10 +2,12 @@
<div id="head"> <div id="head">
<h1>Search Results for <strong>{{query}}</strong></h1> <h1>Search Results for <strong>{{query}}</strong></h1>
<ul class="actions"> <ul class="actions">
<li class="minibutton">
{{>searchbar}}
</li>
<li class="minibutton"><a href="/" <li class="minibutton"><a href="/"
class="action-edit-page">Home</a></li> class="action-edit-page">Home</a></li>
</ul> </ul>
{{>searchbar}}
</div> </div>
<div id="results"> <div id="results">
+5
View File
@@ -27,6 +27,11 @@ module Precious
!!@footer !!@footer
end end
def has_header
@header = (@page.header || false) if @header.nil? && @page
!!@header
end
def has_sidebar def has_sidebar
@sidebar = (@page.sidebar || false) if @sidebar.nil? && @page @sidebar = (@page.sidebar || false) if @sidebar.nil? && @page
!!@sidebar !!@sidebar
+11
View File
@@ -13,6 +13,17 @@ module Precious
@name.gsub('-', ' ') @name.gsub('-', ' ')
end end
def header
if @header.nil?
if page = @page.header
@header = page.raw_data
else
@header = false
end
end
@header
end
def footer def footer
if @footer.nil? if @footer.nil?
if page = @page.footer if page = @page.footer
+14 -1
View File
@@ -1,7 +1,7 @@
module Precious module Precious
module Views module Views
class Page < Layout class Page < Layout
attr_reader :content, :page, :footer attr_reader :content, :page, :header, :footer
DATE_FORMAT = "%Y-%m-%d %H:%M:%S" DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
DEFAULT_AUTHOR = 'you' DEFAULT_AUTHOR = 'you'
@@ -27,6 +27,19 @@ module Precious
@editable @editable
end end
def has_header
@header = (@page.header || false) if @header.nil?
!!@header
end
def header_content
has_header && @header.formatted_data
end
def header_format
has_header && @header.format.to_s
end
def has_footer def has_footer
@footer = (@page.footer || false) if @footer.nil? @footer = (@page.footer || false) if @footer.nil?
!!@footer !!@footer
+2 -1
View File
@@ -38,8 +38,9 @@ module Gollum
@wiki.history_sanitizer : @wiki.history_sanitizer :
@wiki.sanitizer @wiki.sanitizer
data = extract_tex(@data.dup) data = @data.dup
data = extract_code(data) data = extract_code(data)
data = extract_tex(data)
data = extract_wsd(data) data = extract_wsd(data)
data = extract_tags(data) data = extract_tags(data)
begin begin
+8 -1
View File
@@ -99,7 +99,7 @@ module Gollum
# Returns a newly initialized Gollum::Page. # Returns a newly initialized Gollum::Page.
def initialize(wiki) def initialize(wiki)
@wiki = wiki @wiki = wiki
@blob = @footer = @sidebar = nil @blob = @header = @footer = @sidebar = nil
end end
# Public: The on-disk filename of the page including extension. # Public: The on-disk filename of the page including extension.
@@ -209,6 +209,13 @@ module Gollum
end end
end end
# Public: The header Page.
#
# Returns the header Page or nil if none exists.
def header
@header ||= find_sub_page(:header)
end
# Public: The footer Page. # Public: The footer Page.
# #
# Returns the footer Page or nil if none exists. # Returns the footer Page or nil if none exists.
+6 -6
View File
@@ -43,7 +43,7 @@ module Gollum
# Default whitelisted protocols for URLs. # Default whitelisted protocols for URLs.
PROTOCOLS = { PROTOCOLS = {
'a' => {'href' => ['http', 'https', 'mailto', 'ftp', 'irc', :relative]}, 'a' => {'href' => ['http', 'https', 'mailto', 'ftp', 'irc', 'apt', :relative]},
'img' => {'src' => ['http', 'https', :relative]} 'img' => {'src' => ['http', 'https', :relative]}
}.freeze }.freeze
@@ -120,12 +120,12 @@ module Gollum
attr_writer :allow_comments attr_writer :allow_comments
def initialize def initialize
@elements = ELEMENTS @elements = ELEMENTS.dup
@attributes = ATTRIBUTES @attributes = ATTRIBUTES.dup
@protocols = PROTOCOLS @protocols = PROTOCOLS.dup
@transformers = TRANSFORMERS @transformers = TRANSFORMERS.dup
@add_attributes = {} @add_attributes = {}
@remove_contents = REMOVE_CONTENTS @remove_contents = REMOVE_CONTENTS.dup
@allow_comments = false @allow_comments = false
@id_prefix = 'wiki-' @id_prefix = 'wiki-'
yield self if block_given? yield self if block_given?
+1 -1
View File
@@ -1 +1 @@
add footer and sidebar Add header.
Binary file not shown.
+1
View File
@@ -1,2 +1,3 @@
0000000000000000000000000000000000000000 7c45b5f16ff3bae2a0063191ef832701214d4df5 rick <technoweenie@gmail.com> 1291942707 -0800 clone: from /Users/rick/p/gollum/test/examples/revert.git 0000000000000000000000000000000000000000 7c45b5f16ff3bae2a0063191ef832701214d4df5 rick <technoweenie@gmail.com> 1291942707 -0800 clone: from /Users/rick/p/gollum/test/examples/revert.git
7c45b5f16ff3bae2a0063191ef832701214d4df5 f403b791119f8232b7cb0ba455c624ac6435f433 rick <technoweenie@gmail.com> 1291942743 -0800 commit: add footer and sidebar 7c45b5f16ff3bae2a0063191ef832701214d4df5 f403b791119f8232b7cb0ba455c624ac6435f433 rick <technoweenie@gmail.com> 1291942743 -0800 commit: add footer and sidebar
f403b791119f8232b7cb0ba455c624ac6435f433 ed6c9f63b98acf73c25b5ffbb38da557d3682023 bootstraponline <cafe@bootstraponline.com> 1336421777 -0600 commit: Add header.
@@ -1,2 +1,3 @@
0000000000000000000000000000000000000000 7c45b5f16ff3bae2a0063191ef832701214d4df5 rick <technoweenie@gmail.com> 1291942707 -0800 clone: from /Users/rick/p/gollum/test/examples/revert.git 0000000000000000000000000000000000000000 7c45b5f16ff3bae2a0063191ef832701214d4df5 rick <technoweenie@gmail.com> 1291942707 -0800 clone: from /Users/rick/p/gollum/test/examples/revert.git
7c45b5f16ff3bae2a0063191ef832701214d4df5 f403b791119f8232b7cb0ba455c624ac6435f433 rick <technoweenie@gmail.com> 1291942743 -0800 commit: add footer and sidebar 7c45b5f16ff3bae2a0063191ef832701214d4df5 f403b791119f8232b7cb0ba455c624ac6435f433 rick <technoweenie@gmail.com> 1291942743 -0800 commit: add footer and sidebar
f403b791119f8232b7cb0ba455c624ac6435f433 ed6c9f63b98acf73c25b5ffbb38da557d3682023 bootstraponline <cafe@bootstraponline.com> 1336421777 -0600 commit: Add header.
@@ -0,0 +1,3 @@
x¥ŽK @]s
.`3ç‰1z”†´‰- âýíÚ­où//·m[‡6D—ÑE4‚ñÑe2€±F0Î…
®$ XéÄJ,œ9©ƒ»ìCW›ÂŒˆsÆšr‚Ää\ö†8{²®’µŠ?ci]§ÖÆ{t>ÚþZwÑ·ÌU?vÊm»k´Ö“Á‚¾‚P§=_‡üWQÏRô"\¤Oê ziN¹
+1 -1
View File
@@ -1 +1 @@
f403b791119f8232b7cb0ba455c624ac6435f433 ed6c9f63b98acf73c25b5ffbb38da557d3682023
+6 -2
View File
@@ -29,13 +29,14 @@ context "Frontend" do
assert_not_equal page_1.version.sha, page_2.version.sha assert_not_equal page_1.version.sha, page_2.version.sha
end end
test "edits page footer and sidebar" do test "edits page header footer and sidebar" do
commits = @wiki.repo.commits('master').size commits = @wiki.repo.commits('master').size
page_1 = @wiki.page('A') page_1 = @wiki.page('A')
header_1 = page_1.header
foot_1 = page_1.footer foot_1 = page_1.footer
side_1 = page_1.sidebar side_1 = page_1.sidebar
post "/edit/A", post "/edit/A", :header => 'header',
:footer => 'footer', :page => "A", :sidebar => 'sidebar', :message => 'def' :footer => 'footer', :page => "A", :sidebar => 'sidebar', :message => 'def'
follow_redirect! follow_redirect!
assert_equal "/A", last_request.fullpath assert_equal "/A", last_request.fullpath
@@ -43,13 +44,16 @@ context "Frontend" do
@wiki.clear_cache @wiki.clear_cache
page_2 = @wiki.page(page_1.name) page_2 = @wiki.page(page_1.name)
header_2 = page_2.header
foot_2 = page_2.footer foot_2 = page_2.footer
side_2 = page_2.sidebar side_2 = page_2.sidebar
assert_equal page_1.raw_data, page_2.raw_data assert_equal page_1.raw_data, page_2.raw_data
assert_equal 'header', header_2.raw_data
assert_equal 'footer', foot_2.raw_data assert_equal 'footer', foot_2.raw_data
assert_equal 'def', foot_2.version.message assert_equal 'def', foot_2.version.message
assert_not_equal foot_1.version.sha, foot_2.version.sha assert_not_equal foot_1.version.sha, foot_2.version.sha
assert_not_equal header_1.version.sha, header_2.version.sha
assert_equal 'sidebar', side_2.raw_data assert_equal 'sidebar', side_2.raw_data
assert_equal 'def', side_2.version.message assert_equal 'def', side_2.version.message
+7
View File
@@ -495,6 +495,13 @@ np.array([[2,2],[1,3]],np.float)
compare(content, output) compare(content, output)
end 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 test "removes style blocks completely" do
content = "<style>body { color: red }</style>foobar" content = "<style>body { color: red }</style>foobar"
output = "<p>foobar</p>" output = "<p>foobar</p>"