Skip to content

Commit

Permalink
Update the homepage. Redirect https, change config for deeplearnjs.or…
Browse files Browse the repository at this point in the history
…g. (tensorflow#162)

* changes to homepage

* remove line

* remove line
Nikhil Thorat authored Oct 1, 2017
1 parent aa74d8e commit 381eec5
Showing 4 changed files with 37 additions and 8 deletions.
15 changes: 10 additions & 5 deletions demos/demo-header.html
Original file line number Diff line number Diff line change
@@ -29,18 +29,23 @@
<dom-module id="demo-header">
<template>
<header class="mdl-layout__header mdl-layout--fixed-header is-casting-shadow">
<script>
if (location.protocol !== "https:") {
location.protocol = "https:";
}
</script>
<div class="mdl-layout__header-row">
<!-- Title -->
<a class="main-title" href="/deeplearnjs/index.html"><span class="mdl-layout-title">deeplearn.js</span></a>&nbsp;&nbsp;<span>[[name]]</span>
<a class="main-title" href="/"><span class="mdl-layout-title">deeplearn.js</span></a>&nbsp;&nbsp;<span>[[name]]</span>
<!-- Add spacer, to align navigation to the right -->
<div class="mdl-layout-spacer"></div>
<!-- Navigation. We hide it in small screens. -->
<nav class="mdl-navigation mdl-layout--large-screen-only">
<a class="mdl-navigation__link" target='_blank' href="https://github.com/PAIR-code/deeplearnjs">Code</a>
<a class="mdl-navigation__link" href="/deeplearnjs/#getting-started">Getting Started</a>
<a class="mdl-navigation__link" href="/deeplearnjs/index.html#demos">Examples</a>
<a class="mdl-navigation__link" href="/deeplearnjs/docs/tutorials/index.html">Tutorials</a>
<a class="mdl-navigation__link" href="/deeplearnjs/docs/api/globals.html">API Reference</a>
<a class="mdl-navigation__link" href="/#getting-started">Getting Started</a>
<a class="mdl-navigation__link" href="/#demos">Examples</a>
<a class="mdl-navigation__link" href="/docs/tutorials/index.html">Tutorials</a>
<a class="mdl-navigation__link" href="/docs/api/globals.html">API Reference</a>
</nav>
</div>
</header>
2 changes: 1 addition & 1 deletion demos/homepage/_config.yml
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: deeplearn.js
baseurl: "/deeplearnjs" # the subpath of your site, e.g. /blog
baseurl: "" # the subpath of your site, e.g. /blog

# Build settings
markdown: kramdown
5 changes: 5 additions & 0 deletions demos/homepage/_includes/header.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<!-- Header -->
<header class="mdl-layout__header mdl-layout--fixed-header">
<script>
if (location.protocol !== "https:") {
location.protocol = "https:";
}
</script>
<div class="mdl-layout__header-row">
<!-- Title -->
<a class="main-title" href="{{ "/index.html" | relative_url }}"><span class="mdl-layout-title">deeplearn.js</span></a>
23 changes: 21 additions & 2 deletions demos/homepage/index.md
Original file line number Diff line number Diff line change
@@ -228,10 +228,29 @@ limitations under the License.
<div class= "mdl-cell mdl-cell--5-col mdl-cell--8-col-tablet mdl-cell-4-col-phone">
<p class="intro-body mdl-typography--body-1">
<span class="deeplearn-shine">deeplearn.js</span> was originally developed by
<a href="https://twitter.com/nsthorat">Nikhil Thorat</a>,
<a href="https://twitter.com/dsmilkov">Daniel Smilkov</a> and
<a id="author1"></a>, <a id="author2"></a>, and
<a href="https://twitter.com/c_nich">Charles Nicholson</a>.
</p>
<script>
function daniel(elem) {
elem.href = 'https://twitter.com/dsmilkov';
elem.innerText = 'Daniel Smilkov';
}
function nikhil(elem) {
elem.href = 'https://twitter.com/nsthorat';
elem.innerText = 'Nikhil Thorat';
}

var author1 = document.getElementById('author1');
var author2 = document.getElementById('author2');
if (Math.random() > .5) {
daniel(author1);
nikhil(author2);
} else {
nikhil(author1);
daniel(author2);
}
</script>
</div>
<div class="mdl-layout-spacer mdl-cell--hide-tablet mdl-cell--hide-phone"></div>
<div class= "ack mdl-cell mdl-cell--4-col mdl-cell--8-col-tablet mdl-cell-4-col-phone">

0 comments on commit 381eec5

Please sign in to comment.