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

Commit

Permalink
Merge pull request #4 from stellar/touchups-4
Browse files Browse the repository at this point in the history
Touchups 4
  • Loading branch information
irisli committed Sep 29, 2015
2 parents 09a6ba0 + 47a2b08 commit 1ec4a3a
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 21 deletions.
13 changes: 7 additions & 6 deletions gulp/enhance.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ let repos = require("../repos.json");
// The enhance middleware populates a bunch of metadata fields on the files.
export default function enhance(files, metalsmith, done) {
_.each(files, (f, p) => {
addSrcInfo(f, p, metalsmith);
addRepoInfo(f, p, metalsmith);
addProject(f, p, metalsmith);
addSection(f, p, metalsmith);
Expand All @@ -17,6 +18,10 @@ export default function enhance(files, metalsmith, done) {
done();
}

function addSrcInfo(f, p) {
f.srcPath = p;
}

function addRepoInfo(f, p) {
let parts = p.split(path.sep);

Expand All @@ -38,7 +43,7 @@ function addRepoInfo(f, p) {
} else {
// no repo for this case
}
break;
break;
}

if (!f.repo) return;
Expand Down Expand Up @@ -99,12 +104,8 @@ function addExamples(f, p, metalsmith) {
let examples = metalsmith.metadata()._examples;
let ext = path.extname(p);
let endpoint = path.basename(p).slice(0,-ext.length);

if(!(endpoint in examples)) return;

f.examples = examples[endpoint];
}




13 changes: 12 additions & 1 deletion partials/learn/sidebar.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,18 @@
{{>sidebarSubMenu title="Concepts" glob="learn/concepts/*.html"}}

{{#sidebarSubMenu "Integration Guides"}}
<li class="pageNavList__item">TODO</li>
{{>sidebarSubMenu title="Building blocks" glob="learn/integration-guides/building-blocks/*.html"}}
{{>sidebarSubItems glob="learn/integration-guides/*.html"}}
{{/sidebarSubMenu}}

{{#sidebarSubMenu "js-stellar"}}
{{>sidebarSubItems glob="js-stellar-base/learn/*.html"}}
{{>sidebarSubItems glob="js-stellar-sdk/learn/*.html"}}
{{/sidebarSubMenu}}

{{#sidebarSubMenu "Interstellar"}}
{{>sidebarSubItems glob="interstellar/learn/index.html"}}
{{>sidebarSubItems glob="interstellar/learn/!(index).html"}}
{{/sidebarSubMenu}}

{{#sidebarSubMenu "Horizon"}}
Expand Down
2 changes: 1 addition & 1 deletion partials/sidebarSubItems.handlebars
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#eachFile glob}}
<li class="pageNavList__item{{#equal repoPath file.repoPath}} is-currentItem{{/equal}}"><a href="{{pathPrefix}}/{{path}}">{{file.title}}</a></li>
<li class="pageNavList__item{{#equal srcPath file.srcPath}} is-currentItem{{/equal}}"><a href="{{pathPrefix}}/{{path}}">{{file.title}}</a></li>
{{/eachFile}}
8 changes: 4 additions & 4 deletions partials/siteLogo.handlebars
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<a href="/" class="so-logo">
<span class="so-logo__main">Stellar</span><!--
<span class="so-logo">
<a href="https://www.stellar.org/" class="so-logo__main">Stellar</a><!--
--><span class="so-logo__separator"> </span><!--
--><span class="so-logo__subSite">developers</span>
</a>
--><a href="{{pathPrefix}}/" class="so-logo__subSite">developers</a>
</span>
7 changes: 6 additions & 1 deletion repos.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@
"stellar-core" : {
"githubURL": "https://github.com/stellar/stellar-core"
},
"interstellar" : {
"githubURL": "https://github.com/stellar/interstellar"
},
"js-stellar-base" : {
"githubURL": "https://github.com/stellar/js-stellar-base"
},
"js-stellar-sdk" : {
"githubURL": "https://github.com/stellar/js-stellar-sdk"
},
"horizon" : {
"githubURL": "https://github.com/stellar/horizon"
}

}
16 changes: 8 additions & 8 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,30 @@
</div>
<div class="so-chunk">
<div class="flexCols flexCols--l flexCols--twinBorder spu-background-primary8 spu-radius">
<a href="/developers/learn/"><div class="flexCols__col flexCols--l__col flexCols__col--borderBetween flexCols--l__col--borderBetween spu-borderColor-light4 spu-pad-20 spu-padSE-30 centerText">
<a href="{{pathPrefix}}/learn/" class="flexCols__col flexCols--l__col flexCols__col--borderBetween flexCols--l__col--borderBetween spu-borderColor-light4 spu-pad-20 spu-padSE-30 centerText spu-textDecorationNone">
<p class="so-capTitle">Basics</p>
<h3>Start learning Stellar concepts</h3>
<div class="spu-padTB-30">
<span class="so-graphic-pencilOnEarth"></span>
</div>
<p class="spu-fontSize-5">Get to know the ABCs of the Stellar network.</p>
</div></a>
<a href="/developers/reference/"><div class="flexCols__col flexCols--l__col flexCols__col--borderBetween flexCols--l__col--borderBetween spu-borderColor-light4 spu-pad-20 spu-padSE-30 centerText">
</a>
<a href="{{pathPrefix}}/reference/" class="flexCols__col flexCols--l__col flexCols__col--borderBetween flexCols--l__col--borderBetween spu-borderColor-light4 spu-pad-20 spu-padSE-30 centerText spu-textDecorationNone">
<p class="so-capTitle">Documentation</p>
<h3>Dive deep into the Stellar Galaxy</h3>
<div class="spu-padTB-30">
<span class="so-graphic-codeWithOrbits"></span>
</div>
<p class="spu-fontSize-5">All the reference you need to build anything you want.</p>
</div></a>
<a href="/developers/beyond-code/"><div class="flexCols__col flexCols--l__col flexCols__col--borderBetween flexCols--l__col--borderBetween spu-borderColor-light4 spu-pad-20 spu-padSE-30 centerText">
</a>
<a href="{{pathPrefix}}/beyond-code/" class="flexCols__col flexCols--l__col flexCols__col--borderBetween flexCols--l__col--borderBetween spu-borderColor-light4 spu-pad-20 spu-padSE-30 centerText spu-textDecorationNone">
<p class="so-capTitle">Participate</p>
<h3>Join the Stellar community</h3>
<div class="spu-padTB-30">
<span class="so-graphic-nodeConnectedEarth"></span>
</div>
<p class="spu-fontSize-5">Ask questions, meet other developers, hang out with us.</p>
</div></a>
</a>
</div>
</div>
</div>
Expand All @@ -59,7 +59,7 @@ <h3 class="spu-color-light3 spu-centerText spu-padBottom-10">Quick Start</h3>
</div>
<h4 class="spu-padBottom-10">Join the Community</h4>
<ul class="so-linkList">
<li class="so-linkList__item"><a href="/developers/beyond-code/contribute.html">Contribute</a></li>
<li class="so-linkList__item"><a href="{{pathPrefix}}/beyond-code/contribute.html">Contribute</a></li>
<li class="so-linkList__item"><a href="https://slack.stellar.org">Slack</a></li>
<li class="so-linkList__item"><a href="#check">Volunteer</a></li>
</ul>
Expand All @@ -71,7 +71,7 @@ <h4 class="spu-padBottom-10">Join the Community</h4>
<h4 class="spu-padBottom-10">Participate in the network</h4>
<ul class="so-linkList">
<li class="so-linkList__item"><a href="#check">Contribute</a></li>
<li class="so-linkList__item"><a href="/developers/stellar-core/learn/admin.html">Run a node</a></li>
<li class="so-linkList__item"><a href="{{pathPrefix}}/stellar-core/learn/admin.html">Run a node</a></li>
<li class="so-linkList__item"><a href="#check">Volunteer</a></li>
</ul>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/interstellar
1 change: 1 addition & 0 deletions src/js-stellar-base
3 changes: 3 additions & 0 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
border-top: 1px solid $s-color-light2;
padding-top: 2em;
}
.mainContent {
max-width: 900px;
}

// gray sidebar on full width pages
.siteSidebar {
Expand Down

0 comments on commit 1ec4a3a

Please sign in to comment.