diff --git a/templates/default/command_details/html/setup.rb b/templates/default/command_details/html/setup.rb new file mode 100644 index 0000000..0a6869c --- /dev/null +++ b/templates/default/command_details/html/setup.rb @@ -0,0 +1,6 @@ +# This code is free software; you can redistribute it and/or modify it under +# the terms of the new BSD License. +# +# Copyright (c) 2010, Sebastian Staudt + +include T('default/method_details/html') diff --git a/templates/default/command_details/setup.rb b/templates/default/command_details/setup.rb index bda990a..a3903ba 100644 --- a/templates/default/command_details/setup.rb +++ b/templates/default/command_details/setup.rb @@ -3,6 +3,8 @@ # # Copyright (c) 2010, Sebastian Staudt +include T('default/method_details') + def init - sections :header, [:command_signature, T('docstring')] + sections :header, [:command_signature, T('docstring'), :source] end diff --git a/templates/default/fulldoc/html/js/rubikon.js b/templates/default/fulldoc/html/js/rubikon.js new file mode 100644 index 0000000..472d84d --- /dev/null +++ b/templates/default/fulldoc/html/js/rubikon.js @@ -0,0 +1,21 @@ +/** + * This code is free software; you can redistribute it and/or modify it under + * the terms of the new BSD License. + * + * Copyright (c) 2010, Sebastian Staudt + */ + +function createCommandSourceLinks() { + $('.command_details .source_code'). + before("[View source]"); + $('.toggleCommandSource').toggle(function() { + $(this).parent().next().slideDown(100); + $(this).text("Hide source"); + }, + function() { + $(this).parent().next().slideUp(100); + $(this).text("View source"); + }); +} + +$(createCommandSourceLinks); diff --git a/templates/default/fulldoc/html/setup.rb b/templates/default/fulldoc/html/setup.rb new file mode 100644 index 0000000..6da1a60 --- /dev/null +++ b/templates/default/fulldoc/html/setup.rb @@ -0,0 +1,9 @@ +# This code is free software; you can redistribute it and/or modify it under +# the terms of the new BSD License. +# +# Copyright (c) 2010, Sebastian Staudt + +def generate_assets + asset('js/rubikon.js', file('js/rubikon.js', true)) + super +end diff --git a/templates/default/layout/html/headers.erb b/templates/default/layout/html/headers.erb new file mode 100644 index 0000000..6a1772b --- /dev/null +++ b/templates/default/layout/html/headers.erb @@ -0,0 +1,2 @@ +<%= superb(:headers) %> +