Skip to content

Commit

Permalink
Populate geocities page
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee Edwards committed Oct 28, 2021
1 parent a90f696 commit 45ddaf5
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 42 deletions.
7 changes: 6 additions & 1 deletion config/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,12 @@ const commands = {
},

open: function(args) {
term.command(`cat ${args.join(" ")}`);
if (args[0].split(".")[1] == "htm") {
console.log(args[0]);
term.openURL(`./${args[0]}`);
} else {
term.command(`cat ${args.join(" ")}`);
}
},

more: function(args) {
Expand Down
9 changes: 7 additions & 2 deletions config/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ const _LOCAL_FILES = {

const _REMOTE_FILES = {
"README.md": "https://raw.githubusercontent.com/rootvc/cli-website/main/README.md",
"welcome.htm": "https://raw.githubusercontent.com/rootvc/cli-website/main/welcome.htm",
};

const DIRS = {
"~": ["id_rsa", "README.md"],
"~": ["id_rsa", "welcome.htm", "README.md"],
"bin": ["zsh"],
"home": Object.keys(team).concat("guest", "root").sort(),
"/": ["bin", "home"],
Expand Down Expand Up @@ -38,6 +39,10 @@ function _insertFileToDOM(name, txt) {
}

function getFileContents(filename) {
console.log(filename);
const div = document.getElementById(filename);
return div.innerHTML.replaceAll("<br>", "\r\n");
return div.innerHTML
.replaceAll("<br>", "\r\n")
.replaceAll("&gt;", ">")
.replaceAll("&lt;", "<");
}
54 changes: 28 additions & 26 deletions js/geo.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,34 @@ function buildGeoPage() {
const whois = document.getElementById("whois");
whois.innerHTML = whoisRoot.split(" Try")[0];

const portfolioTable = document.getElementById("portfolio");
for (p in portfolio) {
const row = portfolioTable.insertRow(-1);
const logoCell = row.insertCell();
const descriptionCell = row.insertCell();
const urlCell = row.insertCell();

logoCell.setAttribute("class", "portfolio-photo");
descriptionCell.setAttribute("class", "portfolio-description");

const logoImgTag = document.createElement("img");
logoImgTag.setAttribute("src", `images/${p}.jpg`);
logoImgTag.setAttribute("alt", `${portfolio[p].name}`);
logoCell.appendChild(logoImgTag);

if (portfolio[p].url != "(inactive)") {
const urlATag = document.createElement("a");
urlATag.setAttribute("href", portfolio[p].url);
urlATag.setAttribute("alt", `${portfolio[p].name}`);
urlATag.innerHTML = portfolio[p].url;
urlCell.appendChild(urlATag);
} else {
urlCell.innerHTML = portfolio[p].url;
}

descriptionCell.innerHTML = portfolio[p].description;
}

const teamTable = document.getElementById("team");
for (t in team) {
const row = teamTable.insertRow(-1);
Expand All @@ -29,30 +57,4 @@ function buildGeoPage() {
titleCell.innerHTML = team[t].title;
descriptionCell.innerHTML = team[t].description;
}

const portfolioTable = document.getElementById("portfolio");
for (p in portfolio) {
if (portfolio[p].url != "(inactive)") {
const row = portfolioTable.insertRow(-1);
const logoCell = row.insertCell();
const urlCell = row.insertCell();
const descriptionCell = row.insertCell();

logoCell.setAttribute("class", "portfolio-photo");
descriptionCell.setAttribute("class", "portfolio-description");

const logoImgTag = document.createElement("img");
logoImgTag.setAttribute("src", `images/${p}.jpg`);
logoImgTag.setAttribute("alt", `${portfolio[p].name}`);
logoCell.appendChild(logoImgTag);

const urlATag = document.createElement("a");
urlATag.setAttribute("href", portfolio[p].url);
urlATag.setAttribute("alt", `${portfolio[p].name}`);
urlATag.innerHTML = portfolio[p].url;
urlCell.appendChild(urlATag);

descriptionCell.innerHTML = portfolio[p].description;
}
}
}
3 changes: 2 additions & 1 deletion js/terminal-ext.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ extend = (term) => {
term.reset();
term.printLogoType();
term.stylePrint('Welcome to the Root Ventures terminal. Seeding bold engineers!');
term.stylePrint(`Type ${colorText("help", "command")} to get started.`);
term.stylePrint(`Type ${colorText("help", "command")} to get started, or type ${colorText("web", "command")} to see our website. (Not recommended)`);

term.user = user;
if (!preserveHistory) {
term.history = [];
Expand Down
26 changes: 14 additions & 12 deletions home.htm → welcome.htm
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@
</head>
<body>
<p class="pull-right">
<img src="images/geo/geocities.jpg">
<a href="https://github.com/divshot/geo-bootstrap" target="_blank">
<img src="images/geo/geocities.jpg">
</a>
</p>

<p class="pull-left">
Expand Down Expand Up @@ -119,9 +121,13 @@ <h2>About Us</h2>
<br>
</center>

<div>
<h2>Team</h2>
<table id="team" cellpadding="2" cellspacing="2" class="table table-bordered">
<div class="well">
<h2>
<img src="images/geo/underconstruction.gif">
Portfolio
<img src="images/geo/underconstruction.gif">
</h2>
<table id="portfolio" cellpadding="2" cellspacing="2" class="table table-bordered">
</table>
</div>

Expand All @@ -131,13 +137,9 @@ <h2>Team</h2>
<img src="images/geo/mchammer.gif">
</center>

<div class="well">
<h2>
<img src="images/geo/underconstruction.gif">
Portfolio
<img src="images/geo/underconstruction.gif">
</h2>
<table id="portfolio" cellpadding="2" cellspacing="2" class="table table-bordered">
<div>
<h2>Team</h2>
<table id="team" cellpadding="2" cellspacing="2" class="table table-bordered">
</table>
</div>

Expand Down Expand Up @@ -165,7 +167,7 @@ <h2>
</span>

<span class="pull-right">
<img src="images/geo/hacker.gif">Built by <a href="http://github.com/rootvc">Root Ventures Team</a>
<img src="images/geo/hacker.gif">Built by <a href="http://github.com/rootvc/cli-website" tagret="_blank">Root Ventures Team</a>
</span>
</footer>

Expand Down

0 comments on commit 45ddaf5

Please sign in to comment.