Goodbye, scratch directory

This commit is contained in:
Eston Bond
2010-12-13 14:35:05 -08:00
parent 8b032f03f2
commit 9004e21d93
18 changed files with 0 additions and 9321 deletions
-18
View File
@@ -1,18 +0,0 @@
* Editor
* Get MathJax running
* Fix up regexes
* Figure out why Dialogs won't fire in IE7 (likely a css issue)
HIERARCHY
_Footer.md
_Sidebar.md
Page1.md
projects/
Page2.md (uses root sidebar)
_Footer.md
experiments/
_Sidebar.md
Page3.md (uses footer.md)
Images work the same way. You can keep similar pages in a directory with their own images.
-303
View File
@@ -1,303 +0,0 @@
/*
editor.css
Wiki editor formatting
*/
#gollum-editor {
border: 1px solid #e4e4e4;
background: #f9f9f9;
margin: 1em 0 5em;
overflow: hidden;
padding: 1em;
border-radius: 1em;
-moz-border-radius: 1em;
-webkit-border-radius: 1em;
}
#gollum-editor form fieldset {
border: 0;
margin: 0;
padding: 0;
width: 100%;
}
/* @control editor-view-tab */
#gollum-editor #gollum-editor-type-switcher {
display: none;
}
/* @control function-bar */
#gollum-editor #gollum-editor-function-bar {
border-bottom: 1px solid #ddd;
overflow: hidden;
padding: 0 0 0.5em 0;
display: none;
}
#gollum-editor #gollum-editor-function-bar.active {
display: block;
}
#gollum-editor #gollum-editor-function-bar a.function-button {
background: #f7f7f7;
border: 1px solid #ddd;
color: #333;
display: block;
float: left;
height: 25px;
overflow: hidden;
margin: 0.2em 0.5em 0 0;
/* text-indent: -5000px; */
text-shadow: 0 1px 0 #fff;
width: 25px;
border-radius: 0.3em;
-moz-border-radius: 0.3em;
-webkit-border-radius: 0.3em;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f4f4f4', endColorstr='#ececec');
background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec));
background: -moz-linear-gradient(top, #f4f4f4, #ececec);
}
#gollum-editor #gollum-editor-function-bar a.function-button:hover {
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
text-decoration: none;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#599bdc', endColorstr='#3072b3');
background: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3));
background: -moz-linear-gradient(top, #599bdc, #3072b3);
}
#gollum-editor #gollum-editor-function-bar a span {
background-image: url(../images/icon-sprite.png);
background-repeat: no-repeat;
display: block;
height: 25px;
overflow: hidden;
text-indent: -5000px;
width: 25px;
}
a#function-bold span { background-position: 0 0; }
a#function-italic span { background-position: -27px 0; }
a#function-underline span { background-position: -54px 0; }
a#function-code span { background-position: -82px 0; }
a#function-ul span { background-position: -109px 0; }
a#function-ol span { background-position: -136px 0; }
a#function-blockquote span { background-position: -163px 0; }
a#function-hr span { background-position: -190px 0; }
a#function-h1 span { background-position: -217px 0; }
a#function-h2 span { background-position: -244px 0; }
a#function-h3 span { background-position: -271px 0; }
a#function-link span { background-position: -298px 0; }
a#function-image span { background-position: -324px 0; }
a#function-bold:hover span { background-position: 0 -28px; }
a#function-italic:hover span { background-position: -27px -28px; }
a#function-underline:hover span { background-position: -54px -28px; }
a#function-code:hover span { background-position: -82px -28px; }
a#function-ul:hover span { background-position: -109px -28px; }
a#function-ol:hover span { background-position: -136px -28px; }
a#function-blockquote:hover span { background-position: -163px -28px; }
a#function-hr:hover span { background-position: -190px -28px; }
a#function-h1:hover span { background-position: -217px -28px; }
a#function-h2:hover span { background-position: -244px -28px; }
a#function-h3:hover span { background-position: -271px -28px; }
a#function-link:hover span { background-position: -298px -28px; }
a#function-image:hover span { background-position: -324px -28px; }
#gollum-editor #gollum-editor-function-bar a.disabled {
display: none;
}
#gollum-editor #gollum-editor-function-bar span.function-divider {
display: block;
float: left;
width: 0.5em;
}
#gollum-editor #gollum-editor-function-bar
#gollum-editor-format-selector select {
background-color: #f7f7f7;
border: 1px solid transparent;
float: right;
font-size: 1.1em;
font-weight: bold;
line-height: 1.6em;
padding: 0.5em 0.7em;
margin-bottom: 0;
border-radius: 0.5em;
-moz-border-radius: 0.5em;
-webkit-border-radius: 0.5em;
-moz-outline: none;
}
#gollum-editor #gollum-editor-function-bar
#gollum-editor-format-selector select:hover {
background-color: #fff;
border: 1px solid #ddd;
-moz-outline: none;
}
/* @section form-fields */
#gollum-editor textarea#gollum-editor-body {
background: #fff;
border: 1px solid #ddd;
font-size: 1.3em;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
line-height: 1.8em;
margin: 0.5em 0;
padding: 0.5em; /* I don't really like mixing pct & em here… */
width: 98%;
height: 20em;
}
#gollum-editor input#gollum-editor-submit,
#gollum-editor-dialog a.minibutton,
#gollum-editor-dialog a.minibutton:visited {
background-color: #f7f7f7;
border: 1px solid #d4d4d4;
color: #333;
cursor: pointer;
display: block;
font-size: 1.2em;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: bold;
margin: 0;
padding: 0.4em 1em;
text-shadow: 0 1px 0 #fff;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f4f4f4', endColorstr='#ececec');
background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec));
background: -moz-linear-gradient(top, #f4f4f4, #ececec);
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
#gollum-editor input#gollum-editor-submit:hover,
#gollum-editor-dialog a.minibutton:hover {
background: #3072b3;
border-color: #518cc6 #518cc6 #2a65a0;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
text-decoration: none;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#599bdc', endColorstr='#3072b3');
background: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3));
background: -moz-linear-gradient(top, #599bdc, #3072b3);
}
/* @control dialog */
#gollum-editor-dialog {
display: none;
top: 50%;
left: 50%;
position: absolute;
}
#gollum-editor-dialog.active {
display: block;
}
#gollum-editor-dialog-inner {
background: transparent;
margin: 0 0 0 -225px;
overflow: hidden;
position: relative;
width: 450px;
border: 7px solid rgba(0, 0, 0, 0.3);
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
#gollum-editor-dialog-bg {
background-color: #fff;
overflow: hidden;
padding: 1em;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f7f7f7', endColorstr='#ffffff');
background: -webkit-gradient(linear, left top, left bottom, from(#f7f7f7), to(#ffffff));
background: -moz-linear-gradient(top, #f7f7f7, #ffffff);
}
#gollum-editor-dialog-inner h4 {
border-bottom: 1px solid #ddd;
color: #000;
font-size: 1.8em;
line-height: normal;
font-weight: bold;
margin: 0 0 0.75em 0;
padding: 0 0 0.3em 0;
}
#gollum-editor-dialog-body fieldset {
border: 0;
margin: 0;
padding: 0;
}
#gollum-editor-dialog-body fieldset .field {
margin: 0 0 1.5em 0;
padding: 0;
}
#gollum-editor-dialog-body fieldset .field label {
color: #000;
display: block;
font-size: 1.2em;
font-weight: bold;
line-height: 1.6em;
margin: 0;
padding: 0;
min-width: 80px;
}
#gollum-editor-dialog-body fieldset .field input[type="text"] {
border: 1px solid #ddd;
display: block;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 1.2em;
line-height: 1.6em;
margin: 0.3em 0 0 0;
padding: 0.3em 0.5em;
width: 96.5%;
}
#gollum-editor-dialog-body fieldset .field input.code {
font-family: 'Monaco', 'Courier New', Courier, monospace;
}
#gollum-editor-dialog-body fieldset .field:last-child {
margin: 0 0 1em 0;
}
#gollum-editor-dialog-buttons {
border-top: 1px solid #ddd;
overflow: hidden;
margin: 1.5em 0 0 0;
padding: 1em 0 0 0;
}
#gollum-editor-dialog a.minibutton {
float: right;
margin-right: 0.5em;
width: auto;
}
-442
View File
@@ -1,442 +0,0 @@
/*
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;
}
/* @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);
}
/* @special error */
#wiki-wrapper.error {
height: 1px;
position: absolute;
overflow: visible;
top: 50%;
width: 100%;
}
#error {
background-color: #f9f9f9;
border: 1px solid #e4e4e4;
left: 50%;
overflow: hidden;
padding: 2%;
margin: -10% 0 0 -35%;
position: absolute;
width: 70%;
border-radius: 0.5em;
-moz-border-radius: 0.5em;
-webkit-border-radius: 0.5em;
}
#error h1 {
font-size: 3em;
line-height: normal;
margin: 0;
padding: 0;
}
#error p {
font-size: 1.2em;
line-height: 1.6em;
margin: 1em 0 0.5em;
padding: 0;
}
View File
-146
View File
@@ -1,146 +0,0 @@
/*
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;
}
-77
View File
@@ -1,77 +0,0 @@
<!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/editor.css" media="all">
<title>Page Name &mdash; Site Name</title>
</head>
<body>
<div id="wiki-wrapper" class="edit">
<div id="head">
<h1>Editing <strong>Page Title</strong></h1>
<ul class="actions">
<li class="minibutton"><a href="javascript:void(0);"
class="action-edit-page">Edit Page</a></li>
<li class="minibutton"><a href="javascript:void(0);"
class="action-page-history">Page History</a></li>
<li class="minibutton" class="action-discussion">
<a href="javascript:void(0);">Discussion <span>(10)<span></a></li>
</ul>
</div>
<div id="wiki-content">
<div class="has-rightbar">
<div id="gollum-editor">
<form name="gollum-editor" action="#" method="post">
<ul id="gollum-editor-type-switcher">
<li><a href="#" id="type-switch-code" class="active">Code</a></li>
<li><a href="#" id="type-switch-rt">Easy Mode</a></li>
</ul>
<div id="gollum-editor-function-bar">
<a href="#" id="function-bold" class="function-button">
<span>Bold</span></a>
<a href="#" id="function-italic" class="function-button">
<span>Italic</span></a>
<a href="#" id="function-code" class="function-button">
<span>Code</span></a>
<span class="function-divider">&nbsp;</span>
<a href="#" id="function-ul" class="function-button">
<span>Unordered List</span></a>
<a href="#" id="function-ol" class="function-button">
<span>Ordered List</span></a>
<a href="#" id="function-blockquote" class="function-button">
<span>Blockquote</span></a>
<a href="#" id="function-hr" class="function-button">
<span>Horizontal Rule</span></a>
<span class="function-divider">&nbsp;</span>
<a href="#" id="function-h1" class="function-button">
<span>h1</span></a>
<a href="#" id="function-h2" class="function-button">
<span>h2</span></a>
<a href="#" id="function-h3" class="function-button">
<span>h3</span></a>
<span class="function-divider">&nbsp;</span>
<a href="#" id="function-link" class="function-button">
<span>Link</span></a>
<a href="#" id="function-image" class="function-button">
<span>Image</span></a>
</div>
<fieldset id="gollum-editor-fields">
<textarea id="gollum-editor-body"
data-markup-lang="markdown"></textarea>
<span class="aural"><br></span>
<input type="submit" id="gollum-editor-submit" value="Save" title="Save current changes">
</fieldset>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/gollum.js"></script>
<script type="text/javascript" src="js/gollum-editor/gollum.editor.js"></script>
<script type="text/javascript" src="js/gollum-editor/langs/markdown.js"></script>
</body>
</html>
-73
View File
@@ -1,73 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/gollum.css" media="all">
<title>Page Name &mdash; Site Name</title>
</head>
<body>
<div id="wiki-wrapper" class="history">
<div id="head">
<h1>History for <strong>Page Title</strong></h1>
<ul class="actions">
<li class="minibutton"><a href="javascript:void(0);"
class="action-edit-page">Edit Page</a></li>
<li class="minibutton"><a href="javascript:void(0);"
class="action-page-history">Page History</a></li>
<li class="minibutton" class="action-discussion">
<a href="javascript:void(0);">Discussion <span>(10)<span></a></li>
</ul>
</div>
<div id="wiki-history">
<ul class="actions">
<li class="minibutton"><a href="javascript:void(0);"
class="action-compare-revision">Compare Revisions</a></li>
</ul>
<form name="compare-versions" method="post" action="#">
<fieldset>
<table>
<tbody>
<tr>
<td class="checkbox">
<input type="checkbox" name="revision" value="sha1">
</td>
<td class="author">
<a href="javascript:void(0)">
<img src="" alt="avatar: username" class="mini-gravatar">
<span class="username">username</span>
</a>
</td>
<td class="commit-name">
<span class="time-elapsed">3 days ago:</span>&nbsp;
Rewrote home page as Markdown&hellip;
[<a href="javascript:void(0);" title="View commit">a45719f&hellip;</a>]
</td>
<td class="revert-action">
<a href="javascript:void(0);" title="Revert to this change">Revert to <span>a45719f&hellip;</span></a>
</td>
</tr>
</tbody>
</table>
</fieldset>
</form>
</div>
<div id="footer">
<ul class="actions">
<li class="minibutton"><a href="javascript:void(0);"
class="action-compare-revision">Compare Revisions</a></li>
<li class="minibutton"><a href="javascript:void(0);"
class="action-back-to-top">Back to Top</a></li>
</ul>
</div>
</div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.color.js"></script>
<script type="text/javascript" src="js/gollum.js"></script>
<script type="text/javascript" src="js/gollum.editor.js"></script>
</body>
</html>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

-603
View File
@@ -1,603 +0,0 @@
/**
* gollum.editor.js
* A jQuery plugin that creates the Gollum Editor.
*
* Usage:
* $.GollumEditor(); on DOM ready.
*/
// (function($) {
// Editor options
var DefaultOptions = {
MarkupType: 'markdown',
EditorMode: 'code',
HasFunctionBar: true,
Debug: true
};
var ActiveOptions = {};
/**
* $.GollumEditor
*
* You don't need to do anything. Just run this on DOM ready.
*/
$.GollumEditor = function( IncomingOptions ) {
ActiveOptions = $.extend( DefaultOptions, IncomingOptions );
debug('GollumEditor loading');
if ( EditorHas.baseEditorMarkup() ) {
// Initialise the function bar by loading proper definitions
if ( EditorHas.functionBar() ) {
var htmlSetMarkupLang =
$('#gollum-editor-body').attr('data-markup-lang');
if ( htmlSetMarkupLang ) {
ActiveOptions.MarkupType = htmlSetMarkupLang;
}
if ( !LanguageDefinition.isLoadedFor(ActiveOptions.MarkupType) ) {
debug('Loading language definition for ' + ActiveOptions.MarkupType);
LanguageDefinition.loadFor( ActiveOptions.MarkupType,
function(data, textStatus) {
if ( textStatus != 'success' ) {
debug('Language definition could not be loaded for markup '
+ 'type ' + ActiveOptions.MarkupType);
return;
}
// activate the function bar
debug('Activating function bar');
FunctionBar.activate();
} );
} else {
// loaded language already
debug('Activating function bar');
FunctionBar.activate();
}
}
// EditorHas.functionBar
}
// EditorHas.baseEditorMarkup
};
/**
* $.GollumEditor.defineLanguage
* Defines a set of language actions that Gollum can use.
* Used by the definitions in langs/ to register language definitions.
*/
$.GollumEditor.defineLanguage = function( language_name, languageObject ) {
if ( typeof languageObject == 'object' )
LanguageDefinition.define( language_name, languageObject );
else
debug('GollumEditor.defineLanguage: definition for ' + language_name
+ ' is not an object');
};
/**
* debug
* Prints debug information to console.log if debug output is enabled.
*
* @param mixed Whatever you want to dump to console.log
* @return void
*/
var debug = function(m) {
if ( ActiveOptions.Debug
&& typeof console != 'undefined'
&& typeof console.log == 'function' ) {
console.log( m );
}
};
/**
* LanguageDefinition
* Language definition file handler
* Loads language definition files as necessary.
*/
var LanguageDefinition = {
_ACTIVE_LANG: '',
_LOADED_LANGS: [],
_LANG: {},
/**
* Defines a language
*
* @param name string The name of the language
* @param name object The definition object
*/
define: function( name, definitionObject ) {
LanguageDefinition._ACTIVE_LANG = name;
LanguageDefinition._LOADED_LANGS.push( name );
LanguageDefinition._LANG[name] = definitionObject;
},
/**
* gets a definition object for a specified attribute
*
* @param string attr The specified attribute.
* @param string specified_lang The language to pull a definition for.
* @return object if exists, null otherwise
*/
getDefinitionFor: function( attr, specified_lang ) {
if ( !specified_lang ) {
specified_lang = LanguageDefinition._ACTIVE_LANG;
}
if ( LanguageDefinition.isLoadedFor(specified_lang) &&
LanguageDefinition._LANG[specified_lang][attr] &&
typeof LanguageDefinition._LANG[specified_lang][attr] == 'object' ) {
return LanguageDefinition._LANG[specified_lang][attr];
}
return null;
},
/**
* loadFor
* Asynchronously loads a definition file for the current markup.
* Definition files are necessary to use the code editor.
*
* @param string markup_name The markup name you want to load
* @return void
*/
loadFor: function( markup_name, on_complete ) {
// attempt to load the definition for this language
var script_uri = 'js/gollum-editor/langs/' + markup_name + '.js';
$.ajax({
url: script_uri,
dataType: 'script',
complete: function( xhr, textStatus ) {
if ( typeof on_complete == 'function' ) {
on_complete( xhr, textStatus );
}
}
});
},
/**
* isLoadedFor
* Checks to see if a definition file has been loaded for the
* specified markup language.
*
* @param string markup_name The name of the markup.
* @return boolean
*/
isLoadedFor: function( markup_name ) {
if ( LanguageDefinition._LOADED_LANGS.length == 0 ) return false;
for ( var i=0; i < LanguageDefinition._LOADED_LANGS.length; i++ ) {
if ( LanguageDefinition._LOADED_LANGS[i] == markup_name )
return true;
}
return false;
}
};
/**
* EditorHas
* Various conditionals to check what features of the Gollum Editor are
* active/operational.
*/
var EditorHas = {
/**
* EditorHas.baseEditorMarkup
* True if the basic editor form is in place.
*
* @return boolean
*/
baseEditorMarkup: function() {
return ( $('#gollum-editor').length &&
$('#gollum-editor-body').length );
},
/**
* EditorHas.functionBar
* True if the Function Bar markup exists.
*
* @return boolean
*/
functionBar: function() {
return ( ActiveOptions.HasFunctionBar &&
$('#gollum-editor-function-bar').length );
},
/**
* EditorHas.ff4Environment
* True if in a Firefox 4.0 Beta environment.
*
* @return boolean
*/
ff4Environment: function() {
var ua = new RegExp(/Firefox\/4.0b/);
return ( ua.test( navigator.userAgent ) );
}
};
/**
* FunctionBar
*
* Things the function bar does.
*/
var FunctionBar = {
isActive: false,
/**
* FunctionBar.activate
* Activates the function bar, attaching all click events
* and displaying the bar.
*
*/
activate: function() {
// check these out
$('#gollum-editor-function-bar a.function-button').each(function() {
if ( LanguageDefinition.getDefinitionFor( $(this).attr('id') ) )
$(this).click( FunctionBar.evtFunctionButtonClick );
else
$(this).addClass('disabled');
});
// show bar as active
$('#gollum-editor-function-bar').addClass( 'active' );
FunctionBar.isActive = true;
},
/**
* FunctionBar.evtFunctionButtonClick
* Event handler for the function buttons. Traps the click and
* executes the proper language action.
*
* @param jQuery.Event jQuery event object.
*/
evtFunctionButtonClick: function(e) {
e.preventDefault();
var def = LanguageDefinition.getDefinitionFor( $(this).attr('id') );
if ( typeof def == 'object' ) {
FunctionBar.executeAction( def );
}
},
/**
* FunctionBar.executeAction
* Executes a language-specific defined action for a function button.
*
*/
executeAction: function( definitionObject ) {
// get the selected text from the textarea
var txt = $('#gollum-editor-body').val();
// hmm, I'm not sure this will work in a textarea
var selPos = FunctionBar
.getFieldSelectionPosition( $('#gollum-editor-body') );
var selText = FunctionBar.getFieldSelection( $('#gollum-editor-body') );
var repText = selText;
var reselect = true;
// execute a replacement function if one exists
if ( definitionObject.exec &&
typeof definitionObject.exec == 'function' ) {
definitionObject.exec ( txt, selText, $('#gollum-editor-body') );
return;
}
// execute a search/replace if they exist
var searchExp = /([^\n]+)/gi;
if ( definitionObject.search &&
typeof definitionObject.search == 'object' ) {
debug('Replacing search Regex');
searchExp = definitionObject.search;
debug( searchExp );
}
// replace text
if ( definitionObject.replace &&
typeof definitionObject.replace == 'string' ) {
debug('Running replacement - using ' + definitionObject.replace);
repText = repText.replace( searchExp, definitionObject.replace );
}
// append if necessary
if ( definitionObject.append &&
typeof definitionObject.append == 'string' ) {
if ( repText == selText ) {
reselect = false;
}
repText += definitionObject.append;
}
if (repText)
FunctionBar.replaceFieldSelection( $('#gollum-editor-body'),
repText, reselect );
},
/**
* getFieldSelectionPosition
* Retrieves the selection range for the textarea.
*
* @return object the .start and .end offsets in the string
*/
getFieldSelectionPosition: function( $field ) {
if ($field.length) {
return {
start: $field[0].selectionStart,
end: $field[0].selectionEnd
}
}
},
/**
* getFieldSelection
* Returns the currently selected substring of the textarea.
*
* @param jQuery A jQuery object for the textarea.
* @return string Selected string.
*/
getFieldSelection: function( $field ) {
var selStr = '';
var selPos;
if ( $field.length ) {
selPos = FunctionBar.getFieldSelectionPosition( $field );
selStr = $field.val().substring( selPos.start, selPos.end );
debug('Selected: ' + selStr + ' (' + selPos.start + ', '
+ selPos.end + ')');
return selStr;
}
return false;
},
/**
* replaceFieldSelection
* Replaces the currently selected substring of the textarea with
* a new string.
*
* @param jQuery A jQuery object for the textarea.
* @param string The string to replace the current selection with.
* @param boolean Reselect the new text range.
*/
replaceFieldSelection: function( $field, replaceText, reselect ) {
var selPos = FunctionBar.getFieldSelectionPosition( $field );
var fullStr = $field.val();
var selectNew = true;
if ( reselect === false) {
var selectNew = false;
}
var scrollTop = null;
if ( $field[0].scrollTop ) {
scrollTop = $field[0].scrollTop;
}
$field.val( fullStr.substring(0, selPos.start) + replaceText +
fullStr.substring(selPos.end));
$field[0].focus();
if ( selectNew && $field[0].setSelectionRange ) {
$field[0].setSelectionRange( selPos.start,
selPos.start + replaceText.length );
}
if ( scrollTop ) {
// this jumps sometimes in FF
$field[0].scrollTop = scrollTop;
}
}
};
/**
* Dialog
* Used by FunctionBar & internally to display editor-specific messages,
* inputs and more.
*
*/
var Dialog = {
markupCreated: false,
attachEvents: function( evtOK ) {
$('#gollum-editor-action-ok').click(function( e ) {
Dialog.eventOK( e, evtOK );
});
$('#gollum-editor-action-cancel').click( Dialog.eventCancel );
},
createFieldMarkup: function( fieldArray ) {
var fieldMarkup = '<fieldset>';
for ( var i=0; i < fieldArray.length; i++ ) {
if ( typeof fieldArray[i] == 'object' ) {
fieldMarkup += '<div class="field">';
switch ( fieldArray[i].type ) {
// only text is supported for now
case 'text':
case 'code':
default:
fieldMarkup += Dialog.createFieldText( fieldArray[i] );
break;
}
fieldMarkup += '</div>';
}
}
fieldMarkup += '</fieldset>';
return fieldMarkup;
},
createFieldText: function( fieldAttributes ) {
var html = '';
if ( fieldAttributes.name ) {
html += '<label';
if ( fieldAttributes.id ) {
html += ' for="' + fieldAttributes.name + '"';
}
html += '>' + fieldAttributes.name + '</label>';
}
html += '<input type="text"';
if ( fieldAttributes.id ) {
html += ' name="' + fieldAttributes.id + '"'
if ( fieldAttributes.type == 'code' ) {
html+= ' class="code"';
}
html += ' id="gollum-editor-dialog-generated-field-' +
fieldAttributes.id + '">';
}
return html;
},
createMarkup: function( title, body ) {
Dialog.markupCreated = true;
return '<div id="gollum-editor-dialog">' +
'<div id="gollum-editor-dialog-inner">' +
'<div id="gollum-editor-dialog-bg">' +
'<div id="gollum-editor-dialog-title"><h4>' +
title +'</h4></div>' +
'<div id="gollum-editor-dialog-body">' + body + '</div>' +
'<div id="gollum-editor-dialog-buttons">' +
'<a href="#" title="Cancel" id="gollum-editor-action-cancel" ' +
'class="minibutton">Cancel</a>' +
'<a href="#" title="OK" id="gollum-editor-action-ok" '+
'class="minibutton">OK</a>' +
'</div>' +
'</div>' +
'</div>';
},
eventCancel: function( e ) {
e.preventDefault();
debug('Cancelled dialog.');
Dialog.hide();
},
eventOK: function( e, evtOK ) {
e.preventDefault();
var results = [];
// get the results from each field and build them into the object
$('#gollum-editor-dialog-body input').each(function() {
results[$(this).attr('name')] = $(this).val();
});
// pass them to evtOK if it exists (which it should)
if ( evtOK &&
typeof evtOK == 'function' ) {
evtOK( results );
}
Dialog.hide();
},
hide: function() {
$('#gollum-editor-dialog').animate({ opacity: 0 }, {
duration: 200,
complete: function() {
$('#gollum-editor-dialog').removeClass('active');
}
});
},
init: function( argObject ) {
var title = '';
var body = '';
// bail out if necessary
if ( !argObject ||
typeof argObject != 'object' ) {
debug('Editor Dialog: Cannot init; invalid init object');
return;
}
// alright, build out fields
if ( argObject.fields && typeof argObject.fields == 'object' ) {
body = Dialog.createFieldMarkup( argObject.fields );
}
if ( argObject.title && typeof argObject.title == 'string' ) {
title = argObject.title;
}
if ( Dialog.markupCreated ) {
$('#gollum-editor-dialog').remove();
}
var $dialog = $( Dialog.createMarkup( title, body ) );
$('body').append( $dialog );
if ( argObject.OK &&
typeof argObject.OK == 'function' ) {
Dialog.attachEvents( argObject.OK );
}
Dialog.show();
},
show: function() {
if ( !Dialog.markupCreated ) {
debug('Dialog: No markup to show. Please use init first.')
} else {
debug('Showing dialog');
$('#gollum-editor-dialog').animate({ opacity: 0 }, {
duration: 1,
complete: function() {
$('#gollum-editor-dialog').addClass('active');
Dialog.position(); // position this thing
$('#gollum-editor-dialog').animate({ opacity: 1 }, {
duration: 500
});
}
});
}
},
position: function() {
var dialogHeight = $('#gollum-editor-dialog-inner').height();
debug(dialogHeight);
$('#gollum-editor-dialog-inner')
.css('height', dialogHeight + 'px')
.css('margin-top', -1 * parseInt( dialogHeight / 2 ));
}
};
/**
* $.GollumEditor.Dialog
* Used in exec() to display dialogs with dynamic fields.
*
*/
$.GollumEditor.Dialog = Dialog;
$.GollumEditor.replaceSelection = function( repText ) {
FunctionBar.replaceFieldSelection( $('#gollum-editor-body'), repText );
}
// })(jQuery);
jQuery(document).ready(function() {
$.GollumEditor();
});
-107
View File
@@ -1,107 +0,0 @@
/**
* ASCIIDoc Language Definition
*
*/
(function() {
var ASCIIDoc = {
'function-bold' : {
search: /([^\n]+)([\n]*)/gi,
replace: "*$1*$2"
},
'function-italic' : {
search: /([^\n]+)([\n]*)/gi,
replace: "_$1_$2"
},
'function-code' : {
search: /([^\n]+)([\n]*)/gi,
replace: "+$1+$2"
},
'function-ul' : {
search: /(.+)([\n]?)/gi,
replace: "* $1$2"
},
/* This looks silly but is completely valid Markdown */
'function-ol' : {
search: /(.+)([\n]?)/gi,
replace: ". $1$2"
},
'function-blockquote' : {
search: /(.+)([\n]?)/gi,
replace: "----\n$1$2\n----\n"
},
'function-link' : {
exec: function( txt, selText, $field ) {
var results = null;
$.GollumEditor.Dialog.init({
title: 'Insert Link',
fields: [
{
id: 'text',
name: 'Link Text',
type: 'text',
help: 'The text to display to the user.'
},
{
id: 'href',
name: 'URL',
type: 'text',
help: 'The URL to link to.'
}
],
OK: function( res ) {
var h = '';
if ( res['text'] && res['href'] ) {
h = res['href'] + '[' +
res['text'] + ']';
}
$.GollumEditor.replaceSelection( h );
}
});
}
},
'function-image' : {
exec: function( txt, selText, $field ) {
var results = null;
$.GollumEditor.Dialog.init({
title: 'Insert Image',
fields: [
{
id: 'url',
name: 'Image URL',
type: 'text'
},
{
id: 'alt',
name: 'Alt Text',
type: 'text'
}
],
OK: function( res ) {
var h = '';
if ( res['url'] && res['alt'] ) {
h = 'image::' + res['url'] +
'[' + res['alt'] + ']';
}
$.GollumEditor.replaceSelection( h );
}
});
}
}
};
jQuery.GollumEditor.defineLanguage('asciidoc', ASCIIDoc);
})();
-103
View File
@@ -1,103 +0,0 @@
/**
* Creole Language Definition
*
*/
(function() {
var Creole = {
'function-bold' : {
search: /([^\n]+)([\n]*)/gi,
replace: "**$1**$2"
},
'function-italic' : {
search: /([^\n]+)([\n]*)/gi,
replace: "//$1//$2"
},
'function-code' : {
search: /([^\n]+)([\n]*)/gi,
replace: "{{{$1}}}$2"
},
'function-hr' : {
append: "\n\n----\n\n";
},
'function-ul' : {
search: /(.+)([\n]?)/gi,
replace: "* $1$2"
},
/* This looks silly but is completely valid Markdown */
'function-ol' : {
search: /(.+)([\n]?)/gi,
replace: "# $1$2"
},
'function-link' : {
exec: function( txt, selText, $field ) {
var results = null;
$.GollumEditor.Dialog.init({
title: 'Insert Link',
fields: [
{
id: 'text',
name: 'Link Text',
type: 'text',
help: 'The text to display to the user.'
},
{
id: 'href',
name: 'URL',
type: 'text',
help: 'The URL to link to.'
}
],
OK: function( res ) {
var h = '[[' + res['href'] + '|' +
res['text'] + ']]';
$.GollumEditor.replaceSelection( h );
}
});
}
},
'function-image' : {
exec: function( txt, selText, $field ) {
var results = null;
$.GollumEditor.Dialog.init({
title: 'Insert Image',
fields: [
{
id: 'url',
name: 'Image URL',
type: 'text'
},
{
id: 'alt',
name: 'Alt Text',
type: 'text'
}
],
OK: function( res ) {
if ( res['url'] && res['alt'] ) {
var h = '{{' + res['url'];
if ( res['alt'] != '' ) {
h += '|' + res['alt'] + '}}';
}
}
$.GollumEditor.replaceSelection( h );
}
});
}
}
};
jQuery.GollumEditor.defineLanguage('creole', Creole);
})();
-136
View File
@@ -1,136 +0,0 @@
/**
* Markdown Language Definition
*
* A language definition for string manipulation operations, in this case
* for the Markdown, uh, markup language. Uses regexes for various functions
* by default. If regexes won't do and you need to do some serious
* manipulation, you can declare a function in the object instead.
*
* Code example:
* 'functionbar-id' : {
* exec: function(text, selectedText) {
* functionStuffHere();
* },
* search: /somesearchregex/gi,
* replace: 'replace text for RegExp.replace',
* append: "just add this where the cursor is"
* }
*
**/
(function() {
var MarkDown = {
'function-bold' : {
search: /([^\n]+)([\n]*)/gi,
replace: "**$1**$2"
},
'function-italic' : {
search: /([^\n]+)([\n]*)/gi,
replace: "_$1_$2"
},
'function-code' : {
search: /([^\n]+)([\n]*)/gi,
replace: "`$1`$2"
},
'function-hr' : {
append: "\n***\n"
},
'function-ul' : {
search: /(.+)([\n]?)/gi,
replace: "* $1$2"
},
/* This looks silly but is completely valid Markdown */
'function-ol' : {
search: /(.+)([\n]?)/gi,
replace: "1. $1$2"
},
'function-blockquote' : {
search: /(.+)([\n]?)/gi,
replace: "> $1$2"
},
'function-h1' : {
search: /(.+)([\n]?)/gi,
replace: "# $1$2"
},
'function-h2' : {
search: /(.+)([\n]?)/gi,
replace: "## $1$2"
},
'function-h3' : {
search: /(.+)([\n]?)/gi,
replace: "### $1$2"
},
'function-link' : {
exec: function( txt, selText, $field ) {
var results = null;
$.GollumEditor.Dialog.init({
title: 'Insert Link',
fields: [
{
id: 'text',
name: 'Link Text',
type: 'text'
},
{
id: 'href',
name: 'URL',
type: 'text'
}
],
OK: function( res ) {
var rep = '';
if ( res['text'] && res['href'] ) {
rep = '[' + res['text'] + ']('
+ res['href'] + ')';
}
$.GollumEditor.replaceSelection( rep );
}
});
}
},
'function-image' : {
exec: function( txt, selText, $field ) {
var results = null;
$.GollumEditor.Dialog.init({
title: 'Insert Image',
fields: [
{
id: 'url',
name: 'Image URL',
type: 'code'
},
{
id: 'alt',
name: 'Alt Text',
type: 'text'
}
],
OK: function( res ) {
var rep = '';
if ( res['url'] && res['alt'] ) {
rep = '![' + res['alt'] + ']' +
'(' + res['url'] + ')';
}
$.GollumEditor.replaceSelection( rep );
}
});
}
}
};
jQuery.GollumEditor.defineLanguage('markdown', MarkDown);
})();
-111
View File
@@ -1,111 +0,0 @@
/**
* Textile Language Definition
*/
(function() {
var Textile = {
'function-bold' : {
search: /([^\n]+)([\n]*)/gi,
replace: "*$1*$2"
},
'function-italic' : {
search: /([^\n]+)([\n]*)/gi,
replace: "_$1_$2"
},
'function-hr' : {
append: "\n***\n"
},
'function-code' : {
search: /([^\n]+)([\n]*)/gi,
replace: "<pre><code>$1</code></pre>$2"
},
'function-ul' : {
search: /(.+)([\n]?)/gi,
replace: "* $1$2"
},
/* This looks silly but is completely valid Markdown */
'function-ol' : {
search: /(.+)([\n]?)/gi,
replace: "# $1$2"
},
'function-blockquote' : {
search: /(.+)([\n]?)/gi,
replace: "bq. $1$2"
},
'function-link' : {
exec: function( txt, selText, $field ) {
var results = null;
$.GollumEditor.Dialog.init({
title: 'Insert Link',
fields: [
{
id: 'text',
name: 'Link Text',
type: 'text',
help: 'The text to display to the user.'
},
{
id: 'href',
name: 'URL',
type: 'text',
help: 'The URL to link to.'
}
],
OK: function( res ) {
var h = '';
if ( res['text'] && res['href'] ) {
h = '"' + res['text'] + '":' +
res['href'];
}
$.GollumEditor.replaceSelection( h );
}
});
}
},
'function-image' : {
exec: function( txt, selText, $field ) {
var results = null;
$.GollumEditor.Dialog.init({
title: 'Insert Image',
fields: [
{
id: 'url',
name: 'Image URL',
type: 'text'
},
{
id: 'alt',
name: 'Alt Text',
type: 'text'
}
],
OK: function( res ) {
if ( res['url'] ) {
var h = '!' + res['url'];
if ( res['alt'] != '' ) {
h += '(' + res['alt'] + ')';
}
h += '!';
%.GollumEditor.replaceSelection( h );
}
}
});
}
}
};
jQuery.GollumEditor.defineLanguage('textile', Textile);
})();
View File
-70
View File
@@ -1,70 +0,0 @@
// ua
$(document).ready(function() {
// ua detection
if ($.browser.mozilla) {
$('body').addClass('ff');
} else if ($.browser.webkit) {
$('body').addClass('webkit');
} else if ($.browser.msie) {
$('body').addClass('ie');
if ($.browser.version == "7.0") {
$('body').addClass('ie7');
} else if ($.browser.version == "8.0") {
$('body').addClass('ie8');
}
}
// no widows in wiki body
if ($('#wiki-wrapper').hasClass('page')) {
$('#template h1, #template h2, #template h3, #template h4, #template h5, #template h6, #template li, #template p').each(
function(){
$(this).html($(this).html().replace(/\s([^\s<]+)\s*$/,'&nbsp;$1'));
}
);
}
if ($('#wiki-wrapper').hasClass('history')) {
$('#wiki-history td.checkbox input').each(highlightChecked);
$('#wiki-history td.checkbox input').click(highlightChecked);
$('#wiki-history td.revert-action a').mouseenter(highlightOn);
$('#wiki-history td.revert-action a').mouseleave(highlightOff);
$('li.minibutton a.action-compare-revision').click(function( e ) {
e.preventDefault();
$('#version-form').submit();
});
$('li.minibutton a.action-back-to-top').click(function( e ) {
e.preventDefault();
$('body').scrollTop = 0;
});
};
});
function highlightOn() {
$(this).parent().parent().animate({
backgroundColor: '#ffffea',
duration: 400
});
}
function highlightOff() {
var color = '#ebf2f6';
if ($(this).parent().parent().hasClass('alt-row')) {
color = '#f3f7fa';
}
$(this).parent().parent().animate({
backgroundColor: color,
duration: 400
});
}
function highlightChecked() {
if ($(this).is(':checked')) {
$(this).parent().parent().addClass('selected');
} else {
$(this).parent().parent().removeClass('selected');
}
}
-123
View File
@@ -1,123 +0,0 @@
/*
* jQuery Color Animations
* Copyright 2007 John Resig
* Released under the MIT and GPL licenses.
*/
(function(jQuery){
// We override the animation for all of these color styles
jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
jQuery.fx.step[attr] = function(fx){
if ( fx.state == 0 ) {
fx.start = getColor( fx.elem, attr );
fx.end = getRGB( fx.end );
}
fx.elem.style[attr] = "rgb(" + [
Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0),
Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0),
Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0)
].join(",") + ")";
}
});
// Color Conversion functions from highlightFade
// By Blair Mitchelmore
// http://jquery.offput.ca/highlightFade/
// Parse strings looking for color tuples [255,255,255]
function getRGB(color) {
var result;
// Check if we're already dealing with an array of colors
if ( color && color.constructor == Array && color.length == 3 )
return color;
// Look for rgb(num,num,num)
if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
return [parseInt(result[1]), parseInt(result[2]), parseInt(result[3])];
// Look for rgb(num%,num%,num%)
if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];
// Look for #a0b1c2
if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
// Look for #fff
if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
// Otherwise, we're most likely dealing with a named color
return colors[jQuery.trim(color).toLowerCase()];
}
function getColor(elem, attr) {
var color;
do {
color = jQuery.curCSS(elem, attr);
// Keep going until we find an element that has color, or we hit the body
if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") )
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/
var colors = {
aqua:[0,255,255],
azure:[240,255,255],
beige:[245,245,220],
black:[0,0,0],
blue:[0,0,255],
brown:[165,42,42],
cyan:[0,255,255],
darkblue:[0,0,139],
darkcyan:[0,139,139],
darkgrey:[169,169,169],
darkgreen:[0,100,0],
darkkhaki:[189,183,107],
darkmagenta:[139,0,139],
darkolivegreen:[85,107,47],
darkorange:[255,140,0],
darkorchid:[153,50,204],
darkred:[139,0,0],
darksalmon:[233,150,122],
darkviolet:[148,0,211],
fuchsia:[255,0,255],
gold:[255,215,0],
green:[0,128,0],
indigo:[75,0,130],
khaki:[240,230,140],
lightblue:[173,216,230],
lightcyan:[224,255,255],
lightgreen:[144,238,144],
lightgrey:[211,211,211],
lightpink:[255,182,193],
lightyellow:[255,255,224],
lime:[0,255,0],
magenta:[255,0,255],
maroon:[128,0,0],
navy:[0,0,128],
olive:[128,128,0],
orange:[255,165,0],
pink:[255,192,203],
purple:[128,0,128],
violet:[128,0,128],
red:[255,0,0],
silver:[192,192,192],
white:[255,255,255],
yellow:[255,255,0]
};
})(jQuery);
-6883
View File
File diff suppressed because it is too large Load Diff
-126
View File
@@ -1,126 +0,0 @@
<!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>Page Name &mdash; Site Name</title>
</head>
<body>
<div id="wiki-wrapper" class="page">
<div id="head">
<h1>Page Title</h1>
<ul class="actions">
<li class="minibutton"><a href="javascript:void(0);"
class="action-edit-page">Edit Page</a></li>
<li class="minibutton"><a href="javascript:void(0);"
class="action-page-history">Page History</a></li>
<li class="minibutton" class="action-discussion">
<a href="javascript:void(0);">Discussion <span>(10)<span></a></li>
</ul>
</div>
<div id="wiki-content">
<div class=" has-footer">
<div id="wiki-body">
<div id="inline-comment">
<ul>
<li><a href="javascript:void(0);" id="block1"
class="has-activity">4</a></li>
<li><a href="javascript:void(0);" id="block2"
class="no-activity">&nbsp;</a></li>
</ul>
</div>
<div id="template">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque congue ultrices metus, sit amet blandit nunc pretium ut. Donec ornare, nisl et suscipit tempor, dolor nunc ornare magna, a ullamcorper massa orci ut urna. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque purus erat, posuere aliquam sagittis sed, tincidunt eu magna. Mauris eu justo tellus. Suspendisse urna magna:
</p>
<ol>
<li>Ordered list 1</li>
<li>Ordered list 2</li>
<li>
<ol>
<li>Nest 1</li>
<li>Nest 2</li>
</ol>
</li>
<li>Ordered list 3</li>
</ol>
<p>
Tempus a consequat ut, accumsan vitae tellus. Nunc aliquet tempus lectus, non accumsan elit gravida faucibus. Proin in imperdiet ligula. Mauris nec posuere felis. Etiam tempus <code>sollicitudin massa</code>, vel vestibulum est lacinia sed.
</p>
<p>
Nam iaculis volutpat dolor, laoreet blandit felis scelerisque sagittis. Suspendisse pretium lorem in nunc interdum vel malesuada ante pretium. Nam consectetur tortor scelerisque mi congue rhoncus. Curabitur vulputate nunc non urna condimentum in consequat elit lobortis. Etiam eu purus mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sit amet arcu enim, id iaculis tortor.
</p>
<blockquote>
<p>
Quisque rhoncus, elit et eleifend laoreet, metus mauris placerat enim, euismod aliquet justo justo gravida augue. Mauris sit amet urna eu lacus luctus porta eu eget tortor. Suspendisse potenti.
</p>
</blockquote>
<p>
In urna dolor, pulvinar nec porttitor vitae, varius quis sem. Nulla at nisl nisl. In lobortis enim lacinia lectus semper fermentum id sit amet quam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.
</p>
<h3>Heading 3</h3>
<p>
Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Praesent leo neque, lacinia vitae posuere sed, adipiscing vitae massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi felis sem, dictum ut interdum sit amet, tincidunt at tellus.
</p>
<p>
Duis convallis, mauris in ultrices convallis, ligula arcu laoreet dolor, in elementum justo lorem et magna. Sed posuere est at ante aliquam hendrerit. Ut porta ipsum a neque porta at gravida lacus dictum. Cras at cursus massa. Aliquam dignissim sagittis augue, non pellentesque massa adipiscing sit amet. Donec at faucibus massa. Etiam hendrerit accumsan rutrum. Mauris venenatis justo nec sem tincidunt gravida. Quisque ut lacus mi, at iaculis urna. Sed id libero neque.
</p>
<h4>Heading 4</h4>
<p>
Nulla facilisi. Duis sem risus, malesuada eget tempor eu, elementum sed mi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec commodo libero ac risus hendrerit gravida. Nullam id orci nulla, nec pulvinar dui. Donec elit odio, pulvinar ut cursus id, rhoncus eu urna. Aliquam molestie interdum aliquam.
</p>
<h5>Heading 5</h5>
<p>
Vestibulum sed neque mauris, quis imperdiet lorem. Fusce id sollicitudin est. Vivamus porta blandit nibh, ultricies ultricies tortor scelerisque nec. Aliquam et ipsum ut neque aliquet accumsan at eu ante. Donec velit turpis, feugiat non venenatis at, rutrum cursus neque. Integer nunc purus, porta vel semper et, venenatis a nisi.
</p>
<p>
Nunc malesuada, diam nec euismod tristique, lacus nibh ornare dolor, eleifend rhoncus nunc enim nec nisi. Nulla neque tellus, scelerisque porttitor commodo vitae, euismod vitae est. Sed adipiscing metus vitae nisi sodales porta. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Cras a urna massa. Vestibulum ac sapien urna.
</p>
<h6>Heading 6</h6>
<ul>
<li>Unordered list item 1</li>
<li>Unordered list item 2</li>
</ul>
<p>
Sed sit amet arcu lectus, eu hendrerit eros. Pellentesque at neque sed justo luctus mattis. Maecenas egestas, urna sit amet pulvinar dictum, nisl urna consequat purus, at consectetur eros metus eu ligula. Mauris sed magna sed risus commodo faucibus. Etiam sit amet dui id urna mollis pretium. Nam dolor augue, bibendum sit amet congue eget, lacinia at dolor. Vestibulum id quam sed dolor laoreet pellentesque eget ut leo.
</p>
</div>
</div>
<div id="wiki-rightbar">
<div id="nav">
<p class="parent">
<a href="javascript:void(0);">Back to <span>Page Name</span></a></li>
</p>
<h3>Directory Name</h3>
<ul class="links">
<li><a href="javascript:void(0);">Something 1</a></li>
<li><a href="javascript:void(0);">Something 2</a></li>
<li><a href="javascript:void(0);">Something 3</a></li>
</ul>
</div>
</div>
<div id="wiki-footer">
<div id="footer-content">
<h3>Footer heading</h3>
<p>What goes in the footer?</p>
<ul class="links">
<li><a href="javascript:void(0);">Something 1</a></li>
<li><a href="javascript:void(0);">Something 2</a></li>
<li><a href="javascript:void(0);">Something 3</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="footer">
<p id="last-edit">Last edited by <span class="username">username</span>, 13:20:21 GMT</p>
</div>
</div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/gollum.js"></script>
<script type="text/javascript" src="js/gollum.editor.js"></script>
</body>
</html>