add Page _Sidebars

This commit is contained in:
rick
2010-12-02 18:16:37 -08:00
parent 2f648d05b4
commit 2cbe3957cf
40 changed files with 850 additions and 28 deletions
+2
View File
@@ -1,5 +1,7 @@
# HEAD
* Major Enhancements
* Add Page sidebars, similar to Page footers.
* Minor Enhancements
* Add `:sanitization` and `:history_sanitization` options for customizing
how `Sanitize.clean` modifies formatted wiki content.
+10 -2
View File
@@ -55,7 +55,7 @@ module Gollum
# Returns a newly initialized Gollum::Page.
def initialize(wiki)
@wiki = wiki
@blob = nil
@blob = @footer = @sidebar = nil
end
# Public: The on-disk filename of the page including extension.
@@ -196,7 +196,14 @@ module Gollum
#
# Returns the footer Page or nil if none exists.
def footer
find_sub_page :footer
@footer ||= find_sub_page(:footer)
end
# Public: The sidebar Page.
#
# Returns the sidebar Page or nil if none exists.
def sidebar
@sidebar ||= find_sub_page(:sidebar)
end
# Gets a Boolean determining whether this page is a historical version.
@@ -352,6 +359,7 @@ module Gollum
#
# Returns the Page or nil if none exists.
def find_sub_page(name)
return nil if self.filename =~ /^_/
name = "_#{name.to_s.capitalize}"
return nil if page_match(name, self.filename)
+1
View File
@@ -0,0 +1 @@
add sidebars
+8 -1
View File
@@ -1,5 +1,12 @@
[core]
repositoryformatversion = 0
filemode = true
bare = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = /Users/rick/p/gollum/test/examples/lotr.git
[branch "master"]
remote = origin
merge = refs/heads/master
@@ -1,7 +1,7 @@
#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by git-commit with one argument, the name of the file
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit. The hook is allowed to edit the commit message file.
@@ -5,4 +5,4 @@
#
# To enable this hook, rename this file to "post-update".
exec git-update-server-info
exec git update-server-info
@@ -1,13 +1,13 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by git-commit with no arguments. The hook should
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git-rev-parse --verify HEAD >/dev/null 2>&1
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
+10 -10
View File
@@ -2,7 +2,7 @@
#
# Copyright (c) 2006, 2008 Junio C Hamano
#
# The "pre-rebase" hook is run just before "git-rebase" starts doing
# The "pre-rebase" hook is run just before "git rebase" starts doing
# its job, and can prevent the command from running by exiting with
# non-zero status.
#
@@ -43,7 +43,7 @@ git show-ref -q "$topic" || {
}
# Is topic fully merged to master?
not_in_master=`git-rev-list --pretty=oneline ^master "$topic"`
not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
if test -z "$not_in_master"
then
echo >&2 "$topic is fully merged to master; better remove it."
@@ -51,11 +51,11 @@ then
fi
# Is topic ever merged to next? If so you should not be rebasing it.
only_next_1=`git-rev-list ^master "^$topic" ${publish} | sort`
only_next_2=`git-rev-list ^master ${publish} | sort`
only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
only_next_2=`git rev-list ^master ${publish} | sort`
if test "$only_next_1" = "$only_next_2"
then
not_in_topic=`git-rev-list "^$topic" master`
not_in_topic=`git rev-list "^$topic" master`
if test -z "$not_in_topic"
then
echo >&2 "$topic is already up-to-date with master"
@@ -64,8 +64,8 @@ then
exit 0
fi
else
not_in_next=`git-rev-list --pretty=oneline ^${publish} "$topic"`
perl -e '
not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
/usr/bin/perl -e '
my $topic = $ARGV[0];
my $msg = "* $topic has commits already merged to public branch:\n";
my (%not_in_next) = map {
@@ -157,13 +157,13 @@ B to be deleted.
To compute (1):
git-rev-list ^master ^topic next
git-rev-list ^master next
git rev-list ^master ^topic next
git rev-list ^master next
if these match, topic has not merged in next at all.
To compute (2):
git-rev-list master..topic
git rev-list master..topic
if this is empty, it is fully merged to "master".
@@ -1,7 +1,7 @@
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by git-commit with the name of the file that has the
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
@@ -22,10 +22,10 @@
case "$2,$3" in
merge,)
perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
/usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
# ,|template,)
# perl -i.bak -pe '
# /usr/bin/perl -i.bak -pe '
# print "\n" . `git diff --cached --name-status -r`
# if /^#/ && $first++ == 0' "$1" ;;
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/sh
#
# An example hook script to blocks unannotated tags from entering.
# Called by git-receive-pack with arguments: refname sha1-old sha1-new
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
#
# To enable this hook, rename this file to "update".
#
@@ -64,7 +64,7 @@ zero="0000000000000000000000000000000000000000"
if [ "$newrev" = "$zero" ]; then
newrev_type=delete
else
newrev_type=$(git-cat-file -t $newrev)
newrev_type=$(git cat-file -t $newrev)
fi
case "$refname","$newrev_type" in
Binary file not shown.
+1 -1
View File
@@ -1,4 +1,4 @@
# git-ls-files --others --exclude-from=.git/info/exclude
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
-1
View File
@@ -1 +0,0 @@
d61c3de65957b5997c236393b3ad4d70b5cd8931 refs/heads/master
+2
View File
@@ -0,0 +1,2 @@
0000000000000000000000000000000000000000 60f12f4254f58801b9ee7db7bca5fa8aeefaa56b rick <technoweenie@gmail.com> 1291341857 -0800 clone: from /Users/rick/p/gollum/test/examples/lotr.git
60f12f4254f58801b9ee7db7bca5fa8aeefaa56b a8ad3c09dd842a3517085bfadd37718856dee813 rick <technoweenie@gmail.com> 1291341922 -0800 commit: add sidebars
@@ -0,0 +1,2 @@
0000000000000000000000000000000000000000 60f12f4254f58801b9ee7db7bca5fa8aeefaa56b rick <technoweenie@gmail.com> 1291341857 -0800 clone: from /Users/rick/p/gollum/test/examples/lotr.git
60f12f4254f58801b9ee7db7bca5fa8aeefaa56b a8ad3c09dd842a3517085bfadd37718856dee813 rick <technoweenie@gmail.com> 1291341922 -0800 commit: add sidebars
+1 -1
View File
@@ -1,2 +1,2 @@
# pack-refs with: peeled
d61c3de65957b5997c236393b3ad4d70b5cd8931 refs/heads/master
60f12f4254f58801b9ee7db7bca5fa8aeefaa56b refs/remotes/origin/master
+1 -1
View File
@@ -1 +1 @@
60f12f4254f58801b9ee7db7bca5fa8aeefaa56b
a8ad3c09dd842a3517085bfadd37718856dee813
@@ -0,0 +1 @@
ref: refs/remotes/origin/master
+13
View File
@@ -0,0 +1,13 @@
# Bilbo Baggins
Bilbo Baggins is the protagonist of The [[Hobbit]] and also makes a few
appearances in The Lord of the Rings, two of the most well-known of [[J. R. R.
Tolkien]]'s fantasy writings. The story of The Hobbit featuring Bilbo is also
retold from a different perspective in the Chapter The Quest of Erebor in
Unfinished Tales.
In Tolkien's narrative conceit, in which all the writings of Middle-earth are
'really' translations from the fictitious volume of The Red Book of Westmarch,
Bilbo is the author of The Hobbit and translator of The Silmarillion.
From [http://en.wikipedia.org/wiki/Bilbo_Baggins](http://en.wikipedia.org/wiki/Bilbo_Baggins).
+3
View File
@@ -0,0 +1,3 @@
FirstName,LastName
Bilbo,Baggins
Frodo,Baggins
1 FirstName LastName
2 Bilbo Baggins
3 Frodo Baggins
+3
View File
@@ -0,0 +1,3 @@
h1. The LOTR Wiki
This wiki is awesome. You can learn about [[Bilbo Baggins]] or some [[evil|Eye Of Sauron]] stuff.
@@ -0,0 +1,37 @@
# Eye **Of** Sauron
Here are some pictures of the Eye of Sauron!
Just the photo.
[[/Mordor/eye.jpg]]
With alt.
[[/Mordor/eye.jpg|alt=Eye of Sauron]]
With frame and caption.
[[/Mordor/eye.jpg|frame|alt=Eye of Sauron]]
Align left.
[[/Mordor/eye.jpg|align=left]]
Alight center.
[[/Mordor/eye.jpg|align=center]]
Alight right.
[[/Mordor/eye.jpg|align=right]]
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas interdum velit eu justo rutrum vitae semper urna porttitor. Sed viverra bibendum tincidunt. Curabitur vel mi sed nisl vestibulum lobortis eu ac nisl. Morbi fringilla adipiscing felis. Mauris luctus interdum accumsan. Integer leo mauris, dapibus a sollicitudin non, varius non erat. Donec eu dictum orci. Morbi viverra eleifend felis, et adipiscing neque consequat a. Vestibulum accumsan ligula suscipit mi rhoncus ac gravida lectus tincidunt. Donec interdum, [[/Mordor/eye.jpg|float|frame|alt=FIRE FIRE FIRE]] lorem sed interdum molestie, est ipsum pharetra est, sit amet eleifend purus eros at ligula. Aliquam erat volutpat. Sed dignissim interdum ipsum, et pulvinar lectus faucibus et. Ut at lacus risus, non lobortis erat. Proin malesuada sagittis mauris, in posuere turpis tincidunt eu. Nunc accumsan, ligula ut rutrum aliquet, neque metus suscipit ligula, in aliquam augue velit vel orci. Aliquam diam lectus, posuere id faucibus sed, aliquam vel erat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas interdum velit eu justo rutrum vitae semper urna porttitor. Sed viverra bibendum tincidunt. Curabitur vel mi sed nisl vestibulum lobortis eu ac nisl. Morbi fringilla adipiscing felis. Mauris luctus interdum accumsan. Integer leo mauris, dapibus a sollicitudin non, varius non erat. Donec eu dictum orci. [[/Mordor/eye.jpg|float|align=right]] Morbi viverra eleifend felis, et adipiscing neque consequat a. Vestibulum accumsan ligula suscipit mi rhoncus ac gravida lectus tincidunt. Donec interdum, lorem sed interdum molestie, est ipsum pharetra est, sit amet eleifend purus eros at ligula. Aliquam erat volutpat. Sed dignissim interdum ipsum, et pulvinar lectus faucibus et. Ut at lacus risus, non lobortis erat. Proin malesuada sagittis mauris, in posuere turpis tincidunt eu. Nunc accumsan, ligula ut rutrum aliquet, neque metus suscipit ligula, in aliquam augue velit vel orci. Aliquam diam lectus, posuere id faucibus sed, aliquam vel erat.
Smaller width.
[[/Mordor/eye.jpg|width=100px]]
Smaller height.
[[/Mordor/eye.jpg|height=100px]]
+1
View File
@@ -0,0 +1 @@
Ones does not simply **walk** into Mordor!
+1
View File
@@ -0,0 +1 @@
Ones does not simply **walk** into Mordor!
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

+1
View File
@@ -0,0 +1 @@
[ ] Write section on Ents
+1
View File
@@ -0,0 +1 @@
One ring to rule them all!
+1
View File
@@ -0,0 +1 @@
Lord of the Rings wiki
+1
View File
@@ -0,0 +1 @@
Lord of the Rings wiki
+41
View File
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/gollum.css" media="all">
<link rel="stylesheet" type="text/css" href="css/template.css" media="all">
<title>Bilbo Baggins</title>
</head>
<body>
<div id="wiki-wrapper" class="page">
<div id="wiki-content">
<div class="wrap">
<div id="wiki-body">
<div id="template">
<h1>Bilbo Baggins</h1>
<p>Bilbo Baggins is the protagonist of The <a class="internal absent" href="Hobbit.html">Hobbit</a> and also makes a few
appearances in The Lord of the Rings, two of the most well-known of <a class="internal absent" href="J.-R.-R.%0ATolkien.html">J. R. R.
Tolkien</a>'s fantasy writings. The story of The Hobbit featuring Bilbo is also
retold from a different perspective in the Chapter The Quest of Erebor in
Unfinished Tales.</p>
<p>In Tolkien's narrative conceit, in which all the writings of Middle-earth are
'really' translations from the fictitious volume of The Red Book of Westmarch,
Bilbo is the author of The Hobbit and translator of The Silmarillion.</p>
<p>From <a href="http://en.wikipedia.org/wiki/Bilbo_Baggins">http://en.wikipedia.org/wiki/Bilbo_Baggins</a>.</p>
</div>
</div>
</div>
</div>
<div id="footer">
<p id="last-edit">Last edited by <b>rick</b>, 2010-08-04 15:41:53</p>
</div>
</div>
</body>
</html>
+65
View File
@@ -0,0 +1,65 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/gollum.css" media="all">
<link rel="stylesheet" type="text/css" href="css/template.css" media="all">
<title>Eye Of Sauron</title>
</head>
<body>
<div id="wiki-wrapper" class="page">
<div id="wiki-content">
<div class="wrap">
<div id="wiki-body">
<div id="template">
<h1>Eye <strong>Of</strong> Sauron</h1>
<p>Here are some pictures of the Eye of Sauron!</p>
<p>Just the photo.</p>
<p><img src="/Mordor/eye.jpg" /></p>
<p>With alt.</p>
<p><img src="/Mordor/eye.jpg" alt="Eye of Sauron" /></p>
<p>With frame and caption.</p>
<p><span class="frame"><span><img src="/Mordor/eye.jpg" alt="Eye of Sauron" /><span>Eye of Sauron</span></span></span></p>
<p>Align left.</p>
<p><span class="align-left"><span><img src="/Mordor/eye.jpg" /></span></span></p>
<p>Alight center.</p>
<p><span class="align-center"><span><img src="/Mordor/eye.jpg" /></span></span></p>
<p>Alight right.</p>
<p><span class="align-right"><span><img src="/Mordor/eye.jpg" /></span></span></p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas interdum velit eu justo rutrum vitae semper urna porttitor. Sed viverra bibendum tincidunt. Curabitur vel mi sed nisl vestibulum lobortis eu ac nisl. Morbi fringilla adipiscing felis. Mauris luctus interdum accumsan. Integer leo mauris, dapibus a sollicitudin non, varius non erat. Donec eu dictum orci. Morbi viverra eleifend felis, et adipiscing neque consequat a. Vestibulum accumsan ligula suscipit mi rhoncus ac gravida lectus tincidunt. Donec interdum, <span class="float-left frame"><span><img src="/Mordor/eye.jpg" alt="FIRE FIRE FIRE" /><span>FIRE FIRE FIRE</span></span></span> lorem sed interdum molestie, est ipsum pharetra est, sit amet eleifend purus eros at ligula. Aliquam erat volutpat. Sed dignissim interdum ipsum, et pulvinar lectus faucibus et. Ut at lacus risus, non lobortis erat. Proin malesuada sagittis mauris, in posuere turpis tincidunt eu. Nunc accumsan, ligula ut rutrum aliquet, neque metus suscipit ligula, in aliquam augue velit vel orci. Aliquam diam lectus, posuere id faucibus sed, aliquam vel erat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas interdum velit eu justo rutrum vitae semper urna porttitor. Sed viverra bibendum tincidunt. Curabitur vel mi sed nisl vestibulum lobortis eu ac nisl. Morbi fringilla adipiscing felis. Mauris luctus interdum accumsan. Integer leo mauris, dapibus a sollicitudin non, varius non erat. Donec eu dictum orci. <span class="float-right"><span><img src="/Mordor/eye.jpg" /></span></span> Morbi viverra eleifend felis, et adipiscing neque consequat a. Vestibulum accumsan ligula suscipit mi rhoncus ac gravida lectus tincidunt. Donec interdum, lorem sed interdum molestie, est ipsum pharetra est, sit amet eleifend purus eros at ligula. Aliquam erat volutpat. Sed dignissim interdum ipsum, et pulvinar lectus faucibus et. Ut at lacus risus, non lobortis erat. Proin malesuada sagittis mauris, in posuere turpis tincidunt eu. Nunc accumsan, ligula ut rutrum aliquet, neque metus suscipit ligula, in aliquam augue velit vel orci. Aliquam diam lectus, posuere id faucibus sed, aliquam vel erat.</p>
<p>Smaller width.</p>
<p><img src="/Mordor/eye.jpg" width="100px" /></p>
<p>Smaller height.</p>
<p><img src="/Mordor/eye.jpg" height="100px" /></p>
</div>
</div>
</div>
</div>
<div id="footer">
<p id="last-edit">Last edited by <b>rick</b>, 2010-08-04 15:41:53</p>
</div>
</div>
</body>
</html>
+29
View File
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/gollum.css" media="all">
<link rel="stylesheet" type="text/css" href="css/template.css" media="all">
<title>My Precious</title>
</head>
<body>
<div id="wiki-wrapper" class="page">
<div id="wiki-content">
<div class="wrap">
<div id="wiki-body">
<div id="template">
<p>One ring to rule them all!</p>
</div>
</div>
</div>
</div>
<div id="footer">
<p id="last-edit">Last edited by <b>rick</b>, 2010-08-04 15:41:53</p>
</div>
</div>
</body>
</html>
+408
View File
@@ -0,0 +1,408 @@
/*
gollum.css
A basic stylesheet for Gollum
*/
/* @section core */
body, html {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 10px; /* -> 1em */
margin: 0;
padding: 0;
}
#wiki-wrapper {
margin: 0 auto;
overflow: visible;
width: 80%;
}
a:link {
color: #4183c4;
text-decoration: none;
}
a:hover, a:visited {
text-decoration: underline;
}
/* @section head */
#head {
border-bottom: 1px solid #ccc;
margin: 4.5em 0 0.5em;
padding: 0.5em 0;
overflow: hidden;
}
#head h1 {
font-size: 3.3em;
float: left;
line-height: normal;
margin: 0;
padding: 0.08em 0 0 0;
}
#head ul.actions {
float: right;
}
/* @section content */
#wiki-content {
height: 1%;
overflow: visible;
}
#wiki-content .wrap {
height: 1%;
overflow: auto;
}
/* @section comments */
#wiki-body #inline-comment {
display: none; /* todo */
}
/* @section body */
#wiki-body {
float: left;
margin-right: 3%;
width: 70%;
}
/* @section rightbar */
#wiki-rightbar {
float: right;
width: 27%;
}
#wiki-rightbar #nav {
background-color: #f7f7f7;
border: 1px solid #ddd;
margin-top: 1.5em;
padding: 1em;
border-radius: 0.5em;
-moz-border-radius: 0.5em;
-webkit-border-radius: 0.5em;
}
#wiki-rightbar #nav {
font-size: 1.2em;
line-height: 1.5em;
}
#wiki-rightbar #nav p.parent {
border-bottom: 1px solid #bbb;
font-weight: bold;
margin: 0 0 0.5em 0;
padding: 0 0 0.5em 0;
text-shadow: 0 1px 0 #fff;
}
/* Back arrow */
#wiki-rightbar #nav p.parent:before {
color: #666;
content: "← ";
}
#wiki-rightbar #nav h3 {
font-size: 1.2em;
color: #333;
margin: 1.2em 0 0;
padding: 0;
text-shadow: 0 1px 0 #fff;
}
#wiki-rightbar #nav ul {
margin: 0.5em 0 1em;
padding: 0;
}
#wiki-rightbar #nav ul li {
color: #bbb;
list-style-position: outside;
list-style-type: none;
margin: 0 0 0 1em;
padding: 0;
line-height: 1.75em;
}
#wiki-rightbar #nav ul li:hover {
list-style-type: square;
}
#wiki-rightbar #nav ul li a {
font-weight: bold;
text-shadow: 0 1px 0 #fff;
}
/* @section footer */
#wiki-footer {
clear: both;
margin: 2em 0 5em;
}
.has-rightbar #wiki-footer {
width: 70%;
}
#wiki-footer #footer-content {
background-color: #f7f7f7;
border: 1px solid #ddd;
font-size: 1.2em;
line-height: 1.5em;
margin-top: 1.5em;
padding: 1em;
border-radius: 0.5em;
-moz-border-radius: 0.5em;
-webkit-border-radius: 0.5em;
}
#wiki-footer #footer-content h3 {
font-size: 1.2em;
color: #333;
margin: 0;
padding: 0 0 0.2em;
text-shadow: 0 1px 0 #fff;
}
#wiki-footer #footer-content p {
margin: 0.5em 0 0;
padding: 0;
}
#wiki-footer #footer-content ul.links {
margin: 0.5em 0 0;
overflow: hidden;
padding: 0;
}
#wiki-footer #footer-content ul.links li {
color: #999;
float: left;
list-style-position: inside;
list-style-type: square;
padding: 0;
margin-left: 0.75em;
}
#wiki-footer #footer-content ul.links li a {
font-weight: bold;
text-shadow: 0 1px 0 #fff;
}
#wiki-footer #footer-content ul.links li:first-child {
list-style-type: none;
margin: 0;
}
.ff #wiki-footer #footer-content ul.links li:first-child {
margin: 0 -0.75em 0 0;
}
/* @section page-footer */
.page #footer {
border-top: 1px solid #ccc;
margin: 1em 0 7em;
}
#footer p#last-edit {
font-size: 1.2em;
line-height: 1.6em;
color: #999;
margin: 0.9em 0;
}
#footer p#last-edit span.username {
font-weight: bold;
}
/* @section history */
.history h1 {
color: #999;
font-weight: normal;
}
.history h1 strong {
color: #000;
font-weight: bold;
}
#wiki-history {
margin-top: 3em;
}
#wiki-history fieldset {
border: 0;
margin: 2em 0;
padding: 0;
}
#wiki-history table, #wiki-history tbody {
border-collapse: collapse;
padding: 0;
margin: 0;
width: 100%;
}
#wiki-history table tr {
padding: 0;
margin: 0;
}
#wiki-history table tr {
background-color: #ebf2f6;
}
#wiki-history table tr td {
border: 1px solid #c0dce9;
font-size: 1.2em;
line-height: 1.6em;
margin: 0;
padding: 0.3em 0.7em;
}
#wiki-history table tr td.checkbox {
padding: 0.3em;
}
#wiki-history table tr td.checkbox input {
cursor: pointer;
display: block;
padding-right: 0;
padding-top: 0.4em;
margin-right: -0.2em;
}
#wiki-history table tr:nth-child(2n),
#wiki-history table tr.alt-row {
background-color: #f3f7fa;
}
#wiki-history table tr.selected {
background-color: #ffffea !important;
z-index: 100;
}
#wiki-history table tr td.commit-name {
border-right: none;
}
#wiki-history table tr td.commit-name span.time-elapsed {
color: #999;
}
#wiki-history table tr td.author {
width: 20%;
}
#wiki-history table tr td.author a {
color: #000;
font-weight: bold;
}
#wiki-history table tr td.author a span.username {
display: block;
padding-top: 3px;
}
#wiki-history table tr td img {
background-color: #fff;
border: 1px solid #999;
display: block;
float: left;
height: 18px;
overflow: hidden;
margin: 0 0.5em 0 0;
width: 18px;
padding: 2px;
}
#wiki-history table tr td.commit-name a {
font-size: 0.9em;
font-family: 'Monaco', 'Andale Mono', Consolas, 'Courier New', monospace;
padding: 0 0.2em;
}
#wiki-history table tr td.revert-action {
border-left: 0;
text-align: right;
}
#wiki-history table tr td.revert-action a {
font-weight: bold;
}
#wiki-history table tr td.revert-action a span {
font-size: 0.9em;
font-family: 'Monaco', 'Andale Mono', Consolas, 'Courier New', monospace;
}
.history #wiki-history ul.actions li,
.history #footer ul.actions li {
margin: 0 0.6em 0 0;
}
/* @section edit */
.edit h1 {
color: #999;
font-weight: normal;
}
.edit h1 strong {
color: #000;
font-weight: bold;
}
/* @control minibutton */
ul.actions {
display: block;
list-style-type: none;
overflow: hidden;
padding: 0;
}
ul.actions li {
float: left;
font-size: 1.2em;
margin-left: 0.6em;
}
.minibutton a {
background-color: #f7f7f7;
border: 1px solid #d4d4d4;
color: #333;
display: block;
font-weight: bold;
margin: 0;
padding: 0.4em 1em;
text-shadow: 0 1px 0 #fff;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f4f4f4', endColorstr='#ececec');
background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec));
background: -moz-linear-gradient(top, #f4f4f4, #ececec);
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
.minibutton a:hover {
background: #3072b3;
border-color: #518cc6 #518cc6 #2a65a0;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
text-decoration: none;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#599bdc', endColorstr='#3072b3');
background: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3));
background: -moz-linear-gradient(top, #599bdc, #3072b3);
}
+146
View File
@@ -0,0 +1,146 @@
/*
template.css
Wiki content formatting
Keeping this file separate so it can be easily swapped out if you
want to format your wiki content differently from the default.
*/
#template {
margin-bottom: 4em; /* Give it some breathing room */
}
.has-footer #template {
margin: 0;
}
#template p {
font-size: 1.4em;
line-height: 1.6em;
}
/* See http://webtypography.net/Rhythm_and_Proportion/ */
#template p + p {
margin: -0.75em 0 0;
text-indent: 1em;
}
/* Everybody loves type ornaments */
#template p:last-child:after {
color: #999;
content: " ❈";
font-size: 0.8em;
}
#template blockquote p:last-child:after {
content: none;
}
#template a:link {
color: #4183c4;
text-decoration: none;
}
#template a:hover, #template a:visited {
text-decoration: underline;
}
#template ul, #template ol {
margin: 1.0em 0 0 2.0em;
list-style-position: outside;
padding: 0;
}
#template p + ul, #template p + ol,
#template ul li > ul, #template ol li > ol {
margin-top: 0;
}
#template ul li > ul, #template ol li > ol {
margin-left: 0;
}
#template ul {
list-style-type: square;
}
#template ol li > ol li {
font-size: 1.0em !important;
list-style-type: lower-roman;
list-style-position: inside;
}
#template ol li > ol li > ol li {
list-style-type: lower-alpha;
}
#template ol li > ol li > ol li > ol li {
list-style-type: lower-greek;
}
#template ul li, #template ol li {
font-size: 1.4em;
line-height: 1.6em;
padding-top: 0.1em; /* Line up ordinals */
}
#template blockquote {
margin: 0 4.0em 0 2.0em;
padding: 0;
}
#template blockquote p {
color: #888;
font-style: italic;
}
/* Headings */
#template h1, #template h2, #template h3,
#template h4, #template h5, #template h6 {
margin: 0;
padding: 0.5em 0 0;
}
#template h1 {
font-size: 2.6em;
font-weight: bold;
}
#template h2 {
font-size: 2.2em;
font-weight: bold;
}
#template h3 {
font-size: 2.0em;
font-weight: bold;
}
#template h4 {
font-size: 1.8em;
font-weight: bold;
}
#template h5 {
font-size: 1.6em;
font-weight: bold;
}
#template h6 {
font-size: 1.4em;
font-weight: bold;
margin-top: 1.0em;
text-transform: uppercase; /* all caps */
}
/* Code-related */
#template p code {
background-color: #f7f7f7;
border: 1px solid #ddd;
color: #222; /* This is a little heavy when #000 */
font-family: Consolas, Monaco, "Courier New", monospace;
padding: 0.15em 0.3em;
}
+30
View File
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/gollum.css" media="all">
<link rel="stylesheet" type="text/css" href="css/template.css" media="all">
<title>The LOTR Wiki</title>
</head>
<body>
<div id="wiki-wrapper" class="page">
<div id="wiki-content">
<div class="wrap">
<div id="wiki-body">
<div id="template">
<h1>The <span class="caps">LOTR</span> Wiki</h1>
<p>This wiki is awesome. You can learn about <a class="internal present" href="Bilbo-Baggins.html">Bilbo Baggins</a> or some <a class="internal present" href="Eye-Of-Sauron.html">evil</a> stuff.</p>
</div>
</div>
</div>
</div>
<div id="footer">
<p id="last-edit">Last edited by <b>rick</b>, 2010-08-04 15:41:53</p>
</div>
</div>
</body>
</html>
+2 -2
View File
@@ -25,9 +25,9 @@ context "GitAccess" do
assert @access.ref_map.empty?
assert @access.tree_map.empty?
@access.tree 'master'
assert_equal({"master"=>"60f12f4254f58801b9ee7db7bca5fa8aeefaa56b"}, @access.ref_map)
assert_equal({"master"=>"a8ad3c09dd842a3517085bfadd37718856dee813"}, @access.ref_map)
map = @access.tree_map['60f12f4254f58801b9ee7db7bca5fa8aeefaa56b']
map = @access.tree_map['a8ad3c09dd842a3517085bfadd37718856dee813']
assert_equal 'Bilbo-Baggins.md', map[0].path
assert_equal '', map[0].dir
assert_equal map[0].path, map[0].name
+19
View File
@@ -109,6 +109,25 @@ context "Page" do
test "footer itself" do
footer = @wiki.page("_Footer")
assert_nil footer.footer
assert_nil footer.sidebar
end
test "top level sidebar" do
sidebar = @wiki.page('Home').sidebar
assert_equal 'Lord of the Rings wiki', sidebar.raw_data
assert_equal '_Sidebar.md', sidebar.path
end
test "nested sidebar" do
sidebar = @wiki.page('Eye Of Sauron').sidebar
assert_equal "Ones does not simply **walk** into Mordor!\n", sidebar.raw_data
assert_equal "Mordor/_Sidebar.md", sidebar.path
end
test "sidebar itself" do
sidebar = @wiki.page("_Sidebar")
assert_nil sidebar.footer
assert_nil sidebar.sidebar
end
test "cannot convert non string to human readable page title" do