forked from processing/p5.js-website-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
573 additions
and
613 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file not shown.
File renamed without changes
Binary file not shown.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
let verbose = false; | ||
|
||
// now load the modules we need | ||
let ejs = require('ejs'); // library for turning .ejs templates into .html files | ||
let fs = require('fs'); // node.js library for reading and writing files | ||
let path = require('upath'); // platform indepedent file paths | ||
|
||
let outputRoot = process.argv.slice(2)[0]; | ||
|
||
// build the templates | ||
let learn_template = ejs.compile( | ||
fs.readFileSync( | ||
path.joinSafe(__dirname, '/learn.ejs'), | ||
'utf8' | ||
) | ||
); | ||
|
||
let input = path.joinSafe(__dirname, 'learn.json'); | ||
let contents = JSON.parse(fs.readFileSync(input)); | ||
|
||
// write main page | ||
fs.writeFile( | ||
path.joinSafe(outputRoot, '/index.hbs'), | ||
learn_template({ all: contents }), | ||
'utf8', | ||
function() { | ||
console.log('Created ' + outputRoot + '/index.hbs'); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
title: learn | ||
slug: learn/ | ||
--- | ||
|
||
<div id="learn-page"> | ||
|
||
{{> sidebar}} | ||
|
||
<div class="column-span"> | ||
|
||
<main id="content"> | ||
<h1>{{#i18n "learn-title"}}{{/i18n}}</h1> | ||
|
||
<p>{{#i18n "learn1"}}{{/i18n}} | ||
<a href="{{root}}/examples">{{#i18n "learn2"}}{{/i18n}} | ||
</a>{{#i18n "learn3"}}{{/i18n}} | ||
</p> | ||
|
||
<% for(t in all) { %> | ||
<h2 class="tutorial-title">{{#i18n "<%=t%>"}}{{/i18n}}</h2> | ||
<% let col=0; for(let c in all[t]) { %> | ||
<% if (col == 0) { %> | ||
<div class="left-column"> | ||
<% } else { %> | ||
<div class="right-column"> | ||
<% } %> | ||
<div class="label"> | ||
<a class="nounderline" href="<%=all[t][c].url%>" target="_blank"> | ||
<img alt="" src="{{assets}}/img/learn/lib_placeholder.jpg"> | ||
<h3>{{#i18n "<%=all[t][c].name%>-title"}}{{/i18n}}</h3> | ||
</a> | ||
</div> | ||
<p>{{#i18n "<%=all[t][c].name%>"}}{{/i18n}} <% if (all[t][c].authors) { %>{{#i18n "libraries-created-by" }}{{/i18n}} <% for(let i in all[t][c].authors) { %><a href="<%=all[t][c].authors[i].url%>" target="_blank"><%=all[t][c].authors[i].name%></a><% if (i != all[t][c].authors.length - 1) { %>, <% } } } %></p> | ||
</div> | ||
<% if (col == 1 || c == all[t].length - 1) { %> | ||
<div class="spacer"></div> | ||
<% } %> | ||
<% col = (col+1)%2; %> | ||
<% } %> | ||
<% } %> | ||
</main> | ||
{{> footer}} | ||
</div> <!-- end column-span --> | ||
{{> asterisk}} | ||
</div><!-- end id="get-started-page" --> |
Oops, something went wrong.