Skip to content

Commit

Permalink
* Completely new design for BioRuby shell on Rails translated from
Browse files Browse the repository at this point in the history
  the 'DibdoltRed' theme on www.openwebdesign.org which is created by
  Darjan Panic and Brian Green as a public domain work.
  • Loading branch information
ktym committed Jul 9, 2007
1 parent 333fc51 commit 7c15b25
Show file tree
Hide file tree
Showing 12 changed files with 181 additions and 64 deletions.
Expand Up @@ -20,6 +20,8 @@ def manifest
m.file 'bioruby.rhtml', 'app/views/layouts/bioruby.rhtml'
m.file 'bioruby.png', 'public/images/bioruby.png'
m.file 'bioruby.gif', 'public/images/bioruby.gif'
m.file 'bg.gif', 'public/images/bg.gif'
m.file 'console.png', 'public/images/console.png'
m.file 'bioruby.css', 'public/stylesheets/bioruby.css'
end
end
Expand Down
@@ -1,2 +1,4 @@
[ <%= @class %> ]
<div id="class_list">
<%= @classes.map{ |x| reference_link(x) }.join(" > ") %>
</div>
@@ -1,5 +1,4 @@
<div id="log_<%= @number %>" class="log">
<hr class="log">
<div class="input">
Input: [<%= link_to_remote @number, :url => {:action => "reload_script", :number => @number} %>]
<pre class="script">
Expand Down
@@ -1,9 +1,11 @@
[ <%= @class %> ]
<table id="list_methods">
<div id="method_list">
<table>
<tr>
<%- step = @methods.size / 4 + 1 -%>
<%- 0.step(@methods.size, step) do |i| -%>
<td><%= @methods.sort[i, step].join("<br>") %></td>
<td><%= @methods[i, step].join("<br>") %></td>
<%- end -%>
</tr>
</table>
</table>
</div>
@@ -1,2 +1,4 @@
[ <%= @class %> ]
<%= @modules.map {|x| reference_link(x) }.join(" | ") %>
<div id="module_list">
<%= @modules.map {|x| reference_link(x) }.sort.join("<br>") %>
</div>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,15 +1,57 @@
/* body */

body {
color: #6e8377;
background-color: #ffffff;
font-family: verdana, arial, helvetica, sans-serif;
margin: 0;
color: #555555;
background: url("/images/bg.gif") repeat-y center;
font-family: "trebuchet ms", verdana, arial, helvetica, sans-serif;
font-size: 12px;
}

div#content {
width: 750px;
height: auto;
margin: 0 auto 0 auto;
text-align: left;
}

/* title */

div#title {
width: 550px;
padding-right: 200px;
margin-bottom: 20px;
text-align: left;
background: url("/images/bioruby.png") no-repeat left bottom;
}

div#title .titletop {
color: #736451;
font-size: 30px;
font-weight: normal;
text-align: left;
text-indent: 70px;
margin: 0;
padding: 0;
padding-top: 20px;
margin-bottom: 10px;
}

div#title .titlesub {
color: #000000;
font-size: 15px;
font-weight: normal;
text-align: left;
text-indent: 70px;
margin: 0;
padding: 0;
border-bottom: 1px solid #eeeeee;
}

/* main */

div#main {
width: 700px;
width: 550px;
background-color: #ffffff;
padding-top: 0px;
padding-left: 10px;
Expand All @@ -19,6 +61,7 @@ div#notice {
background-color: #fcc;
border: 1px solid #f00;
}

div#notice p {
margin: 0;
padding: 10px;
Expand All @@ -31,9 +74,17 @@ pre {
border-style: dashed;
border-width: 1px;
padding: 5px;
width: 500px;
overflow: auto;
}

div.log {
width: 500px;
margin-top: 15px;
padding-top: 5px;
border-top: 1px dotted #333333;
}

div.log div.input pre.script {
background-color: #ffffeb;
border-style: solid;
Expand Down Expand Up @@ -65,25 +116,55 @@ div.log div.output pre.output {
border-style: dashed;
}

div.log hr.result {
div.log hr.log {
border-style: dotted none none none;
border-top-width: 1px;
border-color: #6e8377;
width: 200px;
height: 1px;
}

/* side */

div#side {
width: 150px;
background-color: #ffffff;
position: absolute;
top: 10px;
left: 10px;
float: right;
margin-top: 20px;
text-align: left;
font-size: 12px;
color: #e44268;
}

div#side div.title {
font-weight: normal;
color: #e44268;
text-align: left;
border-width: 0px 0px 1px 0px;
border-bottom: 1px solid #e44268;
}

div#side a:link {
color: #ffffff;
text-decoration: none;
}

div#side a:visited {
color: #ffffff;
text-decoration: none;
}

div#side a:hover {
color: #cccccc;
text-decoration: underline;
}

div#side ol,ul {
margin: 10px;
padding-left: 10px;
}

div#side li {
color: #e44268;
}

div#side img {
Expand All @@ -92,7 +173,8 @@ div#side img {

/* history */

div#history {
div#history {
width: 500px;
}

div#history div.histtime {
Expand All @@ -107,13 +189,20 @@ div#history div.histline {
white-space: pre;
}

/* command */

div#command {
width: 500px;
}

/* image */

img {
/* centering */
display: block;
margin-left: auto;
margin-right: auto;
border: 0px;
}

/* em */
Expand Down Expand Up @@ -207,11 +296,6 @@ table {
border-collapse: collapse;
}

table#list_methods {
width: 680px;
border: none;
}

th {
vertical-align: top;
padding: 5px;
Expand All @@ -222,14 +306,42 @@ td {
padding: 5px;
}

div#method_list table {
border: none;
}


/* form */

input {
background-color: #FFFFFF;
padding: 2px;
font-size: 10px;
color: #666666;
border: 1px solid #611022;
margin-bottom: 2px;
}

input[type=submit] {
background-color: #FFFFFF;
padding: 2px;
font-size: 10px;
color: #ffffff;
border: 1px solid #611022;
background-color: #E44268;
margin-bottom: 2px;
}

/* textarea */

textarea {
background: url("/images/console.png") no-repeat center;
background-color: #eaedeb;
font-family: monospace;
font-size: 100%;
font-size: 12px;
overflow: auto;
width: 80%;
width: 500px;
padding: 5px;
}


Expand All @@ -251,7 +363,7 @@ blockquote {
}

@media screen {
div#main { margin-left: 150px; }
div#main { margin-left: 0px; }
div#side { display: block; }
}

@@ -1,41 +1,47 @@
<html>
<!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>BioRuby shell on Rails</title>
<%= stylesheet_link_tag "bioruby.css" %>
<%= javascript_include_tag :defaults %>
</head>
<body>

<div id="side">
<img src="/images/bioruby.png">
<br>

<div class="title">Project</div>
<ul>
<li><%= link_to "#{File.basename(project_workdir)}", "file://#{project_workdir}" %>
</ul>
<body>

<div class="title">Functions</div>
<ul>
<li><%= link_to "Console", :action => "index" %></li>
<li><%= link_to "History", :action => "history" %></li>
<li><%= link_to "Commands", :action => "commands" %></li>
</ul>
<div id="content">

<div class="title">Local variables</div>
<%= render :partial => "variables" %>
<div id="side">
<div class="title">Project</div>
<ul>
<li><%= link_to "#{File.basename(project_workdir)}", "file://#{project_workdir}" %>
</ul>

<br>
<a href="http://bioruby.org/"><img src="/images/bioruby.gif" border=0></a>
</div>
<div class="title">Functions</div>
<ul>
<li><%= link_to "Console", :action => "index" %></li>
<li><%= link_to "History", :action => "history" %></li>
<li><%= link_to "Commands", :action => "commands" %></li>
</ul>

<div class="title">Local variables</div>
<%= render :partial => "variables" %>

<div id="main">
<br>
<a href="http://bioruby.org/"><img src="/images/bioruby.gif" border=0></a>
</div><!-- side -->

<h1>BioRuby shell on Rails</h1>
<div id="title">
<p class="titletop">BioRuby shell on Rails</p>
<p class="titlesub">Web interface for the BioRuby library</p>
</div><!-- title -->

<div id="main">
<%= yield %>
</div><!-- main -->

</div>
</div><!-- content -->

</body>

</html>
Expand Up @@ -3,16 +3,7 @@ class BiorubyController < ApplicationController
HIDE_METHODS = Object.methods + [ "singleton_method_added" ]

HIDE_MODULES = [
ActiveSupport::CoreExtensions::String::Iterators,
ActiveSupport::CoreExtensions::String::StartsEndsWith,
ActiveSupport::CoreExtensions::String::Inflections,
ActiveSupport::CoreExtensions::String::Conversions,
ActiveSupport::CoreExtensions::String::Access,
ActiveSupport::CoreExtensions::String::Unicode,
ActiveSupport::CoreExtensions::Numeric::Bytes,
ActiveSupport::CoreExtensions::Numeric::Time,
Base64::Deprecated, Base64, PP::ObjectMixin,
Bio::Shell
Base64::Deprecated, Base64, PP::ObjectMixin, Bio::Shell,
]
HIDE_MODULES << WEBrick if defined?(WEBrick)

Expand Down Expand Up @@ -62,7 +53,7 @@ def list_methods

script, result, output = Bio::Shell.cache[:results].restore(number)
@class = result.class
@methods = result.methods - HIDE_METHODS
@methods = (result.methods - HIDE_METHODS).sort

render :update do |page|
page.replace_html "methods_#{number}", :partial => "methods"
Expand Down
@@ -1,7 +1,8 @@
<div id="command">
<h2>BioRuby shell commands</h2>
<ul>
<% @bioruby_commands.each do |cmd| %>
<li><%= cmd %></li>
<% end %>
</ul>

</div>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7c15b25

Please sign in to comment.