Browse files

Merge branch 'develop'

  • Loading branch information...
2 parents 4513b79 + 1402022 commit 11523bf0830133cb40cce152f6f717e85e3e2829 @dbyrne dbyrne committed Apr 24, 2011
View
3 README.md
@@ -43,6 +43,9 @@ vaguely like this:
* Anthony Grimes (raynes)
* Carin Meier (cmeier)
* Clint Harrison (clinteger)
+ * David Davis (daviddavis)
+ * Devin Walters (devn)
+ * Michael Kohl (citizen428)
Problem sources:
View
2 project.clj
@@ -1,4 +1,4 @@
-(defproject foreclojure "0.1.2.1"
+(defproject foreclojure "0.1.3"
:description "4clojure - a website for lisp beginners"
:dependencies [[org.clojure/clojure "1.2.1"]
[org.clojure/clojure-contrib "1.2.0"]
View
344 resources/public/css/demo_table.css
@@ -31,75 +31,75 @@
*/
.dataTables_wrapper {
- float: left;
- width: 95%;
- min-height: 302px;
- clear: both;
- _height: 302px;
- zoom: 1; /* Feeling sorry for IE */
+ float: left;
+ width: 95%;
+ min-height: 302px;
+ clear: both;
+ _height: 302px;
+ zoom: 1; /* Feeling sorry for IE */
}
.dataTables_processing {
- position: absolute;
- top: 50%;
- left: 50%;
- width: 250px;
- height: 30px;
- margin-left: -125px;
- margin-top: -15px;
- padding: 14px 0 2px 0;
- border: 1px solid #ddd;
- text-align: center;
- color: #999;
- font-size: 14px;
- background-color: white;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 250px;
+ height: 30px;
+ margin-left: -125px;
+ margin-top: -15px;
+ padding: 14px 0 2px 0;
+ border: 1px solid #ddd;
+ text-align: center;
+ color: #999;
+ font-size: 14px;
+ background-color: white;
}
.dataTables_length {
- width: 40%;
- float: left;
+ width: 40%;
+ float: left;
}
.dataTables_filter {
- width: 50%;
- float: right;
- text-align: right;
+ width: 50%;
+ float: right;
+ text-align: right;
}
.dataTables_info {
- width: 60%;
- float: left;
+ width: 60%;
+ float: left;
}
.dataTables_paginate {
- width: 44px;
- * width: 50px;
- float: right;
- text-align: right;
+ width: 44px;
+ * width: 50px;
+ float: right;
+ text-align: right;
}
/* Pagination nested */
.paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next {
- height: 19px;
- width: 19px;
- margin-left: 3px;
- float: left;
+ height: 19px;
+ width: 19px;
+ margin-left: 3px;
+ float: left;
}
.paginate_disabled_previous {
- background-image: url('../images/back_disabled.jpg');
+ background-image: url('../images/back_disabled.jpg');
}
.paginate_enabled_previous {
- background-image: url('../images/back_enabled.jpg');
+ background-image: url('../images/back_enabled.jpg');
}
.paginate_disabled_next {
- background-image: url('../images/forward_disabled.jpg');
+ background-image: url('../images/forward_disabled.jpg');
}
.paginate_enabled_next {
- background-image: url('../images/forward_enabled.jpg');
+ background-image: url('../images/forward_enabled.jpg');
}
@@ -108,48 +108,48 @@
* DataTables display
*/
table.display {
- margin: 0 auto;
- clear: both;
- width: 100%;
-
- /* Note Firefox 3.5 and before have a bug with border-collapse
- * ( https://bugzilla.mozilla.org/show%5Fbug.cgi?id=155955 )
- * border-spacing: 0; is one possible option. Conditional-css.com is
- * useful for this kind of thing
- *
- * Further note IE 6/7 has problems when calculating widths with border width.
- * It subtracts one px relative to the other browsers from the first column, and
- * adds one to the end...
- *
- * If you want that effect I'd suggest setting a border-top/left on th/td's and
- * then filling in the gaps with other borders.
- */
+ margin: 0 auto;
+ clear: both;
+ width: 100%;
+
+ /* Note Firefox 3.5 and before have a bug with border-collapse
+ * ( https://bugzilla.mozilla.org/show%5Fbug.cgi?id=155955 )
+ * border-spacing: 0; is one possible option. Conditional-css.com is
+ * useful for this kind of thing
+ *
+ * Further note IE 6/7 has problems when calculating widths with border width.
+ * It subtracts one px relative to the other browsers from the first column, and
+ * adds one to the end...
+ *
+ * If you want that effect I'd suggest setting a border-top/left on th/td's and
+ * then filling in the gaps with other borders.
+ */
}
table.display thead th {
- padding: 3px 18px 3px 10px;
- border-bottom: 1px solid black;
- font-weight: bold;
- cursor: pointer;
- * cursor: hand;
+ padding: 3px 18px 3px 10px;
+ border-bottom: 1px solid black;
+ font-weight: bold;
+ cursor: pointer;
+ * cursor: hand;
}
table.display tfoot th {
- padding: 3px 18px 3px 10px;
- border-top: 1px solid black;
- font-weight: bold;
+ padding: 3px 18px 3px 10px;
+ border-top: 1px solid black;
+ font-weight: bold;
}
table.display tr.heading2 td {
- border-bottom: 1px solid #aaa;
+ border-bottom: 1px solid #aaa;
}
table.display td {
- padding: 3px 10px;
+ padding: 3px 10px;
}
table.display td.center {
- text-align: center;
+ text-align: center;
}
@@ -159,23 +159,23 @@ table.display td.center {
*/
.sorting_asc {
- background: url('../images/sort_asc.png') no-repeat center right;
+ background: url('../images/sort_asc.png') no-repeat center right;
}
.sorting_desc {
- background: url('../images/sort_desc.png') no-repeat center right;
+ background: url('../images/sort_desc.png') no-repeat center right;
}
.sorting {
- background: url('../images/sort_both.png') no-repeat center right;
+ background: url('../images/sort_both.png') no-repeat center right;
}
.sorting_asc_disabled {
- background: url('../images/sort_asc_disabled.png') no-repeat center right;
+ background: url('../images/sort_asc_disabled.png') no-repeat center right;
}
.sorting_desc_disabled {
- background: url('../images/sort_desc_disabled.png') no-repeat center right;
+ background: url('../images/sort_desc_disabled.png') no-repeat center right;
}
@@ -186,44 +186,44 @@ table.display td.center {
* DataTables row classes
*/
table.display tr.odd.gradeA {
- background-color: #ddffdd;
+ background-color: #ddffdd;
}
table.display tr.even.gradeA {
- background-color: #eeffee;
+ background-color: #eeffee;
}
table.display tr.odd.gradeC {
- background-color: #ddddff;
+ background-color: #ddddff;
}
table.display tr.even.gradeC {
- background-color: #eeeeff;
+ background-color: #eeeeff;
}
table.display tr.odd.gradeX {
- background-color: #ffdddd;
+ background-color: #ffdddd;
}
table.display tr.even.gradeX {
- background-color: #ffeeee;
+ background-color: #ffeeee;
}
table.display tr.odd.gradeU {
- background-color: #ddd;
+ background-color: #ddd;
}
table.display tr.even.gradeU {
- background-color: #eee;
+ background-color: #eee;
}
tr.odd {
- background-color: #E2E4FF;
+ background-color: #E2E4FF;
}
tr.even {
- background-color: white;
+ background-color: white;
}
@@ -234,92 +234,92 @@ tr.even {
* Misc
*/
.dataTables_scroll {
- clear: both;
+ clear: both;
}
.dataTables_scrollBody {
- *margin-top: -1px;
+ *margin-top: -1px;
}
.top, .bottom {
- padding: 15px;
- background-color: #F5F5F5;
- border: 1px solid #CCCCCC;
+ padding: 15px;
+ background-color: #F5F5F5;
+ border: 1px solid #CCCCCC;
}
.top .dataTables_info {
- float: none;
+ float: none;
}
.clear {
- clear: both;
+ clear: both;
}
.dataTables_empty {
- text-align: center;
+ text-align: center;
}
tfoot input {
- margin: 0.5em 0;
- width: 100%;
- color: #444;
+ margin: 0.5em 0;
+ width: 100%;
+ color: #444;
}
tfoot input.search_init {
- color: #999;
+ color: #999;
}
td.group {
- background-color: #d1cfd0;
- border-bottom: 2px solid #A19B9E;
- border-top: 2px solid #A19B9E;
+ background-color: #d1cfd0;
+ border-bottom: 2px solid #A19B9E;
+ border-top: 2px solid #A19B9E;
}
td.details {
- background-color: #d1cfd0;
- border: 2px solid #A19B9E;
+ background-color: #d1cfd0;
+ border: 2px solid #A19B9E;
}
.example_alt_pagination div.dataTables_info {
- width: 40%;
+ width: 40%;
}
.paging_full_numbers {
- width: 400px;
- height: 22px;
- line-height: 22px;
+ width: 400px;
+ height: 22px;
+ line-height: 22px;
}
.paging_full_numbers span.paginate_button,
- .paging_full_numbers span.paginate_active {
- border: 1px solid #aaa;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- padding: 2px 5px;
- margin: 0 3px;
- cursor: pointer;
- *cursor: hand;
-}
+ .paging_full_numbers span.paginate_active {
+ border: 1px solid #aaa;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ padding: 2px 5px;
+ margin: 0 3px;
+ cursor: pointer;
+ *cursor: hand;
+ }
.paging_full_numbers span.paginate_button {
- background-color: #ddd;
+ background-color: #ddd;
}
.paging_full_numbers span.paginate_button:hover {
- background-color: #ccc;
+ background-color: #ccc;
}
.paging_full_numbers span.paginate_active {
- background-color: #99B3FF;
+ background-color: #99B3FF;
}
table.display tr.even.row_selected td {
- background-color: #B0BED9;
+ background-color: #B0BED9;
}
table.display tr.odd.row_selected td {
- background-color: #9FAFD1;
+ background-color: #9FAFD1;
}
@@ -328,212 +328,212 @@ table.display tr.odd.row_selected td {
*/
/* For the standard odd/even */
tr.odd td.sorting_1 {/
- background-color: #D3D6FF;
+ background-color: #D3D6FF;
}
tr.odd td.sorting_2 {
- background-color: #DADCFF;
+ background-color: #DADCFF;
}
tr.odd td.sorting_3 {
- background-color: #E0E2FF;
+ background-color: #E0E2FF;
}
tr.even td.sorting_1 {
- background-color: #EAEBFF;
+ background-color: #EAEBFF;
}
tr.even td.sorting_2 {
- background-color: #F2F3FF;
+ background-color: #F2F3FF;
}
tr.even td.sorting_3 {
- background-color: #F9F9FF;
+ background-color: #F9F9FF;
}
/* For the Conditional-CSS grading rows */
/*
- Colour calculations (based off the main row colours)
+ Colour calculations (based off the main row colours)
Level 1:
- dd > c4
- ee > d5
- Level 2:
- dd > d1
- ee > e2
+ dd > c4
+ ee > d5
+ Level 2:
+ dd > d1
+ ee > e2
*/
tr.odd.gradeA td.sorting_1 {
- background-color: #c4ffc4;
+ background-color: #c4ffc4;
}
tr.odd.gradeA td.sorting_2 {
- background-color: #d1ffd1;
+ background-color: #d1ffd1;
}
tr.odd.gradeA td.sorting_3 {
- background-color: #d1ffd1;
+ background-color: #d1ffd1;
}
tr.even.gradeA td.sorting_1 {
- background-color: #d5ffd5;
+ background-color: #d5ffd5;
}
tr.even.gradeA td.sorting_2 {
- background-color: #e2ffe2;
+ background-color: #e2ffe2;
}
tr.even.gradeA td.sorting_3 {
- background-color: #e2ffe2;
+ background-color: #e2ffe2;
}
tr.odd.gradeC td.sorting_1 {
- background-color: #c4c4ff;
+ background-color: #c4c4ff;
}
tr.odd.gradeC td.sorting_2 {
- background-color: #d1d1ff;
+ background-color: #d1d1ff;
}
tr.odd.gradeC td.sorting_3 {
- background-color: #d1d1ff;
+ background-color: #d1d1ff;
}
tr.even.gradeC td.sorting_1 {
- background-color: #d5d5ff;
+ background-color: #d5d5ff;
}
tr.even.gradeC td.sorting_2 {
- background-color: #e2e2ff;
+ background-color: #e2e2ff;
}
tr.even.gradeC td.sorting_3 {
- background-color: #e2e2ff;
+ background-color: #e2e2ff;
}
tr.odd.gradeX td.sorting_1 {
- background-color: #ffc4c4;
+ background-color: #ffc4c4;
}
tr.odd.gradeX td.sorting_2 {
- background-color: #ffd1d1;
+ background-color: #ffd1d1;
}
tr.odd.gradeX td.sorting_3 {
- background-color: #ffd1d1;
+ background-color: #ffd1d1;
}
tr.even.gradeX td.sorting_1 {
- background-color: #ffd5d5;
+ background-color: #ffd5d5;
}
tr.even.gradeX td.sorting_2 {
- background-color: #ffe2e2;
+ background-color: #ffe2e2;
}
tr.even.gradeX td.sorting_3 {
- background-color: #ffe2e2;
+ background-color: #ffe2e2;
}
tr.odd.gradeU td.sorting_1 {
- background-color: #c4c4c4;
+ background-color: #c4c4c4;
}
tr.odd.gradeU td.sorting_2 {
- background-color: #d1d1d1;
+ background-color: #d1d1d1;
}
tr.odd.gradeU td.sorting_3 {
- background-color: #d1d1d1;
+ background-color: #d1d1d1;
}
tr.even.gradeU td.sorting_1 {
- background-color: #d5d5d5;
+ background-color: #d5d5d5;
}
tr.even.gradeU td.sorting_2 {
- background-color: #e2e2e2;
+ background-color: #e2e2e2;
}
tr.even.gradeU td.sorting_3 {
- background-color: #e2e2e2;
+ background-color: #e2e2e2;
}
/*
* Row highlighting example
*/
.ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted {
- background-color: #ECFFB3;
+ background-color: #ECFFB3;
}
.ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted {
- background-color: #E6FF99;
+ background-color: #E6FF99;
}
.ex_highlight_row #example tr.even:hover {
- background-color: #ECFFB3;
+ background-color: #ECFFB3;
}
.ex_highlight_row #example tr.even:hover td.sorting_1 {
- background-color: #DDFF75;
+ background-color: #DDFF75;
}
.ex_highlight_row #example tr.even:hover td.sorting_2 {
- background-color: #E7FF9E;
+ background-color: #E7FF9E;
}
.ex_highlight_row #example tr.even:hover td.sorting_3 {
- background-color: #E2FF89;
+ background-color: #E2FF89;
}
.ex_highlight_row #example tr.odd:hover {
- background-color: #E6FF99;
+ background-color: #E6FF99;
}
.ex_highlight_row #example tr.odd:hover td.sorting_1 {
- background-color: #D6FF5C;
+ background-color: #D6FF5C;
}
.ex_highlight_row #example tr.odd:hover td.sorting_2 {
- background-color: #E0FF84;
+ background-color: #E0FF84;
}
.ex_highlight_row #example tr.odd:hover td.sorting_3 {
- background-color: #DBFF70;
+ background-color: #DBFF70;
}
/*
* KeyTable
*/
table.KeyTable td {
- border: 3px solid transparent;
+ border: 3px solid transparent;
}
table.KeyTable td.focus {
- border: 3px solid #3366FF;
+ border: 3px solid #3366FF;
}
table.display tr.gradeA {
- background-color: #eeffee;
+ background-color: #eeffee;
}
table.display tr.gradeC {
- background-color: #ddddff;
+ background-color: #ddddff;
}
table.display tr.gradeX {
- background-color: #ffdddd;
+ background-color: #ffdddd;
}
table.display tr.gradeU {
- background-color: #ddd;
+ background-color: #ddd;
}
div.box {
- height: 100px;
- padding: 10px;
- overflow: auto;
- border: 1px solid #8080FF;
- background-color: #E5E5FF;
+ height: 100px;
+ padding: 10px;
+ overflow: auto;
+ border: 1px solid #8080FF;
+ background-color: #E5E5FF;
}
View
226 resources/public/css/shCore.css
@@ -0,0 +1,226 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter a,
+.syntaxhighlighter div,
+.syntaxhighlighter code,
+.syntaxhighlighter table,
+.syntaxhighlighter table td,
+.syntaxhighlighter table tr,
+.syntaxhighlighter table tbody,
+.syntaxhighlighter table thead,
+.syntaxhighlighter table caption,
+.syntaxhighlighter textarea {
+ -moz-border-radius: 0 0 0 0 !important;
+ -webkit-border-radius: 0 0 0 0 !important;
+ background: none !important;
+ border: 0 !important;
+ bottom: auto !important;
+ float: none !important;
+ height: auto !important;
+ left: auto !important;
+ line-height: 1.1em !important;
+ margin: 0 !important;
+ outline: 0 !important;
+ overflow: visible !important;
+ padding: 0 !important;
+ position: static !important;
+ right: auto !important;
+ text-align: left !important;
+ top: auto !important;
+ vertical-align: baseline !important;
+ width: auto !important;
+ box-sizing: content-box !important;
+ font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
+ font-weight: normal !important;
+ font-style: normal !important;
+ font-size: 1em !important;
+ min-height: inherit !important;
+ min-height: auto !important;
+}
+
+.syntaxhighlighter {
+ width: 100% !important;
+ margin: 1em 0 1em 0 !important;
+ position: relative !important;
+ overflow: auto !important;
+ font-size: 1em !important;
+}
+.syntaxhighlighter.source {
+ overflow: hidden !important;
+}
+.syntaxhighlighter .bold {
+ font-weight: bold !important;
+}
+.syntaxhighlighter .italic {
+ font-style: italic !important;
+}
+.syntaxhighlighter .line {
+ white-space: pre !important;
+}
+.syntaxhighlighter table {
+ width: 100% !important;
+}
+.syntaxhighlighter table caption {
+ text-align: left !important;
+ padding: .5em 0 0.5em 1em !important;
+}
+.syntaxhighlighter table td.code {
+ width: 100% !important;
+}
+.syntaxhighlighter table td.code .container {
+ position: relative !important;
+}
+.syntaxhighlighter table td.code .container textarea {
+ box-sizing: border-box !important;
+ position: absolute !important;
+ left: 0 !important;
+ top: 0 !important;
+ width: 100% !important;
+ height: 100% !important;
+ border: none !important;
+ background: white !important;
+ padding-left: 1em !important;
+ overflow: hidden !important;
+ white-space: pre !important;
+}
+.syntaxhighlighter table td.gutter .line {
+ text-align: right !important;
+ padding: 0 0.5em 0 1em !important;
+}
+.syntaxhighlighter table td.code .line {
+ padding: 0 1em !important;
+}
+.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
+ padding-left: 0em !important;
+}
+.syntaxhighlighter.show {
+ display: block !important;
+}
+.syntaxhighlighter.collapsed table {
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ padding: 0.1em 0.8em 0em 0.8em !important;
+ font-size: 1em !important;
+ position: static !important;
+ width: auto !important;
+ height: auto !important;
+}
+.syntaxhighlighter.collapsed .toolbar span {
+ display: inline !important;
+ margin-right: 1em !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a {
+ padding: 0 !important;
+ display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a.expandSource {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar {
+ position: absolute !important;
+ right: 1px !important;
+ top: 1px !important;
+ width: 11px !important;
+ height: 11px !important;
+ font-size: 10px !important;
+ z-index: 10 !important;
+}
+.syntaxhighlighter .toolbar span.title {
+ display: inline !important;
+}
+.syntaxhighlighter .toolbar a {
+ display: block !important;
+ text-align: center !important;
+ text-decoration: none !important;
+ padding-top: 1px !important;
+}
+.syntaxhighlighter .toolbar a.expandSource {
+ display: none !important;
+}
+.syntaxhighlighter.ie {
+ font-size: .9em !important;
+ padding: 1px 0 1px 0 !important;
+}
+.syntaxhighlighter.ie .toolbar {
+ line-height: 8px !important;
+}
+.syntaxhighlighter.ie .toolbar a {
+ padding-top: 0px !important;
+}
+.syntaxhighlighter.printing .line.alt1 .content,
+.syntaxhighlighter.printing .line.alt2 .content,
+.syntaxhighlighter.printing .line.highlighted .number,
+.syntaxhighlighter.printing .line.highlighted.alt1 .content,
+.syntaxhighlighter.printing .line.highlighted.alt2 .content {
+ background: none !important;
+}
+.syntaxhighlighter.printing .line .number {
+ color: #bbbbbb !important;
+}
+.syntaxhighlighter.printing .line .content {
+ color: black !important;
+}
+.syntaxhighlighter.printing .toolbar {
+ display: none !important;
+}
+.syntaxhighlighter.printing a {
+ text-decoration: none !important;
+}
+.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
+ color: black !important;
+}
+.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
+ color: #008200 !important;
+}
+.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
+ color: blue !important;
+}
+.syntaxhighlighter.printing .keyword {
+ color: #006699 !important;
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .preprocessor {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .variable {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter.printing .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter.printing .functions {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .constants {
+ color: #0066cc !important;
+}
+.syntaxhighlighter.printing .script {
+ font-weight: bold !important;
+}
+.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
+ color: gray !important;
+}
+.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
+ color: red !important;
+}
+.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
+ color: black !important;
+}
View
117 resources/public/css/shThemeDefault.css
@@ -0,0 +1,117 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter {
+ background-color: white !important;
+}
+.syntaxhighlighter .line.alt1 {
+ background-color: white !important;
+}
+.syntaxhighlighter .line.alt2 {
+ background-color: white !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+ background-color: #e0e0e0 !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+ color: black !important;
+}
+.syntaxhighlighter table caption {
+ color: black !important;
+}
+.syntaxhighlighter .gutter {
+ color: #afafaf !important;
+}
+.syntaxhighlighter .gutter .line {
+ border-right: 3px solid #6ce26c !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+ background-color: #6ce26c !important;
+ color: white !important;
+}
+.syntaxhighlighter.printing .line .content {
+ border: none !important;
+}
+.syntaxhighlighter.collapsed {
+ overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+ color: blue !important;
+ background: white !important;
+ border: 1px solid #6ce26c !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+ color: blue !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+ color: red !important;
+}
+.syntaxhighlighter .toolbar {
+ color: white !important;
+ background: #6ce26c !important;
+ border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+ color: white !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+ color: black !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+ color: black !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+ color: #008200 !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+ color: blue !important;
+}
+.syntaxhighlighter .keyword {
+ color: #006699 !important;
+}
+.syntaxhighlighter .preprocessor {
+ color: gray !important;
+}
+.syntaxhighlighter .variable {
+ color: #aa7700 !important;
+}
+.syntaxhighlighter .value {
+ color: #009900 !important;
+}
+.syntaxhighlighter .functions {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter .constants {
+ color: #0066cc !important;
+}
+.syntaxhighlighter .script {
+ font-weight: bold !important;
+ color: #006699 !important;
+ background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+ color: gray !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+ color: #ff1493 !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+ color: red !important;
+}
+
+.syntaxhighlighter .keyword {
+ font-weight: bold !important;
+}
View
291 resources/public/css/style.css
@@ -1,19 +1,19 @@
body {
- background-color: #bbddee;
- font-size: 12px;
- font-family: Verdana, Arial, Helvetica, SunSans-Regular, Sans-Serif;
- color:#564b47;
- margin: 20px 140px 20px 140px;
- text-align: center;
+ background-color: #bbddee;
+ font-size: 12px;
+ font-family: Verdana, Arial, Helvetica, SunSans-Regular, Sans-Serif;
+ color:#564b47;
+ margin: 20px 140px 20px 140px;
+ text-align: center;
}
#account{
- float:right;
- width: 100%;
- text-align: right;
- padding: 0px 15px 0px 0px;
- background-color: #fff;
- font-weight: bold;
+ float:right;
+ width: 100%;
+ text-align: right;
+ padding: 0px 15px 0px 0px;
+ background-color: #fff;
+ font-weight: bold;
}
#account a:link {color: #445599;}
@@ -22,30 +22,42 @@ body {
#account a:hover {color: #7CFC00;}
#account a {text-decoration: none; font-size: 12px; font-weight:bold;}
-#content {
- width: 95%;
- padding: 15px 0px 15px 0px;
- text-align: left;
- background-color: #fff;
- overflow: auto;
- -moz-border-radius: 15px;
- border-radius: 15px;
+#wrapper {
+ width: 100%;
+ margin: 15px;
+ padding: 15px 0px 15px 0px;
+ text-align: left;
+ background-color: #fff;
+ overflow: auto;
+ -moz-border-radius: 15px;
+ border-radius: 15px;
}
-#top {
- width: 95%;
- padding: 15px 0px 15px 0px;
+#content {
+ width: 95%;
+ margin: 15px;
+ padding: 15px 0px 15px 0px;
+ text-align: left;
+ background-color: #fff;
+ overflow: auto;
+ -moz-border-radius: 15px;
+ border-radius: 15px;
+}
+
+#top {
+ width: 95%;
+ padding: 15px 0px 15px 0px;
}
h3 {
- font-size: 18px;
+ font-size: 18px;
}
#menu{
- background-color:#445599;
- padding: 20px 15px 15px 15px;
- color: #fff;
+ background-color:#445599;
+ padding: 20px 15px 15px 15px;
+ color: #fff;
}
a.novisited {color: #00e;}
@@ -58,193 +70,204 @@ a.novisited {color: #00e;}
#menu a.menu {margin: 15px;}
#user-info{
- float:right;
+ float:right;
}
#username{
- padding-right: 10px;
- border-right: 2px solid white;
+ padding-right: 10px;
+ border-right: 2px solid white;
}
.contributor {
- color: #458B00;
- font-weight: bold;
+ color: #458B00;
+ font-weight: bold;
}
#login {
- border-right: 2px solid white;
- padding-right: 1em;
+ border-right: 2px solid white;
+ padding-right: 1em;
}
#logout {
- padding-left: 1em;
- padding-right: 1em;
+ padding-left: 1em;
+ padding-right: 1em;
}
#register {
- padding-left: 1em;
+ padding-left: 1em;
}
#logo {
- float:left;
- padding:15px 0px 15px 0px;
-}
-
-#content{
- margin:15px
+ float:left;
+ padding:15px 0px 15px 0px;
}
#welcome{
- width: 90%;
- float: left;
+ width: 90%;
+ float: left;
}
#footer{
- background-color:#445599;
- padding: 15px;
- color: #fff;
- text-align: center;
+ background-color:#445599;
+ padding: 15px;
+ color: #fff;
+ text-align: center;
}
#footer img {
- float: left;
+ float: left;
}
#problem-table{
- float: left;
- width: 100%
-}
+ float: left;
+ width: 100%;
+}
+
+.rss {
+ width: 24px;
+ float: left;
+ background-image: url('../images/feed.png');
+ background-repeat: no-repeat;
+ background-position: top right;
+ height: 24px;
+ padding-bottom: 5px;;
+}
#user-table{
- float: left;
- width: 100%;
- padding: 15px;
-}
+ float: left;
+ width: 100%;
+ padding: 15px;
+}
span.error, div.error {
- color: red;
+ color: red;
}
div.congrats {
- color: red;
- margin-bottom: 8px;
- font-size: 16px;
+ color: red;
+ margin-bottom: 8px;
+ font-size: 16px;
}
span#prob-title {
- font-size: 20px;
- font-family: sans-serif;
- font-weight: bold;
+ font-size: 20px;
+ font-family: sans-serif;
+ font-weight: bold;
}
div#prob-desc {
- overflow: hidden;
+ overflow: hidden;
}
-div#testcases {
+div.testcases {
+ font-size: 1.3em;
float: left;
- margin: 10px;
+}
+
+div#testcases {
+ float: left;
+ margin: 10px;
}
li.testcase {
- font-size: 15px;
- padding: 3px;
- list-style-type: none;
- background-color: #eee;
- font-family: Courier;
+ font-size: 15px;
+ padding: 3px;
+ list-style-type: none;
+ background-color: #eee;
+ font-family: Courier;
}
div#restrictions {
- list-style-type: none;
- border-style: dashed;
- border-color: DarkRed;
- border-width: normal;
- margin-right: 45px;
- margin-bottom: 15px;
- margin-top: 15px;
- margin-left: 15px;
- padding: 10px;
- color: red;
- float: right;
- font-size: 16px;
+ list-style-type: none;
+ border-style: dashed;
+ border-color: DarkRed;
+ border-width: normal;
+ margin-right: 45px;
+ margin-bottom: 15px;
+ margin-top: 15px;
+ margin-left: 15px;
+ padding: 10px;
+ color: red;
+ float: right;
+ font-size: 16px;
}
#contact {
- color: #FFFFFF;
- margin-left: 1.3em;
-}
+ color: #FFFFFF;
+ margin-left: 1.3em;
+}
textarea#code-box {
- width: 500px;
- height: 250px;
+ width: 500px;
+ height: 250px;
}
table.my-table {
- padding: 2px;
- border-collapse: collapse;
+ padding: 2px;
+ border-collapse: collapse;
}
table.my-table td {
- text-align: left;
- font-size: 12px;
+ text-align: left;
+ font-size: 12px;
}
td.title-link {
- font-size: 16px;
+ font-size: 16px;
}
table.my-table th {
- padding: 10px 0px 0px 0px;
- font-size: 14px;
- font-weight: bold;
+ padding: 10px 0px 0px 0px;
+ font-size: 14px;
+ font-weight: bold;
}
button {
- border: 1px solid #A1CC59;
- color: #32401C;
- font-size: 14px;
- font-weight: bold;
- height: 23px;
- margin: 4px;
- padding: 1px 6px 2px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- background: #BCEE68;
- background: -moz-linear-gradient(top, #BCEE68, #A1CC59);
- background: -webkit-gradient(linear, left top, left bottom, from(#BCEE68), to(#A1CC59));
- -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#BCEE68', endColorstr='#A1CC59')";
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#BCEE68', endColorstr='#A1CC59');
+ border: 1px solid #A1CC59;
+ color: #32401C;
+ font-size: 14px;
+ font-weight: bold;
+ height: 23px;
+ margin: 4px;
+ padding: 1px 6px 2px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ background: #BCEE68;
+ background: -moz-linear-gradient(top, #BCEE68, #A1CC59);
+ background: -webkit-gradient(linear, left top, left bottom, from(#BCEE68), to(#A1CC59));
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#BCEE68', endColorstr='#A1CC59')";
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#BCEE68', endColorstr='#A1CC59');
}
button.large {
- font-size: 16px;
- padding: 3px 10px;
- height: 26px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
+ font-size: 16px;
+ padding: 3px 10px;
+ height: 26px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
}
button:hover {
- cursor: pointer;
- outline: none;
- text-decoration: none;
- background: #D1F09E;
- background: -moz-linear-gradient(top, #D1F09E, #A1CC59);
- background: -webkit-gradient(linear, left top, left bottom, from(#D1F09E), to(#A1CC59));
- -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#D1F09E', endColorstr='#A1CC59')";
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#D1F09E', endColorstr='#A1CC59');
+ cursor: pointer;
+ outline: none;
+ text-decoration: none;
+ background: #D1F09E;
+ background: -moz-linear-gradient(top, #D1F09E, #A1CC59);
+ background: -webkit-gradient(linear, left top, left bottom, from(#D1F09E), to(#A1CC59));
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#D1F09E', endColorstr='#A1CC59')";
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#D1F09E', endColorstr='#A1CC59');
}
button:active {
- position: relative;
- top: 1px;
- outline: none;
- background: #A1CC59;
- background: -moz-linear-gradient(top, #A1CC59, #A7D45C);
- background: -webkit-gradient(linear, left top, left bottom, from(#A1CC59), to(#A7D45C));
- -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#A1CC59', endColorstr='#A7D45C')";
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#A1CC59', endColorstr='#A7D45C');
+ position: relative;
+ top: 1px;
+ outline: none;
+ background: #A1CC59;
+ background: -moz-linear-gradient(top, #A1CC59, #A7D45C);
+ background: -webkit-gradient(linear, left top, left bottom, from(#A1CC59), to(#A7D45C));
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#A1CC59', endColorstr='#A7D45C')";
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#A1CC59', endColorstr='#A7D45C');
}
View
BIN resources/public/images/feed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
40 resources/public/script/foreclojure.js
@@ -1,24 +1,24 @@
$(document).ready(function() {
- $('#problem-table').dataTable( {
- "iDisplayLength": 25,
- "aaSorting": [[ 3, "desc" ]],
- "aoColumns": [
- null,
- null,
- null,
- null
- ]
+ $('#problem-table').dataTable( {
+ "iDisplayLength": 25,
+ "aaSorting": [[ 3, "desc" ]],
+ "aoColumns": [
+ null,
+ null,
+ null,
+ null
+ ]
+ } );
- } );
-
- $('#user-table').dataTable( {
- "iDisplayLength":25,
- "aaSorting": [[ 1, "desc" ]],
- "aoColumns": [
- null,
- null
- ]
- } );
-})
+ $('#user-table').dataTable( {
+ "iDisplayLength":25,
+ "aaSorting": [[ 1, "desc" ]],
+ "aoColumns": [
+ null,
+ null,
+ null
+ ]
+ } );
+});
View
130 resources/public/script/shAutoloader.js
@@ -0,0 +1,130 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+(function() {
+
+var sh = SyntaxHighlighter;
+
+/**
+ * Provides functionality to dynamically load only the brushes that a needed to render the current page.
+ *
+ * There are two syntaxes that autoload understands. For example:
+ *
+ * SyntaxHighlighter.autoloader(
+ * [ 'applescript', 'Scripts/shBrushAppleScript.js' ],
+ * [ 'actionscript3', 'as3', 'Scripts/shBrushAS3.js' ]
+ * );
+ *
+ * or a more easily comprehendable one:
+ *
+ * SyntaxHighlighter.autoloader(
+ * 'applescript Scripts/shBrushAppleScript.js',
+ * 'actionscript3 as3 Scripts/shBrushAS3.js'
+ * );
+ */
+sh.autoloader = function()
+{
+ var list = arguments,
+ elements = sh.findElements(),
+ brushes = {},
+ scripts = {},
+ all = SyntaxHighlighter.all,
+ allCalled = false,
+ allParams = null,
+ i
+ ;
+
+ SyntaxHighlighter.all = function(params)
+ {
+ allParams = params;
+ allCalled = true;
+ };
+
+ function addBrush(aliases, url)
+ {
+ for (var i = 0; i < aliases.length; i++)
+ brushes[aliases[i]] = url;
+ };
+
+ function getAliases(item)
+ {
+ return item.pop
+ ? item
+ : item.split(/\s+/)
+ ;
+ }
+
+ // create table of aliases and script urls
+ for (i = 0; i < list.length; i++)
+ {
+ var aliases = getAliases(list[i]),
+ url = aliases.pop()
+ ;
+
+ addBrush(aliases, url);
+ }
+
+ // dynamically add <script /> tags to the document body
+ for (i = 0; i < elements.length; i++)
+ {
+ var url = brushes[elements[i].params.brush];
+
+ if (!url)
+ continue;
+
+ scripts[url] = false;
+ loadScript(url);
+ }
+
+ function loadScript(url)
+ {
+ var script = document.createElement('script'),
+ done = false
+ ;
+
+ script.src = url;
+ script.type = 'text/javascript';
+ script.language = 'javascript';
+ script.onload = script.onreadystatechange = function()
+ {
+ if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete'))
+ {
+ done = true;
+ scripts[url] = true;
+ checkAll();
+
+ // Handle memory leak in IE
+ script.onload = script.onreadystatechange = null;
+ script.parentNode.removeChild(script);
+ }
+ };
+
+ // sync way of adding script tags to the page
+ document.body.appendChild(script);
+ };
+
+ function checkAll()
+ {
+ for(var url in scripts)
+ if (scripts[url] == false)
+ return;
+
+ if (allCalled)
+ SyntaxHighlighter.highlight(allParams);
+ };
+};
+
+})();
View
189 resources/public/script/shBrushClojure.js
@@ -0,0 +1,189 @@
+/*!
+ * Copyright © 2010 Sattvik Software & Technology Resources, Ltd. Co.
+ * All rights reserved.
+ *
+ * sh-clojure may be used under the terms of either the GNU Lesser General Public
+ * License (LGPL) or the Eclipse Public License (EPL). As a recipient of
+ * sh-clojure, you may choose which license to receive the code under. See the
+ * LICENSE file distributed with sh-clojure for details.
+ *
+ * Written by Daniel Solano Gómez
+ *
+ * Version 0.9.1 - 10 Apr 2010
+ */
+
+function ClojureRegExp(pattern) {
+ pattern = pattern + '(?=[[\\]{}(),\\s])';
+ this.regex = new RegExp(pattern, 'g');
+ this.lookBehind = /[\[\]{}(),\s]$/;
+}
+
+ClojureRegExp.prototype.exec = function (str) {
+ var match, leftContext;
+ while (match=this.regex.exec(str)) {
+ leftContext = str.substring(0, match.index);
+ if (this.lookBehind.test(leftContext)) {
+ return match;
+ }
+ else {
+ this.regex.lastIndex = match.index + 1;
+ }
+ }
+ return null;
+};
+
+SyntaxHighlighter.brushes.Clojure = function () {
+ var special_forms =
+ '. def do fn if let loop monitor-enter monitor-exit new quote recur set! ' +
+ 'throw try var',
+ clojure_core =
+ '* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* ' +
+ '*command-line-args* *compile-files* *compile-path* *e *err* *file* ' +
+ '*flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* ' +
+ '*print-dup* *print-length* *print-level* *print-meta* *print-readably* ' +
+ '*read-eval* *source-path* *use-context-classloader* ' +
+ '*warn-on-reflection* + - -> -&gt; ->> -&gt;&gt; .. / < &lt; <= &lt;= = ' +
+ '== > &gt; >= &gt;= accessor aclone ' +
+ 'add-classpath add-watch agent agent-errors aget alength alias all-ns ' +
+ 'alter alter-meta! alter-var-root amap ancestors and apply areduce ' +
+ 'array-map aset aset-boolean aset-byte aset-char aset-double aset-float ' +
+ 'aset-int aset-long aset-short assert assoc assoc! assoc-in associative? ' +
+ 'atom await await-for await1 bases bean bigdec bigint binding bit-and ' +
+ 'bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left ' +
+ 'bit-shift-right bit-test bit-xor boolean boolean-array booleans ' +
+ 'bound-fn bound-fn* butlast byte byte-array bytes cast char char-array ' +
+ 'char-escape-string char-name-string char? chars chunk chunk-append ' +
+ 'chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? ' +
+ 'class class? clear-agent-errors clojure-version coll? comment commute ' +
+ 'comp comparator compare compare-and-set! compile complement concat cond ' +
+ 'condp conj conj! cons constantly construct-proxy contains? count ' +
+ 'counted? create-ns create-struct cycle dec decimal? declare definline ' +
+ 'defmacro defmethod defmulti defn defn- defonce defstruct delay delay? ' +
+ 'deliver deref derive descendants destructure disj disj! dissoc dissoc! ' +
+ 'distinct distinct? doall doc dorun doseq dosync dotimes doto double ' +
+ 'double-array doubles drop drop-last drop-while empty empty? ensure ' +
+ 'enumeration-seq eval even? every? false? ffirst file-seq filter find ' +
+ 'find-doc find-ns find-var first float float-array float? floats flush ' +
+ 'fn fn? fnext for force format future future-call future-cancel ' +
+ 'future-cancelled? future-done? future? gen-class gen-interface gensym ' +
+ 'get get-in get-method get-proxy-class get-thread-bindings get-validator ' +
+ 'hash hash-map hash-set identical? identity if-let if-not ifn? import ' +
+ 'in-ns inc init-proxy instance? int int-array integer? interleave intern ' +
+ 'interpose into into-array ints io! isa? iterate iterator-seq juxt key ' +
+ 'keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list ' +
+ 'list* list? load load-file load-reader load-string loaded-libs locking ' +
+ 'long long-array longs loop macroexpand macroexpand-1 make-array ' +
+ 'make-hierarchy map map? mapcat max max-key memfn memoize merge ' +
+ 'merge-with meta method-sig methods min min-key mod name namespace neg? ' +
+ 'newline next nfirst nil? nnext not not-any? not-empty not-every? not= ' +
+ ' ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ' +
+ 'ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? ' +
+ 'or parents partial partition pcalls peek persistent! pmap pop pop! ' +
+ 'pop-thread-bindings pos? pr pr-str prefer-method prefers ' +
+ 'primitives-classnames print print-ctor print-doc print-dup print-method ' +
+ 'print-namespace-doc print-simple print-special-doc print-str printf ' +
+ 'println println-str prn prn-str promise proxy proxy-call-with-super ' +
+ 'proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot ' +
+ 'rand rand-int range ratio? rational? rationalize re-find re-groups ' +
+ 're-matcher re-matches re-pattern re-seq read read-line read-string ' +
+ 'reduce ref ref-history-count ref-max-history ref-min-history ref-set ' +
+ 'refer refer-clojure release-pending-sends rem remove remove-method ' +
+ 'remove-ns remove-watch repeat repeatedly replace replicate require ' +
+ 'reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq ' +
+ 'rsubseq second select-keys send send-off seq seq? seque sequence ' +
+ 'sequential? set set-validator! set? short short-array shorts ' +
+ 'shutdown-agents slurp some sort sort-by sorted-map sorted-map-by ' +
+ 'sorted-set sorted-set-by sorted? special-form-anchor special-symbol? ' +
+ 'split-at split-with str stream? string? struct struct-map subs subseq ' +
+ 'subvec supers swap! symbol symbol? sync syntax-symbol-anchor take ' +
+ 'take-last take-nth take-while test the-ns time to-array to-array-2d ' +
+ 'trampoline transient tree-seq true? type unchecked-add unchecked-dec ' +
+ 'unchecked-divide unchecked-inc unchecked-multiply unchecked-negate ' +
+ 'unchecked-remainder unchecked-subtract underive unquote ' +
+ 'unquote-splicing update-in update-proxy use val vals var-get var-set ' +
+ 'var? vary-meta vec vector vector? when when-first when-let when-not ' +
+ 'while with-bindings with-bindings* with-in-str with-loading-context ' +
+ 'with-local-vars with-meta with-open with-out-str with-precision xml-seq ' +
+ 'zero? zipmap ';
+
+ this.getKeywords = function (keywordStr) {
+ // quote special characters
+ keywordStr = keywordStr.replace(/[\-\[\]{}()*+?.\\\^$|,#]/g, "\\$&");
+ // trim whitespace and convert to alternatives
+ keywordStr = keywordStr.replace(/^\s+|\s+$/g, '').replace(/\s+/g, '|');
+ // create pattern
+ return '(?:' + keywordStr + ')';
+ };
+
+ this.regexList = [
+ // comments
+ { regex: new RegExp(';.*$', 'gm'),
+ css: 'comments' },
+ // strings
+ { regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString,
+ css: 'string' },
+ // regular expressions
+ { regex: /#"(?:\.|(\\\")|[^\""\n])*"/g,
+ css: 'string' },
+ // vectors
+ { regex: /\[|\]/g,
+ css: 'keyword' },
+ // amperstands
+ { regex: /&(amp;)?/g,
+ css: 'keyword' },
+ // sets and maps
+ { regex: /#?\{|\}/g,
+ css: 'keyword' },
+ // metadata
+ { regex: /#\^\{/g,
+ css: 'keyword' },
+ // anonymous fn syntactic sugar
+ { regex: /#\(|%/g,
+ css: 'keyword' },
+ // deref reader macro
+ { regex: /@/g,
+ css: 'keyword' },
+ // (un)quoted sexprs
+ { regex: /(['`]|~@?)[\[({]/g,
+ css: 'keyword' },
+ // lists
+ { regex: /\(|\)/g,
+ css: 'keyword' },
+ // character literals
+ { regex: /\\.\b/g,
+ css: 'value' },
+ // hexadecimal literals
+ { regex: /[+\-]?\b0x[0-9A-F]+\b/gi,
+ css: 'value' },
+ // integer/octal/float/bigdecimal literals
+ { regex: new ClojureRegExp("[+-]?\\b\\d+(\\.\\d*)?([eE][+-]?\\d+|M)?\\b"),
+ css: 'value' },
+ { regex: /^[+\-]?\b\d+(\.\d*)?([eE][+\-]?\d+|M)?\b/g,
+ css: 'value' },
+ // booleans+nil
+ { regex: /\b(true|false|nil)\b/g,
+ css: 'value' },
+ // (un)quoted symbols
+ { regex: /(`|#?'|~@?)[\w-.\/]+/g,
+ css: 'color1' },
+ // keywords
+ { regex: /:[A-Za-z0-9_\-]+/g,
+ css: 'constants' },
+ // special forms
+ { regex: new ClojureRegExp(this.getKeywords(special_forms)),
+ css: 'preprocessor' },
+ // type hints
+ { regex: /\#\^[A-Za-z]\w*/g,
+ css: 'preprocessor' },
+ // clojure.core
+ { regex: new ClojureRegExp(this.getKeywords(clojure_core)),
+ css: 'functions' }
+ ];
+
+ this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);
+};
+
+SyntaxHighlighter.brushes.Clojure.prototype = new SyntaxHighlighter.Highlighter();
+SyntaxHighlighter.brushes.Clojure.aliases = ['clojure', 'Clojure', 'clj'];
+
+// vim: ts=2 sw=2 noet
View
1,721 resources/public/script/shCore.js
@@ -0,0 +1,1721 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+//
+// Begin anonymous function. This is used to contain local scope variables without polutting global scope.
+//
+var SyntaxHighlighter = function() {
+
+// CommonJS
+if (typeof(require) != 'undefined' && typeof(XRegExp) == 'undefined')
+{
+ XRegExp = require('XRegExp').XRegExp;
+}
+
+// Shortcut object which will be assigned to the SyntaxHighlighter variable.
+// This is a shorthand for local reference in order to avoid long namespace
+// references to SyntaxHighlighter.whatever...
+var sh = {
+ defaults : {
+ /** Additional CSS class names to be added to highlighter elements. */
+ 'class-name' : '',
+
+ /** First line number. */
+ 'first-line' : 1,
+
+ /**
+ * Pads line numbers. Possible values are:
+ *
+ * false - don't pad line numbers.
+ * true - automaticaly pad numbers with minimum required number of leading zeroes.
+ * [int] - length up to which pad line numbers.
+ */
+ 'pad-line-numbers' : false,
+
+ /** Lines to highlight. */
+ 'highlight' : null,
+
+ /** Title to be displayed above the code block. */
+ 'title' : null,
+
+ /** Enables or disables smart tabs. */
+ 'smart-tabs' : true,
+
+ /** Gets or sets tab size. */
+ 'tab-size' : 4,
+
+ /** Enables or disables gutter. */
+ 'gutter' : true,
+
+ /** Enables or disables toolbar. */
+ 'toolbar' : true,
+
+ /** Enables quick code copy and paste from double click. */
+ 'quick-code' : true,
+
+ /** Forces code view to be collapsed. */
+ 'collapse' : false,
+
+ /** Enables or disables automatic links. */
+ 'auto-links' : true,
+
+ /** Gets or sets light mode. Equavalent to turning off gutter and toolbar. */
+ 'light' : false,
+
+ 'html-script' : false
+ },
+
+ config : {
+ space : '&nbsp;',
+
+ /** Enables use of <SCRIPT type="syntaxhighlighter" /> tags. */
+ useScriptTags : true,
+
+ /** Blogger mode flag. */
+ bloggerMode : false,
+
+ stripBrs : false,
+
+ /** Name of the tag that SyntaxHighlighter will automatically look for. */
+ tagName : 'pre',
+
+ strings : {
+ expandSource : 'expand source',
+ help : '?',
+ alert: 'SyntaxHighlighter\n\n',
+ noBrush : 'Can\'t find brush for: ',
+ brushNotHtmlScript : 'Brush wasn\'t configured for html-script option: ',
+
+ // this is populated by the build script
+ aboutDialog : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>About SyntaxHighlighter</title></head><body style="font-family:Geneva,Arial,Helvetica,sans-serif;background-color:#fff;color:#000;font-size:1em;text-align:center;"><div style="text-align:center;margin-top:1.5em;"><div style="font-size:xx-large;">SyntaxHighlighter</div><div style="font-size:.75em;margin-bottom:3em;"><div>version 3.0.83 (July 02 2010)</div><div><a href="http://alexgorbatchev.com/SyntaxHighlighter" target="_blank" style="color:#005896">http://alexgorbatchev.com/SyntaxHighlighter</a></div><div>JavaScript code syntax highlighter.</div><div>Copyright 2004-2010 Alex Gorbatchev.</div></div><div>If you like this script, please <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2930402" style="color:#005896">donate</a> to <br/>keep development active!</div></div></body></html>'
+ }
+ },
+
+ /** Internal 'global' variables. */
+ vars : {
+ discoveredBrushes : null,
+ highlighters : {}
+ },
+
+ /** This object is populated by user included external brush files. */
+ brushes : {},
+
+ /** Common regular expressions. */
+ regexLib : {
+ multiLineCComments : /\/\*[\s\S]*?\*\//gm,
+ singleLineCComments : /\/\/.*$/gm,
+ singleLinePerlComments : /#.*$/gm,
+ doubleQuotedString : /"([^\\"\n]|\\.)*"/g,
+ singleQuotedString : /'([^\\'\n]|\\.)*'/g,
+ multiLineDoubleQuotedString : new XRegExp('"([^\\\\"]|\\\\.)*"', 'gs'),
+ multiLineSingleQuotedString : new XRegExp("'([^\\\\']|\\\\.)*'", 'gs'),
+ xmlComments : /(&lt;|<)!--[\s\S]*?--(&gt;|>)/gm,
+ url : /\w+:\/\/[\w-.\/?%&=:@;]*/g,
+
+ /** <?= ?> tags. */
+ phpScriptTags : { left: /(&lt;|<)\?=?/g, right: /\?(&gt;|>)/g },
+
+ /** <%= %> tags. */
+ aspScriptTags : { left: /(&lt;|<)%=?/g, right: /%(&gt;|>)/g },
+
+ /** <script></script> tags. */
+ scriptScriptTags : { left: /(&lt;|<)\s*script.*?(&gt;|>)/gi, right: /(&lt;|<)\/\s*script\s*(&gt;|>)/gi }
+ },
+
+ toolbar: {
+ /**
+ * Generates HTML markup for the toolbar.
+ * @param {Highlighter} highlighter Highlighter instance.
+ * @return {String} Returns HTML markup.
+ */
+ getHtml: function(highlighter)
+ {
+ var html = '<div class="toolbar">',
+ items = sh.toolbar.items,
+ list = items.list
+ ;
+
+ function defaultGetHtml(highlighter, name)
+ {
+ return sh.toolbar.getButtonHtml(highlighter, name, sh.config.strings[name]);
+ };
+
+ for (var i = 0; i < list.length; i++)
+ html += (items[list[i]].getHtml || defaultGetHtml)(highlighter, list[i]);
+
+ html += '</div>';
+
+ return html;
+ },
+
+ /**
+ * Generates HTML markup for a regular button in the toolbar.
+ * @param {Highlighter} highlighter Highlighter instance.
+ * @param {String} commandName Command name that would be executed.
+ * @param {String} label Label text to display.
+ * @return {String} Returns HTML markup.
+ */
+ getButtonHtml: function(highlighter, commandName, label)
+ {
+ return '<span><a href="#" class="toolbar_item'
+ + ' command_' + commandName
+ + ' ' + commandName
+ + '">' + label + '</a></span>'
+ ;
+ },
+
+ /**
+ * Event handler for a toolbar anchor.
+ */
+ handler: function(e)
+ {
+ var target = e.target,
+ className = target.className || ''
+ ;
+
+ function getValue(name)
+ {
+ var r = new RegExp(name + '_(\\w+)'),
+ match = r.exec(className)
+ ;
+
+ return match ? match[1] : null;
+ };
+
+ var highlighter = getHighlighterById(findParentElement(target, '.syntaxhighlighter').id),
+ commandName = getValue('command')
+ ;
+
+ // execute the toolbar command
+ if (highlighter && commandName)
+ sh.toolbar.items[commandName].execute(highlighter);
+
+ // disable default A click behaviour
+ e.preventDefault();
+ },
+
+ /** Collection of toolbar items. */
+ items : {
+ // Ordered lis of items in the toolbar. Can't expect `for (var n in items)` to be consistent.
+ list: ['expandSource', 'help'],
+
+ expandSource: {
+ getHtml: function(highlighter)
+ {
+ if (highlighter.getParam('collapse') != true)
+ return '';
+
+ var title = highlighter.getParam('title');
+ return sh.toolbar.getButtonHtml(highlighter, 'expandSource', title ? title : sh.config.strings.expandSource);
+ },
+
+ execute: function(highlighter)
+ {
+ var div = getHighlighterDivById(highlighter.id);
+ removeClass(div, 'collapsed');
+ }
+ },
+
+ /** Command to display the about dialog window. */
+ help: {
+ execute: function(highlighter)
+ {
+ var wnd = popup('', '_blank', 500, 250, 'scrollbars=0'),
+ doc = wnd.document
+ ;
+
+ doc.write(sh.config.strings.aboutDialog);
+ doc.close();
+ wnd.focus();
+ }
+ }
+ }
+ },
+
+ /**
+ * Finds all elements on the page which should be processes by SyntaxHighlighter.
+ *
+ * @param {Object} globalParams Optional parameters which override element's
+ * parameters. Only used if element is specified.
+ *
+ * @param {Object} element Optional element to highlight. If none is
+ * provided, all elements in the current document
+ * are returned which qualify.
+ *
+ * @return {Array} Returns list of <code>{ target: DOMElement, params: Object }</code> objects.
+ */
+ findElements: function(globalParams, element)
+ {
+ var elements = element ? [element] : toArray(document.getElementsByTagName(sh.config.tagName)),
+ conf = sh.config,
+ result = []
+ ;
+
+ // support for <SCRIPT TYPE="syntaxhighlighter" /> feature
+ if (conf.useScriptTags)
+ elements = elements.concat(getSyntaxHighlighterScriptTags());
+
+ if (elements.length === 0)
+ return result;
+
+ for (var i = 0; i < elements.length; i++)
+ {
+ var item = {
+ target: elements[i],
+ // local params take precedence over globals
+ params: merge(globalParams, parseParams(elements[i].className))
+ };
+
+ if (item.params['brush'] == null)
+ continue;
+
+ result.push(item);
+ }
+
+ return result;
+ },
+
+ /**
+ * Shorthand to highlight all elements on the page that are marked as
+ * SyntaxHighlighter source code.
+ *
+ * @param {Object} globalParams Optional parameters which override element's
+ * parameters. Only used if element is specified.
+ *
+ * @param {Object} element Optional element to highlight. If none is
+ * provided, all elements in the current document
+ * are highlighted.
+ */
+ highlight: function(globalParams, element)
+ {
+ var elements = this.findElements(globalParams, element),
+ propertyName = 'innerHTML',
+ highlighter = null,
+ conf = sh.config
+ ;
+
+ if (elements.length === 0)
+ return;
+
+ for (var i = 0; i < elements.length; i++)
+ {
+ var element = elements[i],
+ target = element.target,
+ params = element.params,
+ brushName = params.brush,
+ code
+ ;
+
+ if (brushName == null)
+ continue;
+
+ // Instantiate a brush
+ if (params['html-script'] == 'true' || sh.defaults['html-script'] == true)
+ {
+ highlighter = new sh.HtmlScript(brushName);
+ brushName = 'htmlscript';
+ }
+ else
+ {
+ var brush = findBrush(brushName);
+
+ if (brush)
+ highlighter = new brush();
+ else
+ continue;
+ }
+
+ code = target[propertyName];
+
+ // remove CDATA from <SCRIPT/> tags if it's present
+ if (conf.useScriptTags)
+ code = stripCData(code);
+
+ // Inject title if the attribute is present
+ if ((target.title || '') != '')
+ params.title = target.title;
+
+ params['brush'] = brushName;
+ highlighter.init(params);
+ element = highlighter.getDiv(code);
+
+ // carry over ID
+ if ((target.id || '') != '')
+ element.id = target.id;
+
+ target.parentNode.replaceChild(element, target);
+ }
+ },
+
+ /**
+ * Main entry point for the SyntaxHighlighter.
+ * @param {Object} params Optional params to apply to all highlighted elements.
+ */
+ all: function(params)
+ {
+ attachEvent(
+ window,
+ 'load',
+ function() { sh.highlight(params); }
+ );
+ }
+}; // end of sh
+
+sh['all'] = sh.all;
+sh['highlight'] = sh.highlight;
+
+/**
+ * Checks if target DOM elements has specified CSS class.
+ *