Skip to content

Commit e66cc2f

Browse files
committed
doc site fixes
1 parent 77e3ef7 commit e66cc2f

File tree

11 files changed

+211
-47
lines changed

11 files changed

+211
-47
lines changed

_includes/docs/docs.html

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,19 @@ <h1 id="overview" class="page-header">Overview</h1>
1414
CodeRoad aims to make building & sharing interactive tutorials as easy as possible.
1515
</blockquote>
1616

17-
<div class="lead">We hope to create fun and maintainable coding tutorials that actually improve with time. We hope to see students become teachers, teachers become empowered, and coders become better, faster. But first, let's get some interactive tutorials built. That's where you come in.</div>
17+
<div class="lead">We hope to create fun and maintainable coding tutorials that actually improve with time. We hope to see students become teachers, teachers become empowered, and coders become better, faster. But first, let's get some interactive tutorials built.
18+
That's where you come in.</div>
1819

1920
<a href="/build" class="btn btn-default btn-lg"><i class="fa fa-road fa-fw"></i> <span class="network-name">Read an Overview of Building a Tutorial</span></a>
20-
21-
<br> {% for post in site.posts reversed %}
22-
23-
<section id="{{ post.id }}">
24-
<h2 class="section-heading">{{ post.title }}</h2>
25-
<div class="lead">{{ post.content }}</div>
26-
<br>
27-
<a href="https://github.com/coderoad/coderoad.github.io/edit/master/_posts/{{ post.file}}" class="btn btn-default btn-xs"><i class="fa fa-pencil fa-fw"></i> <span class="network-name"> Edit {{post.title}} Docs</span></a>
28-
</section>
29-
<br> {% endfor %}
3021
</section>
22+
{% for post in site.posts reversed %}
23+
<section id="{{ post.id }}" class="bs-docs-section">
24+
<h2 class="section-heading">{{ post.title }}</h2>
25+
<div class="lead">{{ post.content }}</div>
26+
<br>
27+
<a href="https://github.com/coderoad/coderoad.github.io/edit/master/_posts/{{ post.file}}" class="btn btn-default btn-xs"><i class="fa fa-pencil fa-fw"></i> <span class="network-name"> Edit {{post.title}} Docs</span></a>
28+
</section>
29+
<br> {% endfor %}
3130
</div>
3231

3332
</div>

_includes/docs/js.html

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,49 @@
1-
<script>$(function(){var o=$(".docs-sidenav"),n=$(window),i=o.offset(),t=120;$(window).width()>991&&n.scroll(function(){n.scrollTop()>i.top?o.stop().animate({marginTop:n.scrollTop()-i.top+t}):o.stop().animate({marginTop:40})})});</script>
1+
<script>
2+
$(function(){
3+
// build side menu
4+
var html = '';
5+
6+
$('.bs-docs-section').each(function() {
7+
var h1 = $(this).find('h1[id]').first(),
8+
h23 = $(this).find('h2[id], h3[id]');
9+
10+
if (h1.length) {
11+
html+= '<li><a href="#' + h1[0].id +'">'+ h1.clone().children().remove().end().text() +'</a>';
12+
13+
if (h23.length) {
14+
html+= '<ul class="nav">';
15+
h23.each(function() {
16+
html+= '<li><a href="#' + this.id +'">'+ $(this).clone().children().remove().end().text() +'</a></li>';
17+
});
18+
html+= '</ul>';
19+
}
20+
21+
html+= '</li>';
22+
}
23+
});
24+
25+
if (html == '') {
26+
$('[role=complementary]').hide();
27+
$('[role=main]').toggleClass('col-md-9 col-md-12');
28+
}
29+
else {
30+
$('.bs-docs-sidenav').html(html);
31+
}
32+
33+
$('[data-bootbox]').on('click', function() {
34+
var $target = $('#'+$(this).data('bootbox'));
35+
bootbox.alert({
36+
title: $target.attr('title'),
37+
message: $target.html()
38+
});
39+
});
40+
41+
/*!
42+
* JavaScript for Bootstrap's docs (http://getbootstrap.com)
43+
* Copyright 2011-2014 Twitter, Inc.
44+
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
45+
* details, see http://creativecommons.org/licenses/by/3.0/.
46+
*/
47+
!function(a){a(function(){if(navigator.userAgent.match(/IEMobile\/10\.0/)){var b=document.createElement("style");b.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.querySelector("head").appendChild(b)}{var c=a(window),d=a(document.body);a(".navbar").outerHeight(!0)+10}d.scrollspy({target:".bs-docs-sidebar"}),c.on("load",function(){d.scrollspy("refresh")}),a(".bs-docs-container [href=#]").click(function(a){a.preventDefault()}),setTimeout(function(){var b=a(".bs-docs-sidebar");b.affix({offset:{top:function(){var c=b.offset().top,d=parseInt(b.children(0).css("margin-top"),10),e=a(".bs-docs-nav").height();return this.top=c-e-d},bottom:function(){return this.bottom=a(".bs-docs-footer").outerHeight(!0)}}})},100),setTimeout(function(){a(".bs-top").affix()},100)})}(jQuery);
48+
});
49+
</script>

_includes/docs/nav.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- Navigation -->
2-
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
2+
<nav class="navbar navbar-default navbar-collapse" role="navigation">
33
<div class="container">
44
<!-- Brand and toggle get grouped for better mobile display -->
55
<div class="navbar-header page-scroll">

_includes/docs/side-nav.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<div class="col-md-3 col-sm-12" role="complementary">
2-
<div class="bs-docs-sidebar hidden-print affix-top">
3-
<ul class="nav docs-sidenav">
1+
<aside class="col-md-3 col-sm-12" role="complementary">
2+
<div class="bs-docs-sidebar hidden-print">
3+
<ul class="nav sidebar">
44
<li>
55
<a class="page-scroll" href="#overview">
66
Overview
@@ -21,11 +21,11 @@
2121
<i class="fa fa-exclamation"></i> Issues
2222
</a>
2323
<a class="back-to-top" href="#top">
24-
<i class="glyphicon glyphicon-chevron-up"></i> Back to top
24+
<i class="fa fa-chevron-up"></i> Back to top
2525
</a>
2626

2727

2828

2929
</div>
3030

31-
</div>
31+
</aside>

_includes/js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<script src="/js/jquery-1.11.0.js"></script>
33

44
<!-- Plugin JavaScript -->
5-
<script src="{{ " js/jquery.easing.min.js " | prepend: site.baseurl }}"></script>
5+
<script src="{{ " /js/jquery.easing.min.js " | prepend: site.baseurl }}"></script>
66

77
<!-- Bootstrap Core JavaScript -->
88
<script src="/js/bootstrap.min.js"></script>

_posts/2016-01-06-loaders.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
layout: docs
33
title: Loaders
4-
id: loaders
5-
file: 2016-01-06-loading.md
4+
id: loaders-snippets
5+
file: 2016-01-06-loaders.md
66
---
77

88
Tutorials may be written in different programming languages or for different compilers, so there isn't yet a standard way to load data from user created files. Instead, you'll have to load your own solution into your tutorial and link to them from your test file. Rolling your own solution allows you to load data in a way that fits your project.

_posts/2016-01-10-testRunner.md renamed to _posts/2016-01-10-test-runner.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: docs
33
title: Test Runners
44
id: test-runner
5-
file: 2016-01-10-testRunner.md
5+
file: 2016-01-10-test-runner.md
66
---
77
A test runner works by creating a child process and calling a test framework with target files.
88

css/docs.css

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
@-ms-viewport {
2+
width: device-width
3+
}
4+
@-o-viewport {
5+
width: device-width
6+
}
7+
@viewport {
8+
width: device-width
9+
}
10+
11+
body {
12+
position: relative
13+
}
14+
15+
.navbar {
16+
margin-bottom: 0;
17+
}
18+
19+
#content:focus {
20+
outline: 0
21+
}
22+
23+
.bs-docs-sidebar.affix {
24+
position: static
25+
}
26+
@media (min-width:768px) {
27+
.bs-docs-sidebar {
28+
padding-left: 20px;
29+
margin-top: 60px;
30+
}
31+
}
32+
.bs-docs-sidenav {
33+
margin-top: 20px;
34+
margin-bottom: 20px
35+
}
36+
.bs-docs-sidebar .nav>li>a {
37+
display: block;
38+
padding: 4px 20px;
39+
font-size: 13px;
40+
font-weight: 500;
41+
color: #767676
42+
}
43+
.bs-docs-sidebar .nav>li>a:focus, .bs-docs-sidebar .nav>li>a:hover {
44+
padding-left: 19px;
45+
color: #563d7c;
46+
text-decoration: none;
47+
background-color: transparent;
48+
border-left: 1px solid #563d7c
49+
}
50+
.bs-docs-sidebar .nav>.active:focus>a, .bs-docs-sidebar .nav>.active:hover>a, .bs-docs-sidebar .nav>.active>a {
51+
padding-left: 18px;
52+
font-weight: 700;
53+
color: #563d7c;
54+
background-color: transparent;
55+
border-left: 2px solid #563d7c
56+
}
57+
.bs-docs-sidebar .nav .nav {
58+
display: none;
59+
padding-bottom: 10px
60+
}
61+
.bs-docs-sidebar .nav .nav>li>a {
62+
padding-top: 1px;
63+
padding-bottom: 1px;
64+
padding-left: 30px;
65+
font-size: 12px;
66+
font-weight: 400
67+
}
68+
.bs-docs-sidebar .nav .nav>li>a:focus, .bs-docs-sidebar .nav .nav>li>a:hover {
69+
padding-left: 29px
70+
}
71+
.bs-docs-sidebar .nav .nav>.active:focus>a, .bs-docs-sidebar .nav .nav>.active:hover>a, .bs-docs-sidebar .nav .nav>.active>a {
72+
padding-left: 28px;
73+
font-weight: 500
74+
}
75+
.back-to-top, .bs-docs-theme-toggle {
76+
display: none;
77+
padding: 4px 10px;
78+
margin-top: 10px;
79+
margin-left: 10px;
80+
font-size: 12px;
81+
font-weight: 500;
82+
color: #999
83+
}
84+
.back-to-top:hover, .bs-docs-theme-toggle:hover {
85+
color: #563d7c;
86+
text-decoration: none
87+
}
88+
.bs-docs-theme-toggle {
89+
margin-top: 0
90+
}
91+
@media (min-width:768px) {
92+
.back-to-top, .bs-docs-theme-toggle {
93+
display: block
94+
}
95+
}
96+
@media (min-width:992px) {
97+
.bs-docs-sidebar .nav>.active>ul {
98+
display: block
99+
}
100+
.bs-docs-sidebar.affix, .bs-docs-sidebar.affix-bottom {
101+
width: 213px
102+
}
103+
.bs-docs-sidebar.affix {
104+
position: fixed;
105+
top: 20px
106+
}
107+
.bs-docs-sidebar.affix-bottom {
108+
position: absolute
109+
}
110+
.bs-docs-sidebar.affix .bs-docs-sidenav, .bs-docs-sidebar.affix-bottom .bs-docs-sidenav {
111+
margin-top: 0;
112+
margin-bottom: 0
113+
}
114+
}
115+
@media (min-width:1200px) {
116+
.bs-docs-sidebar.affix, .bs-docs-sidebar.affix-bottom {
117+
width: 263px
118+
}
119+
}
120+
.bs-docs-section {
121+
margin-bottom: 60px
122+
}
123+
.bs-docs-section:last-child {
124+
margin-bottom: 0
125+
}
126+
127+
#docs code {
128+
padding: 0;
129+
}
130+
#docs h3 {
131+
margin-top: 30px;
132+
}
133+
#docs h2 {
134+
margin-top: 30px;
135+
}
136+
#docs ul li {
137+
list-style-type: circle;
138+
}

css/docs.min.css

Lines changed: 1 addition & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/landing-page.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ ul {
186186
}
187187
@font-face {
188188
font-family: 'FiraCode-Regular';
189-
src: url('FiraCode-Regular.eot');
190-
src: url('FiraCode-Regular.eot?#iefix') format('embedded-opentype'), url('FiraCode-Regular.woff') format('woff'), url('FiraCode-Regular.ttf') format('truetype'), url('FiraCode-Regular.svg#FiraCode-Regular') format('svg');
189+
src: url('/fonts/firacode/FiraCode-Regular.eot');
190+
src: url('/fonts/firacode/FiraCode-Regular.eot?#iefix') format('embedded-opentype'), url('/fonts/firacode/FiraCode-Regular.woff') format('woff'), url('/fonts/firacode/FiraCode-Regular.ttf') format('truetype'), url('/fonts/firacode/FiraCode-Regular.svg#FiraCode-Regular') format('svg');
191191
font-weight: 400;
192192
font-style: normal;
193193
font-stretch: normal;

css/landing-page.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)