| @@ -0,0 +1,50 @@ | |||||
| .code pre { | |||||
| margin:0; | |||||
| border:none; | |||||
| white-space: pre !important; | |||||
| word-wrap: normal !important; | |||||
| color: #5e5e5e; | |||||
| } | |||||
| body { | |||||
| font-family: Arial, FreeSans, Helvetica, sans-serif; | |||||
| font-size: 13px; | |||||
| color: #000000; | |||||
| margin: 0; | |||||
| padding: 0; | |||||
| overflow-x: auto; | |||||
| } | |||||
| .docco-container | |||||
| { | |||||
| margin-top: 50px; | |||||
| } | |||||
| #grabber { | |||||
| border: #dadada solid thin; | |||||
| width: 5px; | |||||
| background: #e8e8e8; | |||||
| position: absolute; | |||||
| top: 0; | |||||
| left: 0; | |||||
| z-index: 10; | |||||
| cursor: ew-resize; | |||||
| } | |||||
| .nav .nav-header { | |||||
| text-transform: none; | |||||
| font-size: 12px; | |||||
| } | |||||
| .dropdown-menu a { | |||||
| font-size: 11px; | |||||
| } | |||||
| div.hidden-code-line, a.hidden-code-toggle { | |||||
| color: #3A87AD; | |||||
| } | |||||
| .doctext{ | |||||
| margin-top:5px; | |||||
| } | |||||
| @@ -0,0 +1 @@ | |||||
| <!DOCTYPE html><html><head><meta name="google" value="notranslate"><meta http-equiv="content-type" content="text/html;charset=utf-8"><title>Docco Index</title><link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css"/><link href="./css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"/><link href="./css/atlassian-docco.css" rel="stylesheet" type="text/css"/></head><body><div id="docco-index"><h1>Docco Index</h1><ul><li class="nav-header">Expression</li><li><a href="./src/main/java/expression/Addition.java.html">Addition.java</a></li><li><a href="./src/main/java/expression/Expression.java.html">Expression.java</a></li><li><a href="./src/main/java/expression/Identifier.java.html">Identifier.java</a></li><li><a href="./src/main/java/expression/Int.java.html">Int.java</a></li><li><a href="./src/main/java/expression/Subtraction.java.html">Subtraction.java</a></li><li class="nav-header">Interpreter</li><li><a href="./src/main/java/interpreter/Evaluator.java.html">Evaluator.java</a></li><li><a href="./src/main/java/interpreter/Interpreter.java.html">Interpreter.java</a></li><li><a href="./src/main/java/interpreter/InterpreterException.java.html">InterpreterException.java</a></li><li><a href="./src/main/java/interpreter/Visitor.java.html">Visitor.java</a></li><li class="nav-header">Parser</li><li><a href="./src/main/java/parser/Parser.java.html">Parser.java</a></li><li><a href="./src/main/java/parser/SyntaxException.java.html">SyntaxException.java</a></li><li class="nav-header">Program</li><li><a href="./src/main/java/program/Assignment.java.html">Assignment.java</a></li><li><a href="./src/main/java/program/Composition.java.html">Composition.java</a></li><li><a href="./src/main/java/program/Conditional.java.html">Conditional.java</a></li><li><a href="./src/main/java/program/Loop.java.html">Loop.java</a></li><li><a href="./src/main/java/program/Program.java.html">Program.java</a></li></ul></div></body></html> | |||||
| @@ -0,0 +1,138 @@ | |||||
| $(document).ready(function () { | |||||
| var grabber = $('#grabber'); | |||||
| var startX; | |||||
| function positionGrabber(){ | |||||
| grabber.draggable("option","containment",[200,0,$(window).width() - 200,0]); | |||||
| grabber.css({ | |||||
| height: function(){ | |||||
| return ($(document).height() - $(".code:visible").first().position().top); | |||||
| } | |||||
| ,left: function(){ | |||||
| return $(".code pre:visible").first().position().left; | |||||
| } | |||||
| ,top: function(){ | |||||
| return $(".code:visible").first().position().top; | |||||
| } | |||||
| }); | |||||
| } | |||||
| function initGrabber(){ | |||||
| grabber.draggable({ | |||||
| axis:'x' | |||||
| ,start:function(event,ui){ | |||||
| startX = ui.position.left; | |||||
| } | |||||
| ,drag: function(event,ui){ | |||||
| var xOffset = ui.position.left - startX; | |||||
| var newDocW = $(".doc:visible").first().width() + xOffset; | |||||
| var newDocPercent = ( 100 * newDocW / parseFloat($(".doc").first().parent().css("width")) )+ "%" ; | |||||
| var newCodeW = $(".code:visible").first().width() - xOffset; | |||||
| var newCodePercent = ( 100 * newCodeW / parseFloat($(".code").first().parent().css("width")) )+ "%" ; | |||||
| $(".doc").width(newDocPercent); | |||||
| $(".code").width(newCodePercent); | |||||
| startX = $(".code pre:visible").first().position().left; | |||||
| } | |||||
| ,stop: function(){ | |||||
| positionGrabber(); | |||||
| } | |||||
| }); | |||||
| positionGrabber(); | |||||
| } | |||||
| function initThemes(){ | |||||
| var menu = $("#themeDropdown"); | |||||
| menu.on("click","li > a.themeLink",function(event){ | |||||
| switchStylesheet($(this).text()); | |||||
| }); | |||||
| menu.append('<li class="nav-header">Light</li>'); | |||||
| $(".codebrush.light").each(function(index){ | |||||
| menu.append('<li><a class="themeLink" href="#">' + $(this).attr("title") + '</a></li>'); | |||||
| }); | |||||
| menu.append('<li class="nav-header">Dark</li>'); | |||||
| $(".codebrush.dark").each(function(index){ | |||||
| menu.append('<li><a class="themeLink" href="#">' + $(this).attr("title") + '</a></li>'); | |||||
| }); | |||||
| } | |||||
| function switchStylesheet(styleName) | |||||
| { | |||||
| $('link.codebrush').each(function(i) | |||||
| { | |||||
| this.disabled = true; | |||||
| if($(this).attr('title') == styleName) | |||||
| { | |||||
| this.disabled = false; | |||||
| } | |||||
| }); | |||||
| $('#themeDropdown > li').each(function(i) | |||||
| { | |||||
| $(this).removeClass('active'); | |||||
| if($('a.themeLink',this).text() == styleName) | |||||
| { | |||||
| $(this).addClass('active'); | |||||
| } | |||||
| }); | |||||
| $.cookie("doccoCodeTheme",styleName,{path:'/',expires:365}); | |||||
| } | |||||
| function initHiddenCode() | |||||
| { | |||||
| $.each($('.docco-section'), function() { | |||||
| var $this = $(this); | |||||
| var code = $('pre', $this); | |||||
| var lines = code.text().split('\n'); | |||||
| $('.linecount', $this).text(lines.length); | |||||
| $('.hidden-code, .hidden-doc', $this).hide(); | |||||
| }); | |||||
| $('.hidden-code-toggle').click(function (e) { | |||||
| var $target = $(e.target); | |||||
| var $section = $("#section-" + $target.attr("index")); | |||||
| $(".hidden-code, .hidden-doc", $section).slideToggle("slow", function() { | |||||
| var $this = $(this); | |||||
| if ($this.is(":visible")) { | |||||
| var newText = $target.html().replace("Show","Hide"); | |||||
| $target.html(newText); | |||||
| } | |||||
| else { | |||||
| var newText = $target.html().replace("Hide","Show"); | |||||
| $target.html(newText); | |||||
| } | |||||
| positionGrabber(); | |||||
| }); | |||||
| }); | |||||
| } | |||||
| var myTheme = $.cookie("doccoCodeTheme"); | |||||
| if(null == myTheme) | |||||
| { | |||||
| myTheme = "IDEA"; | |||||
| } | |||||
| initThemes(); | |||||
| switchStylesheet(myTheme); | |||||
| initGrabber(); | |||||
| $(window).on('resize',positionGrabber); | |||||
| hljs.initHighlightingOnLoad(); | |||||
| initHiddenCode(); | |||||
| }); | |||||
| @@ -0,0 +1,47 @@ | |||||
| /* | |||||
| * jQuery Cookie Plugin | |||||
| * https://github.com/carhartl/jquery-cookie | |||||
| * | |||||
| * Copyright 2011, Klaus Hartl | |||||
| * Dual licensed under the MIT or GPL Version 2 licenses. | |||||
| * http://www.opensource.org/licenses/mit-license.php | |||||
| * http://www.opensource.org/licenses/GPL-2.0 | |||||
| */ | |||||
| (function($) { | |||||
| $.cookie = function(key, value, options) { | |||||
| // key and at least value given, set cookie... | |||||
| if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) { | |||||
| options = $.extend({}, options); | |||||
| if (value === null || value === undefined) { | |||||
| options.expires = -1; | |||||
| } | |||||
| if (typeof options.expires === 'number') { | |||||
| var days = options.expires, t = options.expires = new Date(); | |||||
| t.setDate(t.getDate() + days); | |||||
| } | |||||
| value = String(value); | |||||
| return (document.cookie = [ | |||||
| encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), | |||||
| options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE | |||||
| options.path ? '; path=' + options.path : '', | |||||
| options.domain ? '; domain=' + options.domain : '', | |||||
| options.secure ? '; secure' : '' | |||||
| ].join('')); | |||||
| } | |||||
| // key and possibly options given, get cookie... | |||||
| options = value || {}; | |||||
| var decode = options.raw ? function(s) { return s; } : decodeURIComponent; | |||||
| var pairs = document.cookie.split('; '); | |||||
| for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) { | |||||
| if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined | |||||
| } | |||||
| return null; | |||||
| }; | |||||
| })(jQuery); | |||||
| @@ -0,0 +1,43 @@ | |||||
| .code pre { | |||||
| border: #3A87AD dashed thin; | |||||
| border-right:0px; | |||||
| white-space: pre !important; | |||||
| word-wrap: normal !important; | |||||
| color: #5e5e5e; | |||||
| } | |||||
| .code pre code { | |||||
| } | |||||
| body { | |||||
| font-family: Arial, FreeSans, Helvetica, sans-serif; | |||||
| font-size: 13px; | |||||
| color: #000000; | |||||
| margin: 0; | |||||
| padding: 0; | |||||
| overflow-x: auto; | |||||
| } | |||||
| .docco-container | |||||
| { | |||||
| margin-top: 50px; | |||||
| } | |||||
| .nav .nav-header { | |||||
| text-transform: none; | |||||
| font-size: 12px; | |||||
| } | |||||
| .dropdown-menu a { | |||||
| font-size: 11px; | |||||
| } | |||||
| div.hidden-code-line, a.hidden-code-toggle { | |||||
| color: #3A87AD; | |||||
| } | |||||
| .doctext{ | |||||
| margin-top:5px; | |||||
| } | |||||
| @@ -0,0 +1 @@ | |||||
| <!DOCTYPE html><html><head><meta name="google" value="notranslate"><meta http-equiv="content-type" content="text/html;charset=utf-8"><title>Docco Index</title><link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css"/><link href="./css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"/><link href="./css/atlassian-docco.css" rel="stylesheet" type="text/css"/></head><body><div id="docco-index"><h1>Docco Index</h1><ul><li class="nav-header">Expression</li><li><a href="./src/main/java/expression/Addition.java.html">Addition.java</a></li><li><a href="./src/main/java/expression/Expression.java.html">Expression.java</a></li><li><a href="./src/main/java/expression/Identifier.java.html">Identifier.java</a></li><li><a href="./src/main/java/expression/Int.java.html">Int.java</a></li><li><a href="./src/main/java/expression/Subtraction.java.html">Subtraction.java</a></li><li class="nav-header">Interpreter</li><li><a href="./src/main/java/interpreter/Evaluator.java.html">Evaluator.java</a></li><li><a href="./src/main/java/interpreter/Interpreter.java.html">Interpreter.java</a></li><li><a href="./src/main/java/interpreter/InterpreterException.java.html">InterpreterException.java</a></li><li><a href="./src/main/java/interpreter/Visitor.java.html">Visitor.java</a></li><li class="nav-header">Parser</li><li><a href="./src/main/java/parser/Parser.java.html">Parser.java</a></li><li><a href="./src/main/java/parser/SyntaxException.java.html">SyntaxException.java</a></li><li class="nav-header">Program</li><li><a href="./src/main/java/program/Assignment.java.html">Assignment.java</a></li><li><a href="./src/main/java/program/Composition.java.html">Composition.java</a></li><li><a href="./src/main/java/program/Conditional.java.html">Conditional.java</a></li><li><a href="./src/main/java/program/Loop.java.html">Loop.java</a></li><li><a href="./src/main/java/program/Program.java.html">Program.java</a></li></ul></div></body></html> | |||||
| @@ -0,0 +1,87 @@ | |||||
| $(document).ready(function () { | |||||
| function initThemes(){ | |||||
| var menu = $("#themeDropdown"); | |||||
| menu.on("click","li > a.themeLink",function(event){ | |||||
| switchStylesheet($(this).text()); | |||||
| }); | |||||
| menu.append('<li class="nav-header">Light</li>'); | |||||
| $(".codebrush.light").each(function(index){ | |||||
| menu.append('<li><a class="themeLink" href="#">' + $(this).attr("title") + '</a></li>'); | |||||
| }); | |||||
| menu.append('<li class="nav-header">Dark</li>'); | |||||
| $(".codebrush.dark").each(function(index){ | |||||
| menu.append('<li><a class="themeLink" href="#">' + $(this).attr("title") + '</a></li>'); | |||||
| }); | |||||
| } | |||||
| function switchStylesheet(styleName) | |||||
| { | |||||
| $('link.codebrush').each(function(i) | |||||
| { | |||||
| this.disabled = true; | |||||
| if($(this).attr('title') == styleName) | |||||
| { | |||||
| this.disabled = false; | |||||
| } | |||||
| }); | |||||
| $('#themeDropdown > li').each(function(i) | |||||
| { | |||||
| $(this).removeClass('active'); | |||||
| if($('a.themeLink',this).text() == styleName) | |||||
| { | |||||
| $(this).addClass('active'); | |||||
| } | |||||
| }); | |||||
| $.cookie("doccoCodeTheme",styleName,{path:'/',expires:365}); | |||||
| } | |||||
| function initHiddenCode() | |||||
| { | |||||
| $.each($('.docco-section'), function() { | |||||
| var $this = $(this); | |||||
| var code = $('pre', $this); | |||||
| var lines = code.text().split('\n'); | |||||
| $('.linecount', $this).text(lines.length); | |||||
| $('.hidden-code, .hidden-doc', $this).hide(); | |||||
| }); | |||||
| $('.hidden-code-toggle').click(function (e) { | |||||
| var $target = $(e.target); | |||||
| var $section = $("#section-" + $target.attr("index")); | |||||
| $(".hidden-code, .hidden-doc", $section).slideToggle("slow", function() { | |||||
| var $this = $(this); | |||||
| if ($this.is(":visible")) { | |||||
| var newText = $target.html().replace("Show","Hide"); | |||||
| $target.html(newText); | |||||
| } | |||||
| else { | |||||
| var newText = $target.html().replace("Hide","Show"); | |||||
| $target.html(newText); | |||||
| } | |||||
| }); | |||||
| }); | |||||
| } | |||||
| var myTheme = $.cookie("doccoCodeTheme"); | |||||
| if(null == myTheme) | |||||
| { | |||||
| myTheme = "IDEA"; | |||||
| } | |||||
| initThemes(); | |||||
| switchStylesheet(myTheme); | |||||
| hljs.initHighlightingOnLoad(); | |||||
| initHiddenCode(); | |||||
| }); | |||||
| @@ -0,0 +1,47 @@ | |||||
| /* | |||||
| * jQuery Cookie Plugin | |||||
| * https://github.com/carhartl/jquery-cookie | |||||
| * | |||||
| * Copyright 2011, Klaus Hartl | |||||
| * Dual licensed under the MIT or GPL Version 2 licenses. | |||||
| * http://www.opensource.org/licenses/mit-license.php | |||||
| * http://www.opensource.org/licenses/GPL-2.0 | |||||
| */ | |||||
| (function($) { | |||||
| $.cookie = function(key, value, options) { | |||||
| // key and at least value given, set cookie... | |||||
| if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) { | |||||
| options = $.extend({}, options); | |||||
| if (value === null || value === undefined) { | |||||
| options.expires = -1; | |||||
| } | |||||
| if (typeof options.expires === 'number') { | |||||
| var days = options.expires, t = options.expires = new Date(); | |||||
| t.setDate(t.getDate() + days); | |||||
| } | |||||
| value = String(value); | |||||
| return (document.cookie = [ | |||||
| encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), | |||||
| options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE | |||||
| options.path ? '; path=' + options.path : '', | |||||
| options.domain ? '; domain=' + options.domain : '', | |||||
| options.secure ? '; secure' : '' | |||||
| ].join('')); | |||||
| } | |||||
| // key and possibly options given, get cookie... | |||||
| options = value || {}; | |||||
| var decode = options.raw ? function(s) { return s; } : decodeURIComponent; | |||||
| var pairs = document.cookie.split('; '); | |||||
| for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) { | |||||
| if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined | |||||
| } | |||||
| return null; | |||||
| }; | |||||
| })(jQuery); | |||||