manalang-bdoc 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Manifest.txt +0 -1
- data/lib/bdoc.rb +2 -3
- data/templates/index.html +92 -3
- metadata +1 -1
data/Manifest.txt
CHANGED
data/lib/bdoc.rb
CHANGED
@@ -5,10 +5,10 @@ require 'rubygems'
|
|
5
5
|
require 'erb'
|
6
6
|
require 'tmpdir'
|
7
7
|
require 'launchy'
|
8
|
-
require 'json
|
8
|
+
require 'json'
|
9
9
|
|
10
10
|
module Bdoc
|
11
|
-
VERSION = '0.
|
11
|
+
VERSION = '0.2.0'
|
12
12
|
|
13
13
|
class << self
|
14
14
|
attr_accessor :output_dir
|
@@ -51,7 +51,6 @@ module Bdoc
|
|
51
51
|
File.open(output_index,"w") {|f| f.write(index)}
|
52
52
|
FileUtils.cp File.join(File.dirname(__FILE__), '..', "templates","jquery.js"), output_dir
|
53
53
|
FileUtils.cp File.join(File.dirname(__FILE__), '..', "templates","screen.css"), output_dir
|
54
|
-
FileUtils.cp File.join(File.dirname(__FILE__), '..', "templates","bdoc.css"), output_dir
|
55
54
|
end
|
56
55
|
|
57
56
|
def open
|
data/templates/index.html
CHANGED
@@ -1,10 +1,99 @@
|
|
1
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
|
2
|
-
lang="en">
|
1
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
3
2
|
<head>
|
4
3
|
<title>Bdoc — Your Local Gem Browser</title>
|
5
4
|
<script src="jquery.js"></script>
|
6
5
|
<link rel="stylesheet" href="screen.css" type="text/css" media="screen" />
|
7
|
-
<
|
6
|
+
<style type="text/css" media="screen">
|
7
|
+
a.gemname, a.gemname:link, a.gemname:visited {
|
8
|
+
color:#333;
|
9
|
+
padding:2px 3px;
|
10
|
+
text-decoration:none;
|
11
|
+
}
|
12
|
+
a.gemname:hover {
|
13
|
+
color:#000;
|
14
|
+
background:#999;
|
15
|
+
-moz-border-radius: 2px;
|
16
|
+
-webkit-border-radius: 2px;
|
17
|
+
}
|
18
|
+
body { background: #aaa }
|
19
|
+
#about {
|
20
|
+
position:absolute;
|
21
|
+
top:3px;
|
22
|
+
right:14px;
|
23
|
+
font-weight:bold;
|
24
|
+
text-decoration:none;
|
25
|
+
}
|
26
|
+
#navbar {
|
27
|
+
height:27px;
|
28
|
+
margin:4px 5px 0 5px;
|
29
|
+
}
|
30
|
+
#navbar strong {
|
31
|
+
background:#555;
|
32
|
+
padding:3px 5px;
|
33
|
+
-moz-border-radius:3px;
|
34
|
+
-webkit-border-radius:3px;
|
35
|
+
}
|
36
|
+
#navbar strong a,
|
37
|
+
#navbar strong a:link,
|
38
|
+
#navbar strong a:visited {
|
39
|
+
color:#fff;
|
40
|
+
text-decoration:none;
|
41
|
+
}
|
42
|
+
#nav {
|
43
|
+
position:absolute;
|
44
|
+
top:21px;
|
45
|
+
left:5px;
|
46
|
+
padding:10px;
|
47
|
+
width:80%;
|
48
|
+
z-index:1;
|
49
|
+
background:#eee;
|
50
|
+
border:6px solid #555;
|
51
|
+
overflow:auto;
|
52
|
+
line-height:2.5em;
|
53
|
+
text-align:justify;
|
54
|
+
-moz-border-radius-bottomleft:20px;
|
55
|
+
-moz-border-radius-bottomright:20px;
|
56
|
+
-moz-border-radius-topleft:0;
|
57
|
+
-moz-border-radius-topright:20px;
|
58
|
+
-webkit-border-bottom-left-radius:20px;
|
59
|
+
-webkit-border-bottom-right-radius:20px;
|
60
|
+
-webkit-border-top-left-radius:0;
|
61
|
+
-webkit-border-top-right-radius:20px;
|
62
|
+
}
|
63
|
+
#nav .gemname {
|
64
|
+
font-size:1.2em;
|
65
|
+
}
|
66
|
+
#nav span.gemname {
|
67
|
+
color:#aaa;
|
68
|
+
}
|
69
|
+
.version {
|
70
|
+
font-size:.9em;
|
71
|
+
color:#666;
|
72
|
+
}
|
73
|
+
#current .version {
|
74
|
+
text-decoration:none;
|
75
|
+
}
|
76
|
+
#viewport {
|
77
|
+
position:absolute;
|
78
|
+
top:27px;
|
79
|
+
width:100%;
|
80
|
+
z-index:0;
|
81
|
+
}
|
82
|
+
#viewport iframe {
|
83
|
+
border-top:1px solid #000;
|
84
|
+
width:100%;
|
85
|
+
height:100%;
|
86
|
+
}
|
87
|
+
.gem {
|
88
|
+
white-space:nowrap;
|
89
|
+
}
|
90
|
+
#current a {
|
91
|
+
font-weight:bold;
|
92
|
+
}
|
93
|
+
#current a.selected {
|
94
|
+
color:#000;
|
95
|
+
}
|
96
|
+
</style>
|
8
97
|
<script type="text/javascript" language="javascript" charset="utf-8">
|
9
98
|
// <![CDATA[
|
10
99
|
var gems = <%= @gems.to_json %>;
|