Skip to content

Commit 1e62c92

Browse files
committed
fix: add help layout pages
1 parent 71f6385 commit 1e62c92

File tree

11 files changed

+1809
-8
lines changed

11 files changed

+1809
-8
lines changed

config.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
baseURL = "/"
22
languageCode = "en-gb"
33
title = "JS Bin help"
4-
# theme = "hyde"
4+
googleAnalytics = "UA-1656750-13"
55
pygmentsCodeFences = true
66
pygmentsStyle = "vs"
7-
# pygmentsUseClasses=true
87

98
[outputs]
109
home = [ "RSS", "HTML"]

content/blog/live-reloading-css.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ author: remy
44
date: '2015-07-04'
55
published: true
66
---
7+
78
# Live reloading CSS
89

910
Due to a few recent optimisations in the JS Bin rendering logic, we now have live reloading CSS in the editor.

content/help/_index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
title: Help
3+
---

content/help/ssl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ Once this is enabled, visiting jsbin.com will redirect to https. However, not al
3636

3737
Even though the [open source repository](https://github.com/jsbin/jsbin) has some hints of SSL support inside it, we don't actively support using SSL in local installations. This is mainly due to the bespoke set up with domains and SSL certificates we use in production, so we prefer a simpler local install.
3838

39-
SSL is provided through our proxy server using [nginx](http://wiki.nginx.org/Main) and there is some interest to explore [further SSL support](https://github.com/jsbin/jsbin/issues/1168) so please do get in touch if you have any success in this area.
39+
SSL is provided through our proxy server using [nginx](http://wiki.nginx.org/Main) and there is some interest to explore [further SSL support](https://github.com/jsbin/jsbin/issues/1168) so please do get in touch if you have any success in this area.

content/legals/_index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
date: '2014-06-12'
3+
---

content/legals/privacy.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
date: '2014-06-12'
3+
---

data/categories.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[
2+
{
3+
"name": "learn",
4+
"title": "Learn",
5+
"description": "Making more use of JS Bin as part of your tools"
6+
},
7+
{
8+
"name": "hack",
9+
"title": "Hacking & play",
10+
"description": "Prototypes, demos, and sharing your work"
11+
},
12+
{
13+
"name": "fix",
14+
"title": "Fix & contribute",
15+
"description": "Making JS Bin better for everyone, and advanced usage"
16+
},
17+
{
18+
"name": "teach",
19+
"title": "Teach & share your knowledge",
20+
"description":
21+
"Using JS Bin to teach others via blogs and published work or classroom and multi-user environments"
22+
},
23+
{ "name": "pro", "title": "Pro features", "description": "" }
24+
]

layouts/_default/baseof.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<script src="/js/html5shiv.min.js"></script>
1212
<![endif]-->
1313
</head>
14-
<body id="{{ $.Section }}-page">
14+
<body data-url="{{ $.URL }}" id="{{ $.URL | replaceRE `/(.*)/` "$1" | replaceRE `/` "-" }}-page">
1515
<div id="container">
1616
<header>
1717
<div class="inner"><a id="back" href="/"><span class="morewords">Back to JS Bin</span></a>
@@ -23,11 +23,10 @@
2323
</nav>
2424
</div>
2525
</header>
26-
<div id="body">
26+
<div id="body" data-section="{{ $.Section }}" data-path="{{ $.IsNode }}">
2727
<!-- <a href="http://jsbin.com/upgrade" class="pro-feature actionButton actionButton-primary actionButton-small actionButton-rounded">Upgrade to Pro</a> -->
28-
<article>
29-
{{ block "main" . -}}{{- end }}
30-
</article>
28+
{{ if eq $.Section "legals" | or $.IsNode }}{{ block "main" . -}}{{- end }}
29+
{{else}}<article>{{ block "main" . -}}{{- end }}</article>{{end}}
3130
</div>
3231
<div class="clear"></div>
3332
</div>

layouts/help/list.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{{ define "main" -}}
2+
3+
<h1>Help</h1>
4+
<div class="help-index">
5+
{{ range $cat := .Site.Data.categories }}
6+
<div class="category {{ $cat.name }}">
7+
<h2>{{ $cat.title }}</h2>
8+
<h4>{{ $cat.description }}</h4>
9+
10+
<ul class="links">
11+
{{ range $i, $page := (where $.Site.Pages "Section" "help") }} {{ if eq $page.Params.category $cat.name }}
12+
<li>
13+
<a href="{{ $page.Permalink }}">{{ replace $page.Title "*" "★" }}</a>
14+
</li>{{end}} {{end}}
15+
</ul>
16+
</div>
17+
{{ end }}
18+
19+
<div class="category">
20+
<h2> Legals</h2>
21+
<h4>Our terms and privacy policy that we run JS Bin under</h4>
22+
<ul class="links">
23+
<li>
24+
<a href="/legals/privacy/">Privacy Policy</a>
25+
</li>
26+
<li>
27+
<a href="/legals/"> Terms of Service</a>
28+
</li>
29+
</div>
30+
31+
</div>
32+
{{end}}

0 commit comments

Comments
 (0)