Skip to content

Commit 3fa374a

Browse files
committed
Initial take at using bootstrap for styling
1 parent 49c44ba commit 3fa374a

9 files changed

Lines changed: 324 additions & 118 deletions

_includes/common.html

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!-- Latest compiled and minified CSS -->
2+
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
3+
4+
<!-- Optional theme -->
5+
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">
6+
7+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
8+
9+
<!-- Latest compiled and minified JavaScript -->
10+
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
11+
12+
13+
14+
<!-- START COPYING HERE -->
15+
<link rel="stylesheet" href="gh-fork-ribbon.css">
16+
<!--[if lt IE 9]>
17+
<link rel="stylesheet" href="gh-fork-ribbon.ie.css">
18+
<![endif]-->
19+
<!-- END COPYING HERE -->
20+
21+
22+
<style>
23+
body { margin-top:45px; }
24+
div.likebuttons {display: table; float: right; position: absolute; top: 0;}
25+
div.likebutton {display: table-cell; }
26+
.cs-blue {color:white; background: #31708f}
27+
</style>
28+
29+
30+

_includes/header.html

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
2+
<!-- TOP RIGHT RIBBON: START COPYING HERE -->
3+
<div class="github-fork-ribbon-wrapper right">
4+
<div class="github-fork-ribbon">
5+
<a href="https://github.com/ChaiScript/ChaiScript">Fork me on GitHub</a>
6+
</div>
7+
</div>
8+
9+
10+
<div class="likebuttons">
11+
<div class="likebutton">
12+
<a href="//www.pinterest.com/pin/create/button/" data-pin-do="buttonBookmark" ><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png" /></a>
13+
<!-- Please call pinit.js only once per page -->
14+
<script type="text/javascript" async src="//assets.pinterest.com/js/pinit.js"></script>
15+
</div>
16+
17+
<div class="likebutton">
18+
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://chaiscript.com" data-via="lefticus" data-lang="en">Tweet</a>
19+
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
20+
</div>
21+
22+
<div class="likebutton">
23+
<!-- Place this tag where you want the +1 button to render. -->
24+
<div class="g-plusone" data-size="medium"></div>
25+
26+
<!-- Place this tag after the last +1 button tag. -->
27+
<script type="text/javascript">
28+
(function() {
29+
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
30+
po.src = 'https://apis.google.com/js/platform.js';
31+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
32+
})();
33+
</script>
34+
</div>
35+
36+
<div class="likebutton">
37+
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fchaiscript.com&amp;width&amp;layout=button_count&amp;action=like&amp;show_faces=true&amp;share=true&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:21px;" allowTransparency="true"></iframe>
38+
</div>
39+
40+
</div>
41+
42+
43+
44+
45+
<nav class="navbar navbar-default" role="navigation">
46+
<div class="container-fluid">
47+
<!-- Brand and toggle get grouped for better mobile display -->
48+
<div class="navbar-header">
49+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
50+
<span class="sr-only">Toggle navigation</span>
51+
<span class="icon-bar"></span>
52+
<span class="icon-bar"></span>
53+
<span class="icon-bar"></span>
54+
</button>
55+
<a class="navbar-brand" href="index.html">ChaiScript</a>
56+
</div>
57+
58+
<!-- Collect the nav links, forms, and other content for toggling -->
59+
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
60+
<ul class="nav navbar-nav">
61+
<li {% if page.url == '/releases.html'%} class='active' {% endif %}>
62+
<a href="/releases.html">Releases</a>
63+
</li>
64+
<li {% if page.url == '/examples.html'%} class='active' {% endif %}>
65+
<a href="/examples.html">Examples</a>
66+
</li>
67+
<li {% if page.url == '/support.html'%} class='active' {% endif %}>
68+
<a href="/support.html">Support</a>
69+
</li>
70+
</ul>
71+
</div><!-- /.navbar-collapse -->
72+
</div><!-- /.container-fluid -->
73+
</nav>
74+
75+

_posts/2014-02-23-test.md

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: ChaiScript Basic Example
3+
tags: example
4+
---
5+
6+
7+
The most straightfoward example of using ChaiScript is the one from the front page. In this example we register a simple function that takes one parameter and returns a value. We then call the function from within ChaiScript and use a built in ChaiScript function to print the return value to the console.
8+
9+
Note that this example relies on being able to find the ChaiScript Stdlib module, precompiled in a known location.
10+
11+
{% gist 9190735 %}
12+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: ChaiScript Compiled in Stdlib Example
3+
tags: example
4+
---
5+
6+
This example is like the basic example but instead of relying on a precompiled version of the ChaiScript Stdlib, it compiles it into the executable directly. This method takes considerably longer to compile, so we will use the external Stdlib for most of our examples.
7+
8+
{% gist 9456197 %}
9+

examples.html

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: Examples
3+
---
4+
5+
<!DOCTYPE HTML>
6+
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
7+
8+
<head>
9+
10+
{% include common.html %}
11+
12+
</head>
13+
14+
15+
<body>
16+
17+
{% include header.html %}
18+
19+
{% assign posts = site.tags.example | sort: 'id' %}
20+
21+
<div class="panel panel-info">
22+
<div class="panel-heading">
23+
<h3 class="panel-title">Examples</h3>
24+
</div>
25+
<div class="panel-body">
26+
<ul>
27+
{% for post in posts %}
28+
<li>
29+
<a href="#{{ post.title | replace: ' ', '_' }}" onclick="$('#{{ post.title | replace: ' ', '_' }}').collapse('show'); window.location.hash = '#{{ post.title | replace: ' ', '_' }}';">{{ post.title }}</a>
30+
</li>
31+
{{ post.excerpt }}
32+
{% endfor %}
33+
</ul>
34+
</div>
35+
</div>
36+
37+
38+
<div class="panel-group" id="accordion">
39+
{% for post in posts %}
40+
<div class="panel panel-default">
41+
<div class="panel-heading">
42+
<h4 class="panel-title">
43+
<a data-toggle="collapse" data-parent="#accordion" href="#{{ post.title | replace: ' ', '_' }}">
44+
{{ post.title }}
45+
</a>
46+
</h4>
47+
</div>
48+
<div id="{{ post.title | replace: ' ', '_' }}" class="panel-collapse collapse">
49+
<div class="panel-body">
50+
{{ post.content}}
51+
</div>
52+
</div>
53+
</div>
54+
{% endfor %}
55+
</div>
56+
57+
58+
</body>

0 commit comments

Comments
 (0)