Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

Commit 544f53d

Browse files
committed
Update website
1 parent 81cc357 commit 544f53d

File tree

9 files changed

+42
-57
lines changed

9 files changed

+42
-57
lines changed

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
---
2-
layout: page
3-
order: 1
4-
---
5-
6-
[![Build Status](https://travis-ci.org/PAIR-code/deeplearnjs.svg?branch=master)](https://travis-ci.org/PAIR-code/deeplearnjs)
1+
<a id="travis-badge" href="https://travis-ci.org/PAIR-code/deeplearnjs" alt="Build Status">
2+
<img src="https://travis-ci.org/PAIR-code/deeplearnjs.svg?branch=master" />
3+
</a>
74

85
# Getting started
96

demos/complementary-color-prediction/complementary_color_prediction.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# Predicting Complementary Colors with deeplearn.js
1+
---
2+
layout: page
3+
order: 5
4+
---
5+
6+
# Example: Predicting Complementary Colors
27

38
This tutorial takes the reader through coding a model that predicts the [complements of colors](https://en.wikipedia.org/wiki/Complementary_colors). The hyper-parameters of this model may not be perfectly optimized, but building the model will take us through important concepts of deeplearn.js. Indeed, adding more layers seems to yield closer predictions of complement colors. We did not spend significant time optimizing hyper-parameters - we would love a pull request towards that end.
49

demos/demo-header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<!-- Navigation. We hide it in small screens. -->
3838
<nav class="mdl-navigation mdl-layout--large-screen-only">
3939
<a class="mdl-navigation__link" target='_blank' href="https://github.com/PAIR-code/deeplearnjs">Code</a>
40-
<a class="mdl-navigation__link" href="/deeplearnjs/README.html">Getting Started</a>
40+
<a class="mdl-navigation__link" href="/deeplearnjs/#getting-started">Getting Started</a>
4141
<a class="mdl-navigation__link" href="/deeplearnjs/index.html#demos">Examples</a>
4242
<a class="mdl-navigation__link" href="/deeplearnjs/docs/tutorials/index.html">Tutorials</a>
4343
<a class="mdl-navigation__link" href="/deeplearnjs/docs/api/globals.html">API Reference</a>

demos/homepage/_includes/header.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<!-- Navigation. We hide it in small screens. -->
99
<nav class="mdl-navigation mdl-layout--large-screen-only">
1010
<a class="mdl-navigation__link" target='_blank' href="https://github.com/PAIR-code/deeplearnjs">Code</a>
11-
<a class="mdl-navigation__link" href="{{ "/README.html" | relative_url }}">Getting Started</a>
11+
<a class="mdl-navigation__link" href="{{ "/#getting-started" | relative_url }}">Getting Started</a>
1212
<!-- <a class="mdl-navigation__link" href="{{ "/docs/intro.html" | relative_url }}">Introduction</a> -->
1313
<a class="mdl-navigation__link" href="{{ "/index.html#demos" | relative_url }}">Examples</a>
1414
<a class="mdl-navigation__link" href="{{ "/docs/tutorials/index.html" | relative_url }}">Tutorials</a>
@@ -21,7 +21,7 @@
2121
<span class="mdl-layout-title"><a href="{{ "/index.html" | relative_url }}">deeplearn.js</a></span>
2222
<nav class="mdl-navigation">
2323
<a class="mdl-navigation__link" target='_blank' href="https://github.com/PAIR-code/deeplearnjs">Code</a>
24-
<a class="mdl-navigation__link" href="{{ "/README.html" | relative_url }}">Getting Started</a>
24+
<a class="mdl-navigation__link" href="{{ "/#getting-started" | relative_url }}">Getting Started</a>
2525
<!-- <a class="mdl-navigation__link" href="{{ "/docs/intro.html" | relative_url }}">Introduction</a> -->
2626
<a class="mdl-navigation__link" href="{{ "/index.html#demos" | relative_url }}">Examples</a>
2727
<a class="mdl-navigation__link" href="{{ "/docs/tutorials/index.html" | relative_url }}">Tutorials</a>

demos/homepage/_layouts/page.html

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,15 @@
1010
</div>
1111
<div class="mdl-layout-spacer"></div>
1212
<div class="mdl-cell mdl-cell--3-col mdl-cell--8-col-tablet mdl-cell--4-col-phone">
13-
{% assign default_paths = site.pages | map: "path" %}
14-
{% assign page_paths = site.header_pages | default: default_paths %}
15-
16-
{% if page_paths %}
17-
<nav class="site-nav">
18-
<ul>
19-
{% for path in page_paths %}
20-
{% assign my_page = site.pages | where: "path", path | first %}
21-
{% if my_page.title %}
13+
{% assign pages_list = site.pages | sort: 'order' %}
14+
<nav class="site-nav">
15+
<ul>
16+
{% for my_page in pages_list %}
17+
{% if my_page.title and my_page.title != '_' %}
2218
<li><a href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a></li>
23-
{% endif %}
24-
25-
{% endfor %}
26-
</ul>
27-
</nav>
28-
{% endif %}
19+
{% endif %}
20+
{% endfor %}
21+
</ul>
22+
</nav>
2923
</div>
3024
</div>

demos/homepage/assets/style.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,12 @@ table {
192192
padding-left: 20px;
193193
line-height: 28px;
194194
list-style-type: none;
195-
line-height: 2.7em;
195+
line-height: 1.3em;
196196
font-weight: normal;
197197
}
198+
.site-nav ul li {
199+
padding-bottom: 20px;
200+
}
198201
.site-nav ul a {
199202
color: #50797f;
200203
font-weight: normal;
@@ -277,3 +280,7 @@ p.intro-body {
277280
.mdl-mini-footer__link-list a:visited {
278281
color: rgb(158, 158, 158);
279282
}
283+
284+
#travis-badge {
285+
display: none;
286+
}

demos/homepage/index.md

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -206,30 +206,15 @@ limitations under the License.
206206
</div>
207207

208208

209-
<div class='mdl-grid'>
209+
<div class="mdl-grid">
210210
<div class="mdl-layout-spacer mdl-cell--hide-tablet mdl-cell--hide-phone"></div>
211211
<div class="mdl-cell mdl-cell--10-col">
212-
<h2>Ready to Get Started?</h2>
213-
{% assign default_paths = site.pages | map: "path" %}
214-
{% assign page_paths = site.header_pages | default: default_paths %}
215-
<ul class="index">
216-
{% for path in default_paths %}
217-
{% assign my_page = site.pages | where: "path", path | first %}
218-
{% assign title = my_page.title | trim %}
219-
{% if title %}
220-
<li>
221-
<a href="{{ my_page.url | relative_url }}">
222-
{{my_page.title | escape }}
223-
</a>
224-
</li>
225-
{% endif %}
226-
{% endfor %}
227-
</ul>
212+
{% capture my_include %}{% include README.md %}{% endcapture %}
213+
{{ my_include | markdownify }}
228214
</div>
229215
<div class="mdl-layout-spacer mdl-cell--hide-tablet mdl-cell--hide-phone"></div>
230216
</div>
231217

232-
233218
<div class='mdl-grid'>
234219
<div class="mdl-layout-spacer mdl-cell--hide-tablet mdl-cell--hide-phone"></div>
235220
<div class="mdl-cell mdl-cell--10-col">

docs/tutorials/index.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
11
---
22
layout: page
3-
title: ''
3+
title: '_'
44
---
55
# Tutorials
66

77
This is a living, breathing document. Feel free to add your work below.
88

9-
{% assign default_paths = site.pages | map: "path" %}
10-
{% assign page_paths = site.header_pages | default: default_paths %}
9+
{% assign pages_list = site.pages | sort: 'order' %}
1110

1211
<ul class="index">
13-
{% for path in default_paths %}
14-
{% assign my_page = site.pages | where: "path", path | first %}
15-
{% assign title = my_page.title | trim %}
16-
{% if title %}
17-
<li>
18-
<a href="{{ my_page.url | relative_url }}">
19-
{{my_page.title | escape }}
20-
</a>
21-
</li>
12+
{% for my_page in pages_list %}
13+
{% if my_page.title and my_page.title != '_' %}
14+
<li>
15+
<a href="{{ my_page.url | relative_url }}">
16+
{{my_page.title | escape }}
17+
</a>
18+
</li>
2219
{% endif %}
2320
{% endfor %}
2421
</ul>

scripts/make-website.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ rm -rf "$TMP_DIR"
2020
mkdir "$TMP_DIR"
2121

2222
cp -r "docs" "$TMP_DIR/"
23-
cp "README.md" "$TMP_DIR/"
2423

2524
# Make the documentation.
2625
./node_modules/.bin/typedoc --out "$TMP_DIR/docs/api/" --excludeExternals \
@@ -40,6 +39,7 @@ cp -r "demos" "$TMP_DIR/"
4039
# Build the homepage (no deploy since homepage is not polymer).
4140
./scripts/build-demo demos/homepage/index.ts
4241
cp -r demos/homepage/* "$TMP_DIR"
42+
cp "README.md" "$TMP_DIR/_includes/"
4343
rm "$TMP_DIR"/index.ts
4444

4545
git stash

0 commit comments

Comments
 (0)