Skip to content

Commit 95a7856

Browse files
authored
Merge pull request #1 from trishnaguha/latest
AsciiBinder setup for Atomic host Doc
2 parents 6fb6d4c + c406119 commit 95a7856

File tree

15 files changed

+1109
-0
lines changed

15 files changed

+1109
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_preview

_distro_map.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
atomic_host_docs:
3+
name: Atomic Host
4+
author: Project Atomic Documentation Project <[email protected]>
5+
site: main
6+
site_name: Atomic Host Documentation
7+
site_url: http://docs.projectatomic.io/
8+
branches:
9+
master:
10+
name: Latest
11+
dir: latest
29.5 KB
Loading

_javascripts/.gitkeep

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
$(document).ready(function () {
2+
$('[data-toggle="offcanvas"]').click(function () {
3+
$('.sidebar').show();
4+
$('.row-offcanvas').toggleClass('active');
5+
});
6+
});

_stylesheets/asciibinder.css

Lines changed: 568 additions & 0 deletions
Large diffs are not rendered by default.

_templates/_css.html.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<%- Dir.glob("_stylesheets/*").sort.each do |sheet| -%>
2+
<link href="<%= File.join(css_path, File.basename(sheet)) %>" rel="stylesheet" />
3+
<%- end -%>

_templates/_nav.html.erb

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<ul class="nav nav-sidebar">
2+
<%- navigation.each.with_index do |topic_group, groupidx| -%>
3+
<%- current_group = topic_group[:id] == group_id -%>
4+
<li class="nav-header">
5+
<a class="" href="#" data-toggle="collapse" data-target="#topicGroup<%= groupidx %>">
6+
<span id="tgSpan<%= groupidx %>" class="fa <%= current_group ? 'fa-angle-down' : 'fa-angle-right' %>"></span><%= topic_group[:name] %>
7+
</a>
8+
<ul id="topicGroup<%= groupidx %>" class="collapse <%= current_group ? 'in' : '' %> list-unstyled">
9+
<%- topic_group[:topics].each.with_index do |topic, topicidx| -%>
10+
<%- if not topic.has_key?(:topics) -%>
11+
<%- current_topic = current_group && (topic[:id] == topic_id) -%>
12+
<li><a class="<%= current_topic ? ' active' : '' %>" href="<%= subtopic_shim %><%= topic[:path] %>"><%= topic[:name] %></a></li>
13+
<%- else -%>
14+
<%- current_subgroup = topic[:id] == subgroup_id -%>
15+
<li class="nav-header">
16+
<a class="" href="#" data-toggle="collapse" data-target="#topicSubGroup-<%= groupidx %>-<%= topicidx %>">
17+
<span id="sgSpan-<%= groupidx %>-<%= topicidx %>" class="fa <%= current_subgroup ? 'fa-caret-down' : 'fa-caret-right' %>"></span>&nbsp;<%= topic[:name] %>
18+
</a>
19+
<ul id="topicSubGroup-<%= groupidx %>-<%= topicidx %>" class="nav-tertiary list-unstyled collapse<%= current_subgroup ? ' in' : '' %>">
20+
<%- topic[:topics].each do |subtopic| -%>
21+
<%- current_subtopic = current_group && current_subgroup && (subtopic[:id] == topic_id) %>
22+
<li><a class="<%= current_subtopic ? ' active' : '' %>" href="<%= subtopic_shim %><%= subtopic[:path] %>"><%= subtopic[:name] %></a></li>
23+
<%- end -%>
24+
</ul>
25+
</li>
26+
<%- end -%>
27+
<%- end -%>
28+
</ul>
29+
</li>
30+
<%- end -%>
31+
</ul>

_templates/page.html.erb

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta content="IE=edge" http-equiv="X-UA-Compatible">
6+
<meta content="width=device-width, initial-scale=1.0" name="viewport">
7+
<title><%= distro %> <%= version %> | <%= [group_title, subgroup_title, topic_title].compact.join(' | ') %></title>
8+
9+
<!-- Bootstrap -->
10+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
11+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
12+
13+
<%= render("_templates/_css.html.erb", :css_path => css_path) %>
14+
<script src="<%= File.join(javascripts_path, "bootstrap-offcanvas.js") %>" type="text/javascript"></script>
15+
16+
<meta content="AsciiBinder" name="application-name">
17+
</head>
18+
<body>
19+
<div class="navbar navbar-default" role="navigation">
20+
<div class="container-fluid">
21+
<div class="navbar-header">
22+
<a class="navbar-brand" href="http://www.projectatomic.io/"><img alt="ProjectAtomic" src="<%= File.join(images_path, "project_atomic_horizontal_logo.png") %>" height="100"></a>
23+
</div>
24+
</div>
25+
</div>
26+
<div class="container">
27+
<p class="toggle-nav visible-xs pull-left">
28+
<button class="btn btn-default btn-sm" type="button" data-toggle="offcanvas">Toggle nav</button>
29+
</p>
30+
<ol class="breadcrumb">
31+
<li class="sitename">
32+
<a href="<%= site_home_path %>"><%= site_name %></a>
33+
</li>
34+
<li class="hidden-xs active">
35+
<%= breadcrumb_root %>
36+
</li>
37+
<li class="hidden-xs active">
38+
<%= breadcrumb_group %>
39+
</li>
40+
<%= breadcrumb_subgroup_block %>
41+
<li class="hidden-xs active">
42+
<%= breadcrumb_topic %>
43+
</li>
44+
</ol>
45+
<div class="row row-offcanvas row-offcanvas-left">
46+
<div class="col-xs-8 col-sm-3 col-md-3 sidebar sidebar-offcanvas">
47+
<%= render("_templates/_nav.html.erb", :navigation => navigation, :group_id => group_id, :topic_id => topic_id, :subgroup_id => subgroup_id, :subtopic_shim => subtopic_shim) %>
48+
</div>
49+
<div class="col-xs-12 col-sm-9 col-md-9 main">
50+
<div class="page-header">
51+
<h2><%= article_title %></h2>
52+
</div>
53+
<%= content %>
54+
</div>
55+
</div>
56+
</div>
57+
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
58+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
59+
<!-- Latest compiled and minified JavaScript -->
60+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
61+
<script type="text/javascript">
62+
/*<![CDATA[*/
63+
$(document).ready(function() {
64+
$("[id^='topicGroup']").on('show.bs.collapse', function (event) {
65+
if (!($(event.target).attr('id').match(/^topicSubGroup/))) {
66+
$(this).parent().find("[id^='tgSpan']").toggleClass("fa-angle-right fa-angle-down");
67+
}
68+
});
69+
$("[id^='topicGroup']").on('hide.bs.collapse', function (event) {
70+
if (!($(event.target).attr('id').match(/^topicSubGroup/))) {
71+
$(this).parent().find("[id^='tgSpan']").toggleClass("fa-angle-right fa-angle-down");
72+
}
73+
});
74+
$("[id^='topicSubGroup']").on('show.bs.collapse', function () {
75+
$(this).parent().find("[id^='sgSpan']").toggleClass("fa-caret-right fa-caret-down");
76+
});
77+
$("[id^='topicSubGroup']").on('hide.bs.collapse', function () {
78+
$(this).parent().find("[id^='sgSpan']").toggleClass("fa-caret-right fa-caret-down");
79+
});
80+
});
81+
/*]]>*/
82+
</script>
83+
</body>
84+
</html>

_topic_map.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This configuration file dictates the organization of the topic groups and
2+
# topics on the main page of the doc site for this branch. Each record
3+
# consists of the following:
4+
#
5+
# --- <= Record delimiter
6+
# Name: Origin of the Species <= Display name of topic group
7+
# Dir: origin_of_the_species <= Directory name of topic group
8+
# Topics:
9+
# - Name: The Majestic Marmoset <= Topic name
10+
# File: the_majestic_marmoset <= Topic file under group dir +/- .adoc
11+
# - Name: The Curious Crocodile <= Topic 2 name
12+
# File: the_curious_crocodile <= Topic 2 file
13+
# - Name: The Numerous Nematodes <= Sub-topic group name
14+
# Dir: the_numerous_nematodes <= Sub-topic group dir
15+
# Topics:
16+
# - Name: The Wily Worm <= Sub-topic name
17+
# File: the_wily_worm <= Sub-topic file under <group dir>/<subtopic dir>
18+
# - Name: The Acrobatic Ascarid <= Sub-topic 2 name
19+
# File: the_acrobatic_ascarid <= Sub-topic 2 file under <group dir>/<subtopic dir>
20+
#
21+
# The ordering of the records in this document determines the ordering of the
22+
# topic groups and topics on the main page.
23+
---
24+
Name: About
25+
Dir: welcome
26+
Topics:
27+
- Name: Welcome
28+
File: index
29+
30+
---
31+
Name: Tools
32+
Dir: atomic-host-guide
33+
Topics:
34+
- Name: Cockpit
35+
Dir: cockpit
36+
Topics:
37+
- Name: Overview
38+
File: overview
39+
- Name: Installation
40+
File: installing_cockpit
41+
- Name: How to Use
42+
File: using_cockpit

0 commit comments

Comments
 (0)