Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

WIP: General site reorganization #65

Merged
merged 33 commits into from
Jul 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3f4bd96
Starting to shuffle navigation around.
Mr0grog May 12, 2016
c808577
Fix navigation for JS SDK docs
Mr0grog May 12, 2016
cac8772
Reorganizing docs in "learn."
Mr0grog May 18, 2016
6423592
Add new "software" top-level section (things like core, horizon, fede…
Mr0grog May 18, 2016
4954ef2
Move things-to-build under guides, link to formatted version (instead…
Mr0grog May 18, 2016
7a681b0
Add Java syntax highlighting.
Mr0grog Jun 1, 2016
2ca1dd4
Rearrange content in guides section.
Mr0grog Jun 1, 2016
5346772
Switch markdown parser to markdown-it
Mr0grog Jun 24, 2016
7f9f50c
Add footnote support.
Mr0grog Jun 24, 2016
d80fa78
Add syntax highlighting for Go.
Mr0grog Jun 24, 2016
bbd076b
Fancy language switcher for code examples.
Mr0grog Jun 25, 2016
9279508
Add support for numbered items in sidebar sections.
Mr0grog Jun 25, 2016
951aac3
Merge branch 'master' into nav-restructure
Mr0grog Jun 25, 2016
2f38259
Wireframing new developers landing page content. Not even close to fi…
Mr0grog May 18, 2016
5e2d79a
fix header border
irisli Jun 14, 2016
188fe5c
add styling to June 2016 landing page
irisli Jun 14, 2016
9ca0322
fix switched graphics and expand link target size
irisli Jun 14, 2016
c2a176f
fix uppercasing in buttons
irisli Jun 16, 2016
15b9c18
remove column header linking in landing page; make links easier to click
irisli Jun 22, 2016
1e32cb8
disable collapsing for tools sidebar
irisli Jun 23, 2016
0a97887
fix spacing on sidebar
irisli Jun 23, 2016
82bf085
Merge pull request #67 from stellar/landing-page-redesign
irisli Jun 27, 2016
9c9e3d5
switch to using markdownit anchor link generator
irisli Jun 27, 2016
59f9b91
Edit page copy
Jun 29, 2016
3b07e32
change Stellar Overview to Stellar Network Overview
Jun 30, 2016
050fe2e
Change labels for steps 1 and 2
Jun 30, 2016
0453fb7
edit title, fix label for step 1
Jun 30, 2016
bd55f0e
make more sidebars not collapsible
irisli Jun 29, 2016
78989b0
make most menus expanded by default
irisli Jul 1, 2016
e436c21
change sidebars and js code to consistently use new page section names
irisli Jul 1, 2016
5e3a955
fix homepage links to get started
irisli Jul 2, 2016
0d21503
update to new screenshot of landing page
irisli Jul 2, 2016
4d82a7c
Fix links
bartekn Jul 5, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions gulp/enhance.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ function addRepoInfo(f, p) {
let parts = p.split(path.sep);

switch(parts[0]) {
case "learn":
case "guides":
case "reference":
case "software":
case "tools":
case "beyond-code":
f.repo = "docs";
Expand Down Expand Up @@ -75,13 +76,14 @@ function addFullTitle(f, p) {

function addSection(f, p) {
if (path.extname(p) !== ".md") return;
if (f.section) return;

let parts = p.split(path.sep);
switch(parts[0]) {
case "learn":
case "guides":
case "reference":
case "software":
case "tools":
case "beyond-code":
f.section = parts[0];
break;
default:
Expand Down
11 changes: 7 additions & 4 deletions gulp/handlebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ module.exports.helpers = {
},

sidebarSubMenu(title, options) {
let c = options.hash.collapsible == true;
const listTag = options.hash.numbered ? 'ol' : 'ul';

return `
<li class="pageNavList__subList collapsibleListSet js-collapsibleListSet">
<span class="pageNavList__title collapsibleListSet__label js-collapsibleListSet__label">${title}</span>
<ul class="collapsibleListSet__list js-collapsibleListSet__list is-collapsed">
<li class="pageNavList__subList${(c) ? ' collapsibleListSet js-collapsibleListSet' : ''}">
<span class="pageNavList__title${(c) ? ' collapsibleListSet__label js-collapsibleListSet__label' : ''}">${title}</span>
<${listTag} class="collapsibleListSet__list${(c) ? ' js-collapsibleListSet__list is-collapsed' : ''}">
${options.fn(this)}
</ul>
</${listTag}>
</li>
`;
},
Expand Down
21 changes: 17 additions & 4 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import gulp from 'gulp';
import path from 'path';
import Metalsmith from 'metalsmith';
import _ from 'lodash';
import markdownItAnchor from 'markdown-it-anchor';
import markdownItFootnote from 'markdown-it-footnote';
import util from 'util';
import fs from 'fs';
import hbars from './gulp/handlebars';
Expand All @@ -21,10 +23,10 @@ gulp.task("default", ["build"]);

gulp.task('src:symlink-repos', ['git:clone'], () => {
// symlink the landing pages/custom content from the docs repo for each section
safeSymlink("../repos/docs/learn", "src/learn")
safeSymlink("../repos/docs/guides", "src/guides")
safeSymlink("../repos/docs/reference", "src/reference")
safeSymlink("../repos/docs/software", "src/software")
safeSymlink("../repos/docs/tools", "src/tools")
safeSymlink("../repos/docs/beyond-code", "src/beyond-code")

// link up other repo's docs folder into the src structure
return gulp.src("./repos/*/docs/")
Expand All @@ -39,6 +41,8 @@ gulp.task('js:copy-vendor', function() {
'./bower_components/codemirror/addon/runmode/runmode.js',
'./bower_components/codemirror/mode/javascript/javascript.js',
'./bower_components/codemirror/mode/shell/shell.js',
'./bower_components/codemirror/mode/clike/clike.js',
'./bower_components/codemirror/mode/go/go.js',
'./bower_components/stellar-sdk/stellar-sdk.min.js',
])
.pipe($g.concat('vendor.js'))
Expand Down Expand Up @@ -72,10 +76,10 @@ gulp.task('build', ['src:symlink-repos', "js:copy-vendor"], done => {
files: [
"js/vendor.js",
"js/syntaxHighlight.js",
"js/codeExamples.js",
"js/endpointRef.js",
"js/friendbot4.js",
"js/collapsibleListSet.js",
"js/headingAnchorShortcut.js",
"js/linkCheck.js",
],
output: "js/app.js",
Expand All @@ -87,7 +91,16 @@ gulp.task('build', ['src:symlink-repos', "js:copy-vendor"], done => {
]
}))
.use(renameReadme)
.use($m.markdown())
.use($m.markdownit({
html: true,
linkify: true,
typographer: true
}).use(markdownItAnchor, {
permalink: true,
permalinkClass: 'anchorShortcut',
permalinkSymbol: '',
permalinkBefore: true
}).use(markdownItFootnote))
.use($m.inPlace(_.extend({}, templateOptions, {
pattern: '*.handlebars'
})))
Expand Down
2 changes: 1 addition & 1 deletion layouts/learn.handlebars → layouts/guides.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{> header-full-with-sidebar }}

<div class="S-flex-row">
{{> learn/sidebar }}
{{> guides/sidebar }}
{{> contentWrapperStart }}
{{> contentWrapperEnd }}
</div>
Expand Down
11 changes: 11 additions & 0 deletions layouts/software.handlebars
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{> head }}
{{> header-full-with-sidebar }}

<div class="S-flex-row">
{{> software/sidebar }}
{{> contentWrapperStart }}
{{> contentWrapperEnd }}
</div>

{{> footer }}
{{> foot }}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
"handlebars": "^4.0.2",
"load-metalsmith-plugins": "^0.1.1",
"lodash": "^3.10.1",
"markdown-it-anchor": "^2.5.0",
"markdown-it-footnote": "^2.0.0",
"metalsmith": "git+https://github.com/stellar/metalsmith.git",
"metalsmith-autoprefixer": "^1.1.0",
"metalsmith-concat": "^3.0.3",
"metalsmith-fingerprint": "^1.0.3",
"metalsmith-in-place": "^1.3.1",
"metalsmith-layouts": "^1.4.1",
"metalsmith-markdown": "^0.2.1",
"metalsmith-markdownit": "^0.3.0",
"metalsmith-metadata": "0.0.1",
"metalsmith-sass": "^1.3.0",
"minimatch": "^2.0.10",
Expand Down
4 changes: 2 additions & 2 deletions partials/footer.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<a class="siteFooter__list__item" href="https://www.stellar.org/"><span class="graphic-backArrow-9"></span>&nbsp;&nbsp;Stellar.org</a>
<span class="siteFooter__list__sep">|</span>
<a class="siteFooter__list__item" href="{{pathPrefix}}/">Developers</a>
<a class="siteFooter__list__item" href="{{pathPrefix}}/stellar-core/learn/admin.html">Run a node</a>
<a class="siteFooter__list__item" href="https://github.com/stellar/docs/blob/master/other/things-to-build.md">Build an app</a>
<a class="siteFooter__list__item" href="{{pathPrefix}}/stellar-core/software/admin.html">Run a node</a>
<a class="siteFooter__list__item" href="{{pathPrefix}}/guides/things-to-build.html">Build an app</a>
<a class="siteFooter__list__item" href="https://github.com/stellar/">GitHub</a>
<a class="siteFooter__list__item" href="http://slack.stellar.org/">Community chat</a>
</div>
Expand Down
17 changes: 17 additions & 0 deletions partials/guides/sidebar.handlebars
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<div class="siteSidebar pageNavListBounder">
<div class="mainSidebar">
<ul class="pageNavList">
{{#sidebarSubMenu "Get Started" numbered="true" }}
{{>sidebarSubItems glob="guides/get-started/index.html"}}
{{>sidebarSubItems glob="guides/get-started/!(index).html"}}
{{/sidebarSubMenu}}

{{>sidebarSubMenu title="Concepts" glob="guides/concepts/*.html"}}

{{>sidebarSubItems glob="guides/anchor.html"}}
{{>sidebarSubItems glob="guides/exchange.html"}}
{{>sidebarSubItems glob="guides/!(index|contributing|anchor|exchange).html"}}
{{>sidebarSubItems glob="guides/contributing.html"}}
</ul>
</div>
</div>
4 changes: 2 additions & 2 deletions partials/header-centered.handlebars
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="so-back">
<div class="so-back header2016Back">
<div class="so-chunk">
<div class="header2016">
<div class="header2016 header2016--centered">
<div class="header2016__logo">
<div class="so-siteHeader">
{{> siteLogo }}
Expand Down
33 changes: 0 additions & 33 deletions partials/learn/sidebar.handlebars

This file was deleted.

6 changes: 3 additions & 3 deletions partials/mainNavMenu.handlebars
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{> mainNavMenu/item href="/learn/" text="Learn" sectionFilter="learn"}}
{{> mainNavMenu/item href="/reference/" text="Reference" sectionFilter="reference"}}
{{> mainNavMenu/item href="/guides/" text="Guides" sectionFilter="guides"}}
{{> mainNavMenu/item href="/reference/" text="API Reference" sectionFilter="reference"}}
{{> mainNavMenu/item href="/software/" text="Software" sectionFilter="software"}}
{{> mainNavMenu/item href="/tools/" text="Tools" sectionFilter="tools"}}
{{> mainNavMenu/item href="/beyond-code/" text="Beyond Code" sectionFilter="beyond-code"}}
2 changes: 1 addition & 1 deletion partials/modules/dev-newsletter.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<span class="mailSignup__title">Get developer updates:</span>
<input type="email" value="" name="EMAIL" class="mailSignup__input" style="border-radius: 3px; " placeholder="email address" required="">
<div style="position: absolute; left: -5000px;"><input type="text" name="b_c001d97369b7a10d224c23867_c77c979e43" tabindex="-1" value=""></div>
<input type="submit" value="Sign up" name="subscribe" class="s-button mailSignup__submit">
<input type="submit" value="Sign up" name="subscribe" class="s-button mailSignup__submit spu-textUppercase">
</form>
2 changes: 1 addition & 1 deletion partials/modules/friendbot4.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<br>
<span class="js-friendbot4-step4-seed"></span>
</p>
<p class="friendbot4-stepOutro">Explore more of the <a href="{{pathPrefix}}/learn/" target="_blank">Stellar ecosystem</a>.</p>
<p class="friendbot4-stepOutro">Explore more of the <a href="{{pathPrefix}}/guides/" target="_blank">Stellar ecosystem</a>.</p>
</div>
<div class="friendbot4-initialHide js-friendbot4__navWrapper">
<nav class="friendbot4__nav">
Expand Down
25 changes: 22 additions & 3 deletions partials/reference/sidebar.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,29 @@
<div class="mainSidebar">
<ul class="pageNavList">

{{>sidebarSubItems glob="horizon/reference/*.html"}}
{{#sidebarSubMenu "REST API" collapsible=true}}
{{>sidebarSubItems glob="horizon/reference/index.html"}}
{{>sidebarSubItems glob="horizon/reference/!(index).html"}}
{{>sidebarSubMenu title="Tutorials" glob="horizon/reference/tutorials/*.html"}}
{{>sidebarSubMenu title="Endpoints" glob="horizon/reference/endpoints/*.html"}}
{{>sidebarSubMenu title="Resources" glob="horizon/reference/resources/*.html"}}
{{>sidebarSubMenu title="Errors" glob="horizon/reference/errors/*.html"}}
{{/sidebarSubMenu}}

{{>sidebarSubMenu title="Resources" glob="horizon/reference/resources/*.html"}}
{{>sidebarSubMenu title="Errors" glob="horizon/reference/errors/*.html"}}
{{#sidebarSubMenu "JavaScript SDK" collapsible=true}}
{{>sidebarSubItems glob="js-stellar-sdk/reference/index.html"}}
{{>sidebarSubItems glob="js-stellar-base/reference/*.html"}}
{{>sidebarSubItems glob="js-stellar-sdk/reference/!(index).html"}}
<li class="pageNavList__item"><a href="https://stellar.github.io/js-stellar-sdk/" target="_blank">API Reference <span class="icon-faSvg icon-faSvg--small icon-faSvg-external-neutral5"></span></a></a></li>
{{/sidebarSubMenu}}

{{! FIXME: these should be info pages rather than raw links to Github }}
{{! e.g. >sidebarSubItems glob="java-stellar-sdk/guides/index.html"}}
<li class="pageNavList__item"><a href="https://github.com/stellar/java-stellar-sdk" target="_blank">Java SDK <span class="icon-faSvg icon-faSvg--small icon-faSvg-external-neutral5"></span></a></a></li>
<li class="pageNavList__item"><a href="https://github.com/stellar/go-stellar-base" target="_blank">Go SDK <span class="icon-faSvg icon-faSvg--small icon-faSvg-external-neutral5"></span></a></a></li>
<li class="pageNavList__item"><a href="https://github.com/stellar/ruby-stellar-sdk" target="_blank">Ruby SDK <span class="icon-faSvg icon-faSvg--small icon-faSvg-external-neutral5"></span></a></a></li>
<li class="pageNavList__item"><a href="https://github.com/StellarCN/py-stellar-base" target="_blank">Python SDK <span class="icon-faSvg icon-faSvg--small icon-faSvg-external-neutral5"></span></a></a></li>
<li class="pageNavList__item"><a href="https://github.com/QuantozTechnology/csharp-stellar-base" target="_blank">C# SDK <span class="icon-faSvg icon-faSvg--small icon-faSvg-external-neutral5"></span></a></a></li>

</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion partials/sidebarSubMenu.handlebars
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#sidebarSubMenu title}}
{{#sidebarSubMenu title collapsible=collapsible}}
{{>sidebarSubItems glob=glob}}
{{/sidebarSubMenu}}
15 changes: 15 additions & 0 deletions partials/software/sidebar.handlebars
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div class="siteSidebar pageNavListBounder">
<div class="mainSidebar">
<ul class="pageNavList">
{{#sidebarSubMenu "Stellar Core"}}
{{>sidebarSubItems glob="stellar-core/software/*.html"}}
{{>sidebarSubItems glob="stellar-core/software/*.pdf"}}
{{/sidebarSubMenu}}

<li class="pageNavList__item"><a href="https://github.com/stellar/federation">Federation Server</a></li>
<li class="pageNavList__item"><a href="https://github.com/stellar/bridge-server">Bridge Server</a></li>
<li class="pageNavList__item"><a href="https://github.com/stellar/archivist">Archivist</a></li>
<li class="pageNavList__item"><a href="https://github.com/stellar/horizon">Horizon</a></li>
</ul>
</div>
</div>
9 changes: 7 additions & 2 deletions partials/tools/sidebar.handlebars
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<div class="siteSidebar pageNavListBounder">
<div class="mainSidebar">
<ul class="pageNavList">
<li class="pageNavList__item"><a href="https://www.stellar.org/laboratory/">Laboratory</a></li>
<li class="pageNavList__item"><a href="https://www.stellar.org/account-viewer/">Account Viewer</a></li>
{{#sidebarSubMenu "Tools" collapsible=false}}
<li class="pageNavList__item"><a href="https://www.stellar.org/laboratory/">Laboratory</a></li>
{{/sidebarSubMenu}}
{{#sidebarSubMenu "Sample Code" collapsible=false}}
<li class="pageNavList__item"><a href="https://github.com/stellar/account-viewer">Account Viewer</a></li>
<li class="pageNavList__item"><a href="https://github.com/stellar/stellar-sms-client">SMS Client</a></li>
{{/sidebarSubMenu}}
</ul>
</div>
</div>
1 change: 1 addition & 0 deletions src/guides
Binary file added src/images/previews/landing-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading