Added in the 'latest' command and display latest post in terminal boot
This commit is contained in:
parent
99e89f7e84
commit
e58896cc52
5 changed files with 40 additions and 2 deletions
|
|
@ -46,12 +46,29 @@ class TerminalShell {
|
|||
this.scrollToBottom();
|
||||
}
|
||||
|
||||
this.printHTML(" ");
|
||||
|
||||
// Get latest post info
|
||||
let latestPostTitle = document.getElementById("latest-post-title");
|
||||
let latestPostDate = document.getElementById("latest-post-date");
|
||||
this.printHTML(
|
||||
"<span class='info'>Latest Post: </span>" +
|
||||
latestPostTitle.innerText +
|
||||
" (" +
|
||||
latestPostDate.innerText +
|
||||
")",
|
||||
);
|
||||
this.printHTML(
|
||||
"<span class='info'> - Type \"latest\" to view it.</span>",
|
||||
);
|
||||
this.printHTML(" ");
|
||||
|
||||
this.printHTML(
|
||||
'<span class="info">Type "help" for available commands.</span>',
|
||||
);
|
||||
|
||||
this.printHTML(
|
||||
'<span class="warning">This site is under contstruction. There\'s nothing of interest here yet.</span>',
|
||||
'<span class="warning">This site is under construction. There\'s nothing of interest here yet.</span>',
|
||||
);
|
||||
|
||||
this.inputContainer.classList.remove("hidden");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue