miniyard 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/miniyard.rb +4 -0
- data/lib/miniyard/version.rb +1 -1
- data/lib/templates/index.haml +43 -11
- data/miniyard.gemspec +1 -1
- metadata +4 -4
data/lib/miniyard.rb
CHANGED
data/lib/miniyard/version.rb
CHANGED
data/lib/templates/index.haml
CHANGED
@@ -4,34 +4,66 @@
|
|
4
4
|
%title [ MiniYard ]
|
5
5
|
%link{rel: 'stylesheet', type: 'text/css', href: './bootstrap.1.4.0.min.css'}
|
6
6
|
:javascript
|
7
|
+
var folderSelected = false;
|
7
8
|
function selectFolder(anchor, folder) {
|
8
|
-
|
9
|
+
folderSelected = true;
|
9
10
|
var ul = anchor.parentElement.parentElement;
|
10
11
|
for (var i = 0; i < ul.children.length; i++) {
|
11
12
|
var li = ul.children[i];
|
12
|
-
console.dir(li);
|
13
13
|
li.classList.remove('active');
|
14
14
|
}
|
15
15
|
anchor.parentNode.classList.add('active');
|
16
16
|
document.getElementById('frame').src = './'+folder+'/index.html';
|
17
|
+
selectFrameNav(document.getElementById('index-frame-link'), 'index');
|
18
|
+
}
|
19
|
+
function selectFrameNav(anchor, fileToShow) {
|
20
|
+
if (!folderSelected) return;
|
21
|
+
var src = document.getElementById('frame').src;
|
22
|
+
var newSrc = src.replace(/(.+\/).+\.html/, '$1'+fileToShow+'.html');
|
23
|
+
document.getElementById('frame').src = newSrc;
|
24
|
+
|
25
|
+
var pills = document.getElementById('pill-nav');
|
26
|
+
for (var i = 0; i < pills.children.length; i++) {
|
27
|
+
var li = pills.children[i];
|
28
|
+
li.classList.remove('active');
|
29
|
+
}
|
30
|
+
anchor.parentNode.classList.add('active');
|
17
31
|
}
|
18
32
|
:css
|
19
33
|
html,body { height: 100%; margin: 0; padding: 0; }
|
20
|
-
|
21
|
-
.
|
22
|
-
.
|
23
|
-
.
|
24
|
-
|
25
|
-
|
34
|
+
body { background: #333; color: #fff; }
|
35
|
+
span.bracket { color: #444; }
|
36
|
+
h3.title { color: #fff; margin: 0; padding: 0; }
|
37
|
+
h3.title .version { font-size: 10px; padding-bottom: 10px; color: #666; }
|
38
|
+
.sidebar { text-align: right; }
|
39
|
+
.sidebar ul { list-style-type: none; margin: 0; padding: 0; margin-top: 50px }
|
40
|
+
.sidebar ul li { font-size: 20px; margin: 3px 0; }
|
41
|
+
.sidebar ul li a { border-right: 3px solid #444; padding: 10px 10px; display: inline-block; color: #fff }
|
42
|
+
.sidebar ul li a:hover, .sidebar ul li a:active:hover, .sidebar ul li.active a { border-right-color: #FFC940; }
|
43
|
+
.sidebar ul li.active { font-weight: bold; background: #666; }
|
44
|
+
.content ul.pills { margin-bottom: 0; }
|
45
|
+
.content ul.pills a { color: #fff; text-shadow: 0 1px 1px #666; }
|
46
|
+
.content #frame { width: 100%; min-height: 90%; background: #fff; }
|
26
47
|
|
27
48
|
%body
|
28
49
|
.container-fluid
|
29
50
|
.sidebar
|
51
|
+
|
30
52
|
%ul
|
31
|
-
%li.title
|
32
|
-
%h1 [ MiniYard ]
|
33
53
|
- folders.each do |folder|
|
34
54
|
%li
|
35
55
|
%a{id: "#{folder}-link", href: '#', onclick: "javascript: selectFolder(this, '#{folder}')"}= folder
|
56
|
+
|
36
57
|
.content
|
37
|
-
%
|
58
|
+
%ul#pill-nav.pills{"data-pills" => "pills"}
|
59
|
+
%li
|
60
|
+
%a{id: "index-frame-link", href: '#', onclick: "javascript: selectFrameNav(this, 'index', false)"} No Frames
|
61
|
+
%li
|
62
|
+
%a{id: "frames-frame-link", href: '#', onclick: "javascript: selectFrameNav(this, 'frames', false)"} Frames
|
63
|
+
%iframe#frame{frameborder: '0'}
|
64
|
+
%h3.title
|
65
|
+
%span.bracket [
|
66
|
+
MiniYard
|
67
|
+
%span.bracket ]
|
68
|
+
%span.version= miniyard_version
|
69
|
+
|
data/miniyard.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = MiniYard::VERSION
|
8
8
|
s.authors = ["BJ Neilsen"]
|
9
9
|
s.email = ["bj.neilsen@gmail.com"]
|
10
|
-
s.homepage = ""
|
10
|
+
s.homepage = "http://www.rand9.com"
|
11
11
|
s.summary = %q{A static html framebuilder to host multiple documentation folders}
|
12
12
|
s.description = s.summary
|
13
13
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miniyard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-12-23 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: haml
|
16
|
-
requirement: &
|
16
|
+
requirement: &2153363260 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2153363260
|
25
25
|
description: A static html framebuilder to host multiple documentation folders
|
26
26
|
email:
|
27
27
|
- bj.neilsen@gmail.com
|
@@ -39,7 +39,7 @@ files:
|
|
39
39
|
- lib/templates/bootstrap.1.4.0.min.css
|
40
40
|
- lib/templates/index.haml
|
41
41
|
- miniyard.gemspec
|
42
|
-
homepage:
|
42
|
+
homepage: http://www.rand9.com
|
43
43
|
licenses: []
|
44
44
|
post_install_message:
|
45
45
|
rdoc_options: []
|